question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] It takes a lot of time to execute, especially `tailwindcss/classnames-order `

See original GitHub issue

Describe 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:

  1. On the terminal, run TIMING=1 npx eslint src
  2. 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:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
francoismassartcommented, Jun 9, 2022

💯 @mpsijm 👍

2reactions
ronny1020commented, Jun 9, 2022

After 3.5.2, it’s much better, thanks for both @mpsijm and @francoismassart.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found