More strict `import/order` options
EdJoPaTo opened this issue · 1 comments
Currently import/order
uses the default options. As xo
is a strict config I think there could be some options enabled.
I suggest this config:
"import/order": [
"error",
{
"newlines-between": "never",
"alphabetize": {
"order": "asc",
"orderImportKind": "asc",
"caseInsensitive": true
}
}
]
I think the groups
option already has a good default so it doesnt need to be improved.
newlines-between
should be either never
or always
in my opinion. Both seem fine and both are an improvement over ignore
.
alphabetize
with order
asc
and being caseInsensitive
seem like a good idea. I am not so sure about the value of orderImportKind
but I think some value should be set to be more strict.
newlines-between should be either never or always in my opinion. Both seem fine and both are an improvement over ignore.
👍 Added in fe6db72
alphabetize with order asc and being caseInsensitive seem like a good idea. I am not so sure about the value of orderImportKind but I think some value should be set to be more strict.
Alphabetizing may sound tempting, but I have tried it years ago and it's simply not worth it. It results in a lot of churn and failing lints, with little benefit. It's not something I plan to add.