Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update linting rules and adding tailwind linter plugin #581

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

Saeid-Za
Copy link
Contributor

@Saeid-Za Saeid-Za commented May 29, 2024

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Current dev branch has some incorrect configuration in eslint.config.js file.

  1. Order of file-specific & general rules were incorrect, this caused false-positive warnings in linting stage.

I've added tailwindcss linting plugins to better align the project with it's styling best practices.

The amount of changes are unfortunately large, but they are the result of running the lint with new configuration.
The main files that should be reviewed are eslint.config.js and package.json, the rest could be ignored as they could be reproduced by running eslint command with this new configuration.

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented May 30, 2024

Hey @Saeid-Za, I appreciate your efforts πŸ™Œ

I think eslint-plugin-tailwind already supports flat config (eslint v9)

eg. https://github.com/blefnk/relivator-nextjs-starter/blob/main/eslint.config.ts#L75

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented May 30, 2024

Let's ignore eslint size-* transformation for registry/[default,new-york]/ui?

@zernonia @Saeid-Za wdyt

@Saeid-Za
Copy link
Contributor Author

Saeid-Za commented May 30, 2024

Thanks for the comment !
I'm in favor of using size rule for the repo.
Pros:

  • fewer classes lead to ease of understanding
  • reduction in final bundle size by a few bytes.

Cons:

  • Huge amount of changes in the repo, that would make a pain point for updating users
    • since there are no updating strategy, this wouldn't matter right now (?)

@sadeghbarati sadeghbarati requested a review from zernonia May 30, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants