mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Sort imports with dprint instead of eslint (#58058)
This commit is contained in:
parent
4386501285
commit
f52f7b9f90
@ -23,11 +23,10 @@
|
||||
"constructorType.spaceAfterNewKeyword": true,
|
||||
"constructSignature.spaceAfterNewKeyword": true,
|
||||
|
||||
// Let eslint-plugin-simple-import-sort handle this.
|
||||
"module.sortImportDeclarations": "maintain",
|
||||
"module.sortExportDeclarations": "maintain",
|
||||
"exportDeclaration.sortNamedExports": "maintain",
|
||||
"importDeclaration.sortNamedImports": "maintain"
|
||||
"module.sortImportDeclarations": "caseInsensitive",
|
||||
"module.sortExportDeclarations": "caseInsensitive",
|
||||
"exportDeclaration.sortNamedExports": "caseInsensitive",
|
||||
"importDeclaration.sortNamedImports": "caseInsensitive"
|
||||
},
|
||||
"prettier": {
|
||||
"newLineKind": "lf",
|
||||
@ -53,7 +52,8 @@
|
||||
"tests/**",
|
||||
"internal/**",
|
||||
"**/*.generated.*",
|
||||
"scripts/*.d.*"
|
||||
"scripts/*.d.*",
|
||||
"**/_namespaces/**"
|
||||
],
|
||||
// Note: if adding new languages, make sure settings.template.json is updated too.
|
||||
"plugins": [
|
||||
|
||||
@ -18,8 +18,7 @@
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"no-null",
|
||||
"eslint-plugin-local",
|
||||
"simple-import-sort"
|
||||
"eslint-plugin-local"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"**/node_modules/**",
|
||||
@ -136,11 +135,7 @@
|
||||
"local/jsdoc-format": "error",
|
||||
|
||||
// eslint-plugin-no-null
|
||||
"no-null/no-null": "error",
|
||||
|
||||
// eslint-plugin-simple-import-sort
|
||||
"simple-import-sort/imports": "error",
|
||||
"simple-import-sort/exports": "error"
|
||||
"no-null/no-null": "error"
|
||||
},
|
||||
"overrides": [
|
||||
// By default, the ESLint CLI only looks at .js files. But, it will also look at
|
||||
@ -167,14 +162,6 @@
|
||||
{ "name": "exports" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
// These files contain imports in a specific order that are generally unsafe to modify.
|
||||
"files": ["**/_namespaces/**"],
|
||||
"rules": {
|
||||
"simple-import-sort/imports": "off",
|
||||
"simple-import-sort/exports": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
8
.vscode/settings.template.json
vendored
8
.vscode/settings.template.json
vendored
@ -18,18 +18,20 @@
|
||||
".git-blame-ignore-revs"
|
||||
],
|
||||
|
||||
// Match eslint-plugin-simple-import-sort in organize/auto-imports.
|
||||
// Match dprint in organize/auto-imports.
|
||||
"typescript.unstable": {
|
||||
"organizeImportsCollation": "unicode",
|
||||
"organizeImportsCaseFirst": "upper",
|
||||
"organizeImportsIgnoreCase": false,
|
||||
"organizeImportsNumericCollation": true
|
||||
"organizeImportsNumericCollation": true,
|
||||
"organizeImportsTypeOrder": "inline"
|
||||
},
|
||||
"javascript.unstable": {
|
||||
"organizeImportsCollation": "unicode",
|
||||
"organizeImportsCaseFirst": "upper",
|
||||
"organizeImportsIgnoreCase": false,
|
||||
"organizeImportsNumericCollation": true
|
||||
"organizeImportsNumericCollation": true,
|
||||
"organizeImportsTypeOrder": "inline"
|
||||
},
|
||||
|
||||
// These options search the repo recursively and slow down
|
||||
|
||||
17
package-lock.json
generated
17
package-lock.json
generated
@ -38,7 +38,6 @@
|
||||
"eslint-formatter-autolinkable-stylish": "^1.3.0",
|
||||
"eslint-plugin-local": "^4.2.1",
|
||||
"eslint-plugin-no-null": "^1.0.2",
|
||||
"eslint-plugin-simple-import-sort": "^12.0.0",
|
||||
"fast-xml-parser": "^4.3.6",
|
||||
"glob": "^10.3.10",
|
||||
"hereby": "^1.8.9",
|
||||
@ -2100,15 +2099,6 @@
|
||||
"eslint": ">=3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-simple-import-sort": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.0.0.tgz",
|
||||
"integrity": "sha512-8o0dVEdAkYap0Cn5kNeklaKcT1nUsa3LITWEuFk3nJifOoD+5JQGoyDUW2W/iPWwBsNBJpyJS9y4je/BgxLcyQ==",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"eslint": ">=5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-scope": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
|
||||
@ -5905,13 +5895,6 @@
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"eslint-plugin-simple-import-sort": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.0.0.tgz",
|
||||
"integrity": "sha512-8o0dVEdAkYap0Cn5kNeklaKcT1nUsa3LITWEuFk3nJifOoD+5JQGoyDUW2W/iPWwBsNBJpyJS9y4je/BgxLcyQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
|
||||
|
||||
@ -64,7 +64,6 @@
|
||||
"eslint-formatter-autolinkable-stylish": "^1.3.0",
|
||||
"eslint-plugin-local": "^4.2.1",
|
||||
"eslint-plugin-no-null": "^1.0.2",
|
||||
"eslint-plugin-simple-import-sort": "^12.0.0",
|
||||
"fast-xml-parser": "^4.3.6",
|
||||
"glob": "^10.3.10",
|
||||
"hereby": "^1.8.9",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user