Skip to content

Commit ba47329

Browse files
committed
feat(perfectionist): update some rules
1 parent 51a1460 commit ba47329

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/configs/disables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { GLOB_DTS, GLOB_SRC, GLOB_SRC_EXT } from '../constants/glob'
22
import type { TypedFlatConfigItem } from '../types'
33

4-
export async function disables(): Promise<TypedFlatConfigItem[]> {
4+
export function disables(): TypedFlatConfigItem[] {
55
return [
66
{
77
files: [`scripts/${GLOB_SRC}`],

src/configs/perfectionist.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ export function perfectionist(): TypedFlatConfigItem[] {
1414
perfectionist: pluginPerfectionist,
1515
},
1616
rules: {
17+
'perfectionist/sort-exports': ['error', { order: 'asc', type: 'natural' }],
1718
'perfectionist/sort-imports': [
1819
'warn',
1920
{
2021
groups: [
2122
'builtin',
2223
'external',
23-
'internal',
24-
'internal-type',
25-
'parent',
26-
'parent-type',
27-
'sibling',
28-
'sibling-type',
29-
'index',
30-
'index-type',
31-
'object',
3224
'type',
25+
['internal', 'internal-type'],
26+
['parent', 'sibling', 'index'],
27+
['parent-type', 'sibling-type', 'index-type'],
28+
'object',
3329
'side-effect',
3430
'side-effect-style',
31+
'style',
32+
'unknown',
3533
],
3634
internalPattern: ['~/**', '@/**', '#**'],
3735
newlinesBetween: 'ignore',
36+
order: 'asc',
37+
type: 'natural',
3838
},
3939
],
4040
'perfectionist/sort-named-exports': [
4141
'warn',
42-
{ groupKind: 'values-first' },
42+
{ groupKind: 'values-first', order: 'asc', type: 'natural' },
4343
],
4444
'perfectionist/sort-named-imports': [
4545
'warn',
46-
{ groupKind: 'values-first' },
46+
{ groupKind: 'values-first', order: 'asc', type: 'natural' },
4747
],
4848
},
4949
},

0 commit comments

Comments
 (0)