-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
59 lines (59 loc) · 1.48 KB
/
.eslintrc.cjs
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
56
57
58
59
module.exports = {
root: true,
extends: [
'eslint:recommended',
],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
rules: {
'comma-dangle': ['error', 'always-multiline'],
indent: ['error', 'tab', { SwitchCase: 1 }],
'no-console': 'warn',
'no-warning-comments': ['warn', { terms: ['TODO', 'FIXME', 'XXX'], location: 'start' }],
quotes: ['error', 'single'],
'quote-props': ['error', 'as-needed'],
semi: ['error', 'always'],
},
overrides: [
{
files: ['**/.eslintrc.js', '**/.eslintrc.cjs'],
env: {
node: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
{
files: ['**/*.ts'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-explicit-any': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
semi: 'off',
'@typescript-eslint/semi': 'error',
},
},
{
files: ['**/*.ts'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'],
rules: {
'@typescript-eslint/switch-exhaustiveness-check': 'error',
},
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './examples/basic/tsconfig.json'],
},
},
],
};