Skip to content

Commit 9a06263

Browse files
committed
improve import-order to be unambiguous by defining all groups
1 parent feb7cf0 commit 9a06263

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

ts.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module.exports = {
22
extends: [
33
'eslint:recommended',
4-
'plugin:@typescript-eslint/strict-type-checked',
54
'plugin:import/recommended',
65
'plugin:import/typescript',
76
'plugin:prettier/recommended'
@@ -27,7 +26,8 @@ module.exports = {
2726
overrides: [
2827
{
2928
extends: [
30-
'plugin:@typescript-eslint/recommended-requiring-type-checking'
29+
'plugin:@typescript-eslint/strict-type-checked',
30+
'plugin:@typescript-eslint/stylistic-type-checked',
3131
],
3232
files: ['./**/*.{ts,tsx}']
3333
}
@@ -47,8 +47,25 @@ module.exports = {
4747
'import/order': [
4848
'error',
4949
{
50-
groups: ['builtin', 'external', 'unknown', 'parent', 'sibling', 'index']
51-
}
50+
groups: [
51+
'builtin',
52+
'external',
53+
'internal',
54+
'unknown',
55+
'parent',
56+
'sibling',
57+
'index',
58+
'object',
59+
'type',
60+
],
61+
alphabetize: {
62+
order: 'asc',
63+
orderImportKind: 'asc',
64+
caseInsensitive: true,
65+
},
66+
'newlines-between': 'never',
67+
warnOnUnassignedImports: true,
68+
},
5269
],
5370
'no-console': [
5471
'error',

0 commit comments

Comments
 (0)