Skip to content

Commit

Permalink
eslint config: Remove import order rules (#950)
Browse files Browse the repository at this point in the history
I suggest we remove this rule and instead rely on VS Codes "Organize Imports" which can be done on save https://eshlox.net/2019/12/02/vscode-automatically-organize-typescript-imports/
  • Loading branch information
tordans authored Jan 19, 2022
1 parent 054d8f6 commit b9cde7b
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@

"react/function-component-definition": [
1,
{ "namedComponents": "arrow-function",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
Expand All @@ -117,28 +118,7 @@
// auto completion for imports and prevent inconsistent naming conventions
// across modules.
"import/prefer-default-export": ["off"],

// Import order is fixed for easier scanning of imports and to prevent
// file changes from changed import order.
//
// This configuration separates sources specified in `groups` with newlines
// and sorts moves imports from `~` into the `internal` group.
"import/order": [
"warn",
{
"alphabetize": { "order": "asc" },
"groups": [
"builtin",
"external",
["sibling", "parent", "internal"],
"index"
],
"newlines-between": "always",
"pathGroups": [
{ "pattern": "~/**", "group": "internal", "position": "before" }
]
}
]
"import/order": "off" // Turned off; we use VSCode's sort "Organize Imports" instead
},

"env": {
Expand Down

0 comments on commit b9cde7b

Please sign in to comment.