-
Notifications
You must be signed in to change notification settings - Fork 71
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
Improve default group regexps to make them easier to copy-paste and re-order, and improve grouping docs #47
Comments
@lydell Please help look at this problem |
First problemIt looks like you expect Second problemYou can change Alternatively, you can change CommentsGood idea about improving the default groups, so people can reorder those regexps without being mislead! I will do that in the next release, and look through the docs again. QuestionThe suggested change in |
hi first problemWhen ["^[^.]"] is in front of ["^@?\w"] ,Both["^[^.]"] and ["^@?\w"] can capture ["^[^.]"] has problems in both cases, I think["^[^.]"] should be replaced QuestionNot necessary |
I see. Changing |
Yes, so the default groups and readme documents need to be changed The first way The second way |
I want exclude a specific import from one group to use into another group. {
groups: [
['^react', '^next', '^recoil', '^@?\\w'],
['^styles', '^ui/styles', './styles'],
[
`^(${folders.join('|')})(/.*|$)`,
'^\\.'
],
['^[^.]']
]
} this are my groups, and I want remove |
Hi @tutods! I’m not quite following what you’re trying to do. Can you open a new issue, with some more details and examples? |
Hi, I have some problems sorting by groups.
First problem
Eslint Config
import code
Expected behavior
Actual behavior
So I think the defaultGroups need to be changed, The user should be able to change the import order directly by changing the defaultGroups, but this is not possible now, as this will mislead the user。for example, change it like below:
Second problem
if ["^\u0000"] is at the end of the groups
Eslint Config
** import code **
Expected behavior
Actual behavior
The reason for this problem is that the 【"^[^.]"】 rules and 【["^\u0000"]】 rules coincide
Solution One: change group
Solution Two: change flatMap function; such as:
I think it should be possible to change the import position by changing the parameter position in the default groups, but this is not possible now 🤡
Should change the default groups, and Readme documents 🤠🤠🤠
The text was updated successfully, but these errors were encountered: