mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore: 🤖 use simple-import-sort plugin
Use simple-import-sort plugin to enable auto-fix import sort
This commit is contained in:
parent
0eec8042ca
commit
08ae71e70f
@ -1,5 +1,6 @@
|
|||||||
import eslint from "@eslint/js";
|
import eslint from "@eslint/js";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
|
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
||||||
|
|
||||||
export default tseslint.config(
|
export default tseslint.config(
|
||||||
eslint.configs.recommended,
|
eslint.configs.recommended,
|
||||||
@ -16,6 +17,11 @@ export default tseslint.config(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
plugins: {
|
||||||
|
"simple-import-sort": simpleImportSort
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
// add rule overrides here
|
// add rule overrides here
|
||||||
@ -28,7 +34,8 @@ export default tseslint.config(
|
|||||||
varsIgnorePattern: "^_"
|
varsIgnorePattern: "^_"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sort-imports": [ "error", { ignoreCase: false } ]
|
"simple-import-sort/imports": "error",
|
||||||
|
"simple-import-sort/exports": "error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
11
package-lock.json
generated
11
package-lock.json
generated
@ -161,6 +161,7 @@
|
|||||||
"css-loader": "7.1.2",
|
"css-loader": "7.1.2",
|
||||||
"electron": "35.1.4",
|
"electron": "35.1.4",
|
||||||
"eslint": "9.24.0",
|
"eslint": "9.24.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
||||||
"esm": "3.2.25",
|
"esm": "3.2.25",
|
||||||
"globals": "16.0.0",
|
"globals": "16.0.0",
|
||||||
"happy-dom": "17.4.4",
|
"happy-dom": "17.4.4",
|
||||||
@ -10659,6 +10660,16 @@
|
|||||||
"integrity": "sha512-h+y3gq15Hb+7o6VyN/zzkERvfmoAx+wO3l1UJwteCWYPUav0Ffp36j9sb8ZjTi78/nInx7xUHBUYhOT+9xxDMA==",
|
"integrity": "sha512-h+y3gq15Hb+7o6VyN/zzkERvfmoAx+wO3l1UJwteCWYPUav0Ffp36j9sb8ZjTi78/nInx7xUHBUYhOT+9xxDMA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-simple-import-sort": {
|
||||||
|
"version": "12.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz",
|
||||||
|
"integrity": "sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": ">=5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-scope": {
|
"node_modules/eslint-scope": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
|
@ -220,6 +220,7 @@
|
|||||||
"css-loader": "7.1.2",
|
"css-loader": "7.1.2",
|
||||||
"electron": "35.1.4",
|
"electron": "35.1.4",
|
||||||
"eslint": "9.24.0",
|
"eslint": "9.24.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
||||||
"esm": "3.2.25",
|
"esm": "3.2.25",
|
||||||
"globals": "16.0.0",
|
"globals": "16.0.0",
|
||||||
"happy-dom": "17.4.4",
|
"happy-dom": "17.4.4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user