-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow import/order to accept a glob/regex #674
Comments
+1! Need it to put css imports into a separate group. |
Any updates on this feature? |
Would really love to have this as well. Seems like it's a recurring request. |
Any update on this proposal? I would love to see this 👍 |
This comment has been minimized.
This comment has been minimized.
I think this customization would make the rule much more useful and flexible. Placing CSS imports on top is quite important since their order matters. |
Their order matters relative to each other, but it doesn’t matter if they’re first, last, or scattered between. |
What happens here? I think component.css will appear before main.css, but that's not what I want. // main.js
import "./component.js"
import "./main.css" // component.js
import "./component.css" |
Sure, but that’s across files - which means you have to intimately know the implementation details already, and that can’t be safely encoded in a lint rule. You won’t always want main to come before component - for example, if you want main to override component. |
You just said that it doesn't matter, I showed you it does matter. The lint rule totally can expect .css files to be on top. That's all I'm asking. I'm not asking to detect whether it matters, because we already know it matters and that's why they should be on top.
That's up to the lint configurator to decide. |
Touché. The problem is that it doesn't matter the same always - and neither "css on top" nor "css on bottom" actually covers all generic use cases, because it always depends on the exact things those CSS files are doing, due to the global nature of CSS. In other words, I don't think it's something that can be properly configured in static analysis in a generic sense, due to the inherent category error of importing globally-side-effecting CSS in the first place. |
Why
It should be possible to sort the imports based on their needs.
For example:
I want to have my meteor imports after my node imports but before the rest.
Proposal
Thoughts?
The text was updated successfully, but these errors were encountered: