-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
88 lines (88 loc) · 2.65 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
86
87
88
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: [
'./tsconfig.json',
'./src/tsconfig.app.json',
'./src/tsconfig.spec.json',
'./api/tsconfig.json'
],
tsconfigRootDir: __dirname
},
plugins: ['@typescript-eslint'],
root: true,
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
'array-bracket-spacing': 'error',
'arrow-parens': ['error', 'always'],
'arrow-spacing': 'error',
'block-spacing': 'error',
'brace-style': ['error', '1tbs'],
'comma-dangle': ['error', 'never'],
'comma-spacing': 'error',
'comma-style': 'error',
'computed-property-spacing': 'error',
'curly': ['error', 'all'],
'dot-notation': 'error',
'eol-last': 'error',
'eqeqeq': 'error',
'func-call-spacing': ['error', 'never'],
// 'func-style': ['error', 'expression'],
'getter-return': 'error',
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
'key-spacing': 'error',
'keyword-spacing': 'error',
'indent': ['error', 2, {
'SwitchCase': 1
}],
'linebreak-style': 'error',
'lines-between-class-members': ['error', 'always', {
'exceptAfterSingleLine': true
}],
'new-parens': ['error', 'always'],
'no-case-declarations': 'off',
'no-else-return': 'error',
'no-empty': 'error',
// 'no-empty-function': ['error', {
// 'allow': ['constructors']
// }],
'no-extra-boolean-cast': 'off',
'no-extra-semi': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', {
'max': 1,
'maxEOF': 1
}],
'no-prototype-builtins': 'off',
'no-tabs': 'error',
'no-trailing-spaces': 'error',
'no-whitespace-before-property': 'error',
'no-unreachable': 'error',
'no-unused-expressions': ['error', {
'allowTernary': true
}],
'no-var': 'error',
// 'object-curly-newline': ['error', { 'multiline': true }],
'object-curly-spacing': ['error', 'always'],
// 'object-property-newline': 'error',
'padded-blocks': ['error', 'never'],
'prefer-const': 'error',
'quotes': ['error', 'single'],
'semi': ['error', 'always', {
'omitLastInOneLineBlock': false
}],
'semi-spacing': 'error',
'semi-style': ['error', 'last'],
'space-in-parens': ['error', 'never'],
'switch-colon-spacing': 'error'
}
};