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

build: Add ESLint and prettier tailwind plugins #1085

Merged
merged 4 commits into from
Oct 13, 2023
Merged

Conversation

MoritzWeber0
Copy link
Member

@MoritzWeber0 MoritzWeber0 commented Oct 10, 2023

It enforces a unique classname order and prevents contradicting classnames. All supported rules are described here: https://www.npmjs.com/package/eslint-plugin-tailwindcss

You just have to review four commits, you can skip the 6358e34 commit. In this commit, only the result pre-commit run -a was committed.

@MoritzWeber0 MoritzWeber0 marked this pull request as draft October 10, 2023 08:26
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c484956) 71.55% compared to head (f6c5563) 71.55%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1085   +/-   ##
=======================================
  Coverage   71.55%   71.55%           
=======================================
  Files         160      160           
  Lines        5076     5076           
  Branches      543      543           
=======================================
  Hits         3632     3632           
  Misses       1341     1341           
  Partials      103      103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MoritzWeber0 MoritzWeber0 changed the title build: Add ESLint Tailwind plugin build: Add ESLint and prettier tailwind plugins Oct 10, 2023
@MoritzWeber0 MoritzWeber0 force-pushed the eslint-tailwind branch 3 times, most recently from cdc4519 to 6a60aeb Compare October 10, 2023 16:05
@MoritzWeber0 MoritzWeber0 marked this pull request as ready for review October 10, 2023 16:05
@MoritzWeber0 MoritzWeber0 requested review from dominik003, amolenaar and Paula-Kli and removed request for amolenaar and dominik003 October 10, 2023 16:06
Copy link
Contributor

@Paula-Kli Paula-Kli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious: do you know why the tailwind class names order is switched in many cases even though you turned that off in the config?

@MoritzWeber0
Copy link
Member Author

I am curious: do you know why the tailwind class names order is switched in many cases even though you turned that off in the config?

It's turned off because prettier takes care of it. There is no need to run it twice (in ESLint and Prettier). That's why I turned it off in ESLint.

It enforces a unique classname order and prevents contradicting
classnames. All supported rules are described here:
https://www.npmjs.com/package/eslint-plugin-tailwindcss
The plugin auto-sorts the used classes.
@MoritzWeber0 MoritzWeber0 merged commit edac1cf into main Oct 13, 2023
23 checks passed
@MoritzWeber0 MoritzWeber0 deleted the eslint-tailwind branch October 13, 2023 13:18
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