[BUG] It takes a lot of time to execute, especially `tailwindcss/classnames-order `
See original GitHub issueDescribe the bug
It takes a lot of time to execute Eslint
.
And I use TIMING=1
to find the reason.
here is what I get
Rule | Time (ms) | Relative
:--------------------------------------|----------:|--------:
tailwindcss/classnames-order | 10097.373 | 50.0%
prettier/prettier | 2399.615 | 11.9%
tailwindcss/enforces-shorthand | 2330.436 | 11.5%
import/no-cycle | 1044.403 | 5.2%
import/no-relative-packages | 455.328 | 2.3%
import/order | 397.291 | 2.0%
tailwindcss/no-custom-classname | 264.854 | 1.3%
import/no-extraneous-dependencies | 257.201 | 1.3%
import/extensions | 253.208 | 1.3%
tailwindcss/no-contradicting-classname | 179.790 | 0.9%
It takes almost half of the time to run tailwindcss/classnames-order
and about 10% of the time to run ailwindcss/enforces-shorthand
To Reproduce Steps to reproduce the behavior:
- On the terminal, run
TIMING=1 npx eslint src
- check the result
Expected behavior I think the time sould not take so much.
Environment (please complete the following information):
- OS: macOS 12.3.1
- Softwares + version used:
- node v16.14.0
- npm v8.3.1
Additional context Add any other context about the problem here.
eslint config file or live demo
{
// ...
"tailwindcss": {
"callees": ["joinClassNames"],
"config": "tailwind.config.js",
"cssFiles": ["**/*.css"]
}
}
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Just-in-Time Mode - Tailwind CSS
Tailwind CSS v2.1 introduces a new just-in-time compiler for Tailwind CSS that ... runtime, so class names need to be statically extractable at...
Read more >Tailwind CSS classes is not working in my project?
This error is due to tailwind not finding any classes to scan in what it 'thinks' is your HTML code directories.
Read more >TailwindCSS: Adds complexity, does nothing.
CSS Modules (and especially .vue files) have done a lot to dispel ... Tailwind prefers to use prefixed class names instead of media...
Read more >Debugging Tailwind CSS and Next.js - LogRocket Blog
Not having the Tailwind directives in the main CSS file · Not assigning the CSS classes correctly to the elements · Using the...
Read more >Why I Don't Like Tailwind CSS | Aleksandr Hovhannisyan
On paper, Tailwind CSS sounds like a great idea. ... is easier to parse because we're taking it one thing at a time,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
💯 @mpsijm 👍
After 3.5.2, it’s much better, thanks for both @mpsijm and @francoismassart.