-
-
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
Add "unassigned" to importType for order rule #970
Comments
This seems reasonable; altho I’d call them “side-effecting” or something instead of just “unassigned”. A use case that isn’t deprecated (ie, that doesn’t involve bower) would be shimming/polyfilling. |
Unassigned imports are ignored now. In our project, there are some unassigned style imports. We think there should rank last to keep code clean. We need to config it. |
@lext-7 they, in fact, should always be first since they typically have side effects. |
In React apps it is better to import CSS last as it is more efficient way to override public styles of imported child components. The selectors may have the same priority. So to avoid the situation when the parent can't override appearance of child components the styles should always be imported at the very end of import list in every component |
@ljharb As I described above sometimes it may be important. Preserving the necessary order for the particular project may be highly necessary. "pathGroups": [
{
"pattern": "{.,..}/**/*.+(css|sass|less|scss|pcss|styl)",
"unnamed": true, // this is a new option
"group": "unknown",
"position": "after"
}
] |
@constgen that seems reasonable. |
I would like to group and order unassigned imports. This specific use case is for importing Polymer 2 html elements with polymer-webpack-loader.
The proposed
.eslintrc
to achieve the above style would beAt the moment unassigned imports are completely ignored.
The text was updated successfully, but these errors were encountered: