-
-
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 internal to default order groups to match docs #635
Conversation
Didn't realize this had been discussed previously in #608 |
Yeah, though now that it has been independently re-suggested, I'm tempted to re-discuss. @jfmengels: after reflecting on this, it feels like users fall into two major groups:
@mudetroit, am I correct in assuming you're in the latter group? |
@benmosher yes my current team falls into the later group, and I would surmise that a fair number of the webpack community does. Internal modules, are pretty easy to do with webpack, and avoid a whole class of problem with deeply nested relative pathing. |
I work with @mudetroit. We have an internal component library which we previously linked into If you want to bring the docs and code into alignment with the least disruption for everyone, it seems like you could use the following as a default order: 'import/order': [ 'error', { groups: [ 'builtin', [ 'external', 'internal' ], 'parent', 'sibling', 'index' ] } ] This is already the de facto default for anyone not using Webpack, and would avoid linting errors when people switch to webpack with internal modules like we did. |
Yes, that sounds right. I originally proposed to fix the code #608, but as @ljharb mentionned, as the rule has always been this way since its introduction, this would probably be a breaking change. Therefore I made another PR #623 to fix the docs instead. I think that the best course of action would be to fix the docs, and change the default settings in the next major release (which we could do sooner or later). I originally thought that the default groups would be |
@jfmengels actually yeah, a v3 with this + #479 fixed would be ideal, I suppose |
Quick little bug fix we ran across recently. The docs list the default value for order groups as : ["builtin", "external", "internal", "parent", "sibling", "index"].
But that wasn't matched in the code This simply makes it match..
fixes #601