/
.eslintrc.cjs
85 lines (85 loc) · 3.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* eslint-env node */
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
'overrides': [
{
'files': ['*.ts', '*.tsx'],
'extends': [
],
'parserOptions': {
'project': ['./tsconfig.json'],
'ecmaVersion': 'latest',
'sourceType': 'module',
'tsconfigRootDir': __dirname
},
'rules': {
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/indent': ['warn', 4, { 'SwitchCase': 1 }],
'@typescript-eslint/member-delimiter-style': ['warn', {
'multiline': {
'delimiter': 'none',
'requireLast': true
},
'multilineDetection': 'brackets',
'singleline': {
'delimiter': 'semi',
'requireLast': false
}
}],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/prefer-function-type': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/promise-function-async': 'warn',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/return-await': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'arrow-parens': ['warn', 'as-needed'],
'comma-dangle': ['warn', 'never'],
'eol-last': ['warn', 'always'],
'indent': ['warn', 4, { 'SwitchCase': 1 }],
'jsx-quotes': ['warn', 'prefer-single'],
'max-len': ['warn', 160],
'multiline-ternary': 'off',
'no-empty-pattern': 'off',
'no-trailing-spaces': 'warn',
'no-void': 'off',
'no-whitespace-before-property': 'off',
'padded-blocks': 'off',
'prefer-arrow-callback': 'warn',
'quotes': ['warn', 'single'],
'semi': ['warn', 'never'],
'no-mixed-operators': 'off'
}
},
{
'files': ['*.js'],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'rules': {
'arrow-parens': ['warn', 'as-needed'],
'comma-dangle': ['warn', 'never'],
'eol-last': ['warn', 'always'],
'indent': ['warn', 4, { 'SwitchCase': 1 }],
'max-len': ['warn', 160],
'multiline-ternary': 'off',
'no-empty-pattern': 'off',
'no-trailing-spaces': 'warn',
'no-void': 'off',
'no-whitespace-before-property': 'off',
'padded-blocks': 'off',
'prefer-arrow-callback': 'warn',
'quotes': ['warn', 'single'],
'semi': ['warn', 'never']
}
}
]
};