Skip to content

Commit 003bdfb

Browse files
committed
chore: add eslint-import-x
1 parent 0349825 commit 003bdfb

31 files changed

Lines changed: 442 additions & 63 deletions

eslint.config.mjs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import wdioEslint from '@wdio/eslint'
21
import vitest from '@vitest/eslint-plugin'
2+
import wdioEslint from '@wdio/eslint'
3+
import * as pluginImportX from 'eslint-plugin-import-x'
34

45
export default wdioEslint.config([
56
{
@@ -12,6 +13,9 @@ export default wdioEslint.config([
1213
files: ['**/*.ts'],
1314
},
1415
{
16+
plugins: {
17+
'import-x': pluginImportX,
18+
},
1519
rules: {
1620
'@typescript-eslint/no-explicit-any': 'off',
1721
'@typescript-eslint/naming-convention': [
@@ -23,6 +27,16 @@ export default wdioEslint.config([
2327
],
2428
'@stylistic/indent': ['error', 4, { SwitchCase: 1 }],
2529
'no-throw-literal': 'warn',
30+
'import-x/order': [
31+
'error',
32+
{
33+
groups: ['builtin', 'external', ['sibling', 'parent'], 'type'],
34+
alphabetize: { order: 'asc' },
35+
sortTypesGroup: true,
36+
'newlines-between': 'always',
37+
'newlines-between-types': 'ignore',
38+
},
39+
],
2640
},
2741
},
2842
{

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
"chai": "^5.2.0",
128128
"esbuild": "^0.25.1",
129129
"eslint": "^9.23.0",
130+
"eslint-plugin-import-x": "^4.10.6",
130131
"glob": "^11.0.1",
131132
"husky": "^9.1.7",
132133
"jest-mock-vscode": "^4.3.1",
@@ -155,7 +156,8 @@
155156
"pnpm": {
156157
"onlyBuiltDependencies": [
157158
"edgedriver",
158-
"geckodriver"
159+
"geckodriver",
160+
"unrs-resolver"
159161
]
160162
},
161163
"lint-staged": {

0 commit comments

Comments
 (0)