-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy patheslint.config.mjs
More file actions
53 lines (52 loc) · 1.39 KB
/
Copy patheslint.config.mjs
File metadata and controls
53 lines (52 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import antfu from '@antfu/eslint-config'
export default antfu(
{
formatters: true,
// unocss: true,
vue: true,
typescript: true,
// ignores: [ ],
},
{
// Without `files`, they are general rules for all files
rules: {
'ts/ban-ts-comment': 'off',
'unicorn/prefer-node-protocol': 'off',
'no-console': 'off',
'n/prefer-global/process': 'off',
'pnpm/json-enforce-catalog': 'off',
'unused-imports/no-unused-vars': [
'error',
{
caughtErrors: 'none',
varsIgnorePattern: '^_', // 忽略以 _ 开头的变量
argsIgnorePattern: '^_', // 忽略以 _ 开头的参数
},
],
'perfectionist/sort-imports': [
'error',
{
type: 'alphabetical',
order: 'asc',
ignoreCase: true,
internalPattern: ['^~/', '^/@/', '^@/'],
newlinesBetween: 'never',
maxLineLength: undefined,
groups: [
'type',
['side-effect', 'side-effect-style'],
['builtin', 'external'],
'internal-type',
'internal',
['parent-type', 'sibling-type', 'index-type'],
['parent', 'sibling', 'index'],
'object',
'unknown',
],
customGroups: { type: {}, value: {} },
environment: 'node',
},
],
},
},
)