-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
55 lines (54 loc) · 1.69 KB
/
eslint.config.js
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
54
55
import antfu from '@antfu/eslint-config';
export default antfu({
ignores: ['*.md', '*.json'],
formatters: true,
stylistic: {
quotes: 'single',
semi: true,
overrides: {
'comma-dangle': ['error', 'always-multiline'],
'jsonc/comma-dangle': ['error', 'always-multiline'],
'style/jsx-sort-props': 'warn',
'arrow-body-style': ['error', 'as-needed'],
'no-restricted-imports': ['error', { patterns: ['../*'] }],
'unused-imports/no-unused-imports': 'warn',
'ts/consistent-type-definitions': ['error', 'interface'],
'ts/explicit-function-return-type': 'off',
'style/arrow-parens': ['error', 'always'],
},
},
typescript: {
parserOptions: {
project: './tsconfig.json',
projectService: true,
},
overrides: {
'ts/consistent-type-definitions': ['error', 'type'],
'ts/explicit-function-return-type': ['error'],
'ts/explicit-member-accessibility': ['error'],
'ts/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
},
],
'ts/no-floating-promises': ['error'],
'ts/no-misused-promises': ['error'],
'ts/no-confusing-void-expression': ['error'],
'ts/strict-boolean-expressions': ['error'],
'ts/switch-exhaustiveness-check': ['error'],
'ts/array-type': ['error', { default: 'array-simple' }],
'ts/no-restricted-types': ['error', { types: { Omit: 'Use `OmitStrict`.' } }],
'ts/no-unsafe-argument': 'error',
},
},
rules: {
'antfu/no-top-level-await': 'off',
},
react: {
overrides: {
'react-refresh/only-export-components': 'off',
},
},
});