-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.js
53 lines (52 loc) · 1.19 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
import antfu from '@antfu/eslint-config';
/* Using custom configuration of Antfu's code style: https://github.com/antfu/eslint-config */
export default antfu(
{
typescript: {
tsconfigPath: 'tsconfig.json',
},
stylistic: {
quotes: 'single',
},
ignores: [
'**/dist',
'.idea',
'**/__fixtures__',
'eslint.config.js'
],
overrides: {
typescript: {
'ts/consistent-type-definitions': ['error', 'type'],
'ts/no-unsafe-assignment': 'warn',
'ts/no-unsafe-member-access': 'warn',
'ts/strict-boolean-expressions': 'warn'
},
},
}, {
rules: {
'style/indent': ['error', 'tab', {
SwitchCase: 1,
}],
'style/no-tabs': ['error', { allowIndentationTabs: true }],
'style/no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
'style/array-bracket-newline': ['error', { multiline : true }],
'style/array-element-newline': ['error', 'consistent'],
'style/semi': ['error', 'always'],
},
}, {
files: ['tsconfig.json', 'package.json'],
rules: {
'jsonc/sort-keys': 'off',
},
}, {
files: ['**/*.md'],
rules: {
'style/no-trailing-spaces': 'warn'
}
}, {
files: ['__tests__/**/*.test.ts'],
rules: {
'ts/no-unsafe-call': 'off'
}
}
);