-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
42 lines (41 loc) · 1.19 KB
/
eslint.config.mjs
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
import antfu from '@antfu/eslint-config'
export default antfu({
type: 'lib',
stylistic: {
indent: 2,
quotes: 'single',
},
ignores: ['node_modules', '**/node_modules/**', 'node_modules/', '**/node_modules/**/', 'template/**', 'unocss/**', 'index.cjs'],
}, {
rules: {
'spaced-comment': ['error', 'always', { exceptions: ['#__PURE__'] }],
'node/no-callback-literal': 'off',
'import/namespace': 'off',
'eqeqeq': 'off',
'import/default': 'off',
'node/prefer-global/process': 'off',
'ts/explicit-function-return-type': 'off',
'import/no-named-as-default': 'off',
'ts/no-use-before-define': 'off',
'import/no-named-as-default-member': 'off',
'curly': ['error', 'multi-line'],
'style/max-statements-per-line': ['error', {
max: 2,
}],
'max-statements-per-line': ['error', {
max: 2,
}],
},
}, {
files: ['scripts/*.ts', 'src/index.ts'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-restricted-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-redeclare': 'off',
'unused-imports/no-unused-vars': 'off',
},
})