Skip to content

Commit

Permalink
Update eslint-plugin-import
Browse files Browse the repository at this point in the history
2.28.0 introduced a breaking change to `import/order` where the order
of nested groups (whose purpose is to define different types of imports
that are of equivalent rank) started to matter: a single nested group
would be treated as though it wasn't nested

We [got around this][1] by adding a second nested group with most if
not all of the other import types we use

I [fixed the bug][2] in eslint-plugin-import 💅🏻 and this was released in
2.28.1, so we can now revert to the simpler config post-upgrade

[1]: ab5a73e
[2]: import-js/eslint-plugin-import#2854
  • Loading branch information
yndajas committed Aug 31, 2023
1 parent ff57b0d commit ff63b5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@
"error",
{
"alphabetize": { "order": "asc", "orderImportKind": "asc" },
"groups": [
["builtin", "external"],
["internal", "parent", "sibling"]
],
"groups": [["builtin", "external"]],
"newlines-between": "always"
}
],
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-cypress": "^2.13.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-sort-exports": "^0.8.0",
Expand Down

0 comments on commit ff63b5e

Please sign in to comment.