Skip to content

Commit f52f7b9

Browse files
authored
Sort imports with dprint instead of eslint (#58058)
1 parent 4386501 commit f52f7b9

File tree

5 files changed

+13
-42
lines changed

5 files changed

+13
-42
lines changed

.dprint.jsonc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@
2323
"constructorType.spaceAfterNewKeyword": true,
2424
"constructSignature.spaceAfterNewKeyword": true,
2525

26-
// Let eslint-plugin-simple-import-sort handle this.
27-
"module.sortImportDeclarations": "maintain",
28-
"module.sortExportDeclarations": "maintain",
29-
"exportDeclaration.sortNamedExports": "maintain",
30-
"importDeclaration.sortNamedImports": "maintain"
26+
"module.sortImportDeclarations": "caseInsensitive",
27+
"module.sortExportDeclarations": "caseInsensitive",
28+
"exportDeclaration.sortNamedExports": "caseInsensitive",
29+
"importDeclaration.sortNamedImports": "caseInsensitive"
3130
},
3231
"prettier": {
3332
"newLineKind": "lf",
@@ -53,7 +52,8 @@
5352
"tests/**",
5453
"internal/**",
5554
"**/*.generated.*",
56-
"scripts/*.d.*"
55+
"scripts/*.d.*",
56+
"**/_namespaces/**"
5757
],
5858
// Note: if adding new languages, make sure settings.template.json is updated too.
5959
"plugins": [

.eslintrc.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"plugins": [
1919
"@typescript-eslint",
2020
"no-null",
21-
"eslint-plugin-local",
22-
"simple-import-sort"
21+
"eslint-plugin-local"
2322
],
2423
"ignorePatterns": [
2524
"**/node_modules/**",
@@ -136,11 +135,7 @@
136135
"local/jsdoc-format": "error",
137136

138137
// eslint-plugin-no-null
139-
"no-null/no-null": "error",
140-
141-
// eslint-plugin-simple-import-sort
142-
"simple-import-sort/imports": "error",
143-
"simple-import-sort/exports": "error"
138+
"no-null/no-null": "error"
144139
},
145140
"overrides": [
146141
// By default, the ESLint CLI only looks at .js files. But, it will also look at
@@ -167,14 +162,6 @@
167162
{ "name": "exports" }
168163
]
169164
}
170-
},
171-
{
172-
// These files contain imports in a specific order that are generally unsafe to modify.
173-
"files": ["**/_namespaces/**"],
174-
"rules": {
175-
"simple-import-sort/imports": "off",
176-
"simple-import-sort/exports": "off"
177-
}
178165
}
179166
]
180167
}

.vscode/settings.template.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,20 @@
1818
".git-blame-ignore-revs"
1919
],
2020

21-
// Match eslint-plugin-simple-import-sort in organize/auto-imports.
21+
// Match dprint in organize/auto-imports.
2222
"typescript.unstable": {
2323
"organizeImportsCollation": "unicode",
2424
"organizeImportsCaseFirst": "upper",
2525
"organizeImportsIgnoreCase": false,
26-
"organizeImportsNumericCollation": true
26+
"organizeImportsNumericCollation": true,
27+
"organizeImportsTypeOrder": "inline"
2728
},
2829
"javascript.unstable": {
2930
"organizeImportsCollation": "unicode",
3031
"organizeImportsCaseFirst": "upper",
3132
"organizeImportsIgnoreCase": false,
32-
"organizeImportsNumericCollation": true
33+
"organizeImportsNumericCollation": true,
34+
"organizeImportsTypeOrder": "inline"
3335
},
3436

3537
// These options search the repo recursively and slow down

package-lock.json

Lines changed: 0 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"eslint-formatter-autolinkable-stylish": "^1.3.0",
6565
"eslint-plugin-local": "^4.2.1",
6666
"eslint-plugin-no-null": "^1.0.2",
67-
"eslint-plugin-simple-import-sort": "^12.0.0",
6867
"fast-xml-parser": "^4.3.6",
6968
"glob": "^10.3.10",
7069
"hereby": "^1.8.9",

0 commit comments

Comments
 (0)