Skip to content

Commit 56665f1

Browse files
committed
style: use @sumimakito integrated perfectionist/sort-imports
1 parent 47f5490 commit 56665f1

File tree

4 files changed

+16
-314
lines changed

4 files changed

+16
-314
lines changed

build.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { copyFile, rm } from 'node:fs/promises'
22
import { join } from 'node:path'
33
import { cwd } from 'node:process'
4+
45
import builtins from 'builtin-modules'
56
import { defineBuildConfig } from 'unbuild'
67

eslint.config.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import antfu from '@antfu/eslint-config'
2-
import { importX } from 'eslint-plugin-import-x'
32

43
export default antfu({
54
ignores: [
@@ -8,22 +7,27 @@ export default antfu({
87
'**/*.yml',
98
],
109
rules: {
11-
'ts/ban-ts-comment': 'off',
10+
'import/order': 'off',
1211
'antfu/import-dedupe': 'error',
1312
'style/padding-line-between-statements': 'error',
14-
'import-x/order': [
13+
'perfectionist/sort-imports': [
1514
'error',
1615
{
17-
'groups': [
18-
['type'],
19-
['builtin', 'external'],
20-
['parent', 'sibling', 'index'],
16+
groups: [
17+
'type-builtin',
18+
'type-import',
19+
'type-internal',
20+
['type-parent', 'type-sibling', 'type-index'],
21+
'value-builtin',
22+
'value-external',
23+
'value-internal',
24+
['value-parent', 'value-sibling', 'value-index'],
25+
['wildcard-value-parent', 'wildcard-value-sibling', 'wildcard-value-index'],
26+
'side-effect',
27+
'style',
2128
],
22-
'newlines-between': 'always',
29+
newlinesBetween: 'always',
2330
},
2431
],
2532
},
26-
plugins: {
27-
'import-x': importX,
28-
},
2933
})

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"builtin-modules": "^5.0.0",
5050
"bumpp": "^10.1.1",
5151
"eslint": "^9.28.0",
52-
"eslint-plugin-import-x": "^4.15.1",
5352
"magic-string": "^0.30.17",
5453
"obsidian": "^1.8.7",
5554
"ofetch": "^1.4.1",

0 commit comments

Comments
 (0)