radix-vue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
3.51k stars 203 forks source link

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

Open Saeid-Za opened 1 month ago

Saeid-Za commented 1 month ago

โ“ Type of 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 commented 1 month ago

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 commented 1 month ago

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

@zernonia @Saeid-Za wdyt

Saeid-Za commented 1 month ago

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

Cons: