-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
107 lines (107 loc) · 3.9 KB
/
.eslintrc.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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: [
'@typescript-eslint/eslint-plugin',
'sonarjs',
"unicorn"
],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:sonarjs/recommended',
'plugin:unicorn/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': ["off"],
indent: ["error", 4],
'linebreak-style': 0,
'quotes': ['error', 'single', {'avoidEscape': true}],
'semi': ['error', 'always'],
'no-console': ['off'],
'no-constant-condition': ['error', { 'checkLoops': false }],
'curly': ['error'],
'eqeqeq': ['error'],
'guard-for-in': ['error'],
'no-caller': ['error'],
'no-global-assign': ['error'],
'no-implicit-coercion': ['error'],
'no-magic-numbers': ['warn', {'ignore': [0, 1, -1]}],
'no-multi-spaces': ['off'],
'no-multi-str': ['error'],
'no-sequences': ['error'],
"object-curly-spacing": [2, "always"],
'no-return-await': ['error'],
'no-throw-literal': ['error'],
'no-useless-escape': ['error'],
'no-useless-concat': ['error'],
'no-with': ['error'],
'require-await': ['off'],
'strict': ['error', 'global'],
'yoda': ['error'],
'no-shadow': ['warn'],
'no-shadow-restricted-names': ['error'],
'no-undef-init': ['error'],
'no-unused-vars': ['error', {'vars': 'all', 'args': 'none'}],
'callback-return': ['error', ['callback', 'cb', 'done', 'next', 'res.send', 'res.view', 'reply', 'reply.view']],
'global-require': ['error'],
'array-bracket-spacing': ['error', 'never'],
'block-spacing': ['error', 'always'],
'brace-style': ["error", "stroustrup", { "allowSingleLine": false }],
// 'camelcase': ['error', {'properties': 'never'}],
'comma-spacing': ['error'],
'computed-property-spacing': ['error'],
'key-spacing': ['error', {'singleLine': {'beforeColon': false, 'afterColon': true}, 'multiLine': {'align': 'value'}}],
'consistent-this': ['error'],
'eol-last': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'keyword-spacing': ['error'],
'lines-around-comment': ['error', {'beforeBlockComment': true, 'beforeLineComment': true, 'allowBlockStart': true, 'allowObjectStart': true, 'allowArrayStart': true}],
'max-depth': ['error', 4],
'max-len': ['warn', 150],
'max-params': ['warn', 10],
'new-cap': ['off'],
'new-parens': ['error'],
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
'no-multiple-empty-lines': ['error', {'max': 2}],
'no-nested-ternary': ['error'],
'no-trailing-spaces': ['error'],
'no-undef': ['off'],
'no-whitespace-before-property': ['error'],
'one-var': ['error', 'never'],
'padded-blocks': ['off'],
'semi-spacing': ['error'],
'space-before-blocks': ['error'],
'space-before-function-paren': ['error'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': ['error'],
'spaced-comment': ['error', 'always'],
'arrow-body-style': ['error', 'always'],
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error'],
'no-var': ['warn'],
'prefer-rest-params': ['error'],
'prefer-spread': ['error'],
"comma-dangle": ["error", "always-multiline"],
'unicorn/prevent-abbreviations': ['off'],
'unicorn/consistent-destructuring': ['off'],
'unicorn/filename-case': ['off'],
'unicorn/no-null': ['off'],
'unicorn/better-regex': ['off'],
'unicorn/no-array-callback-reference': ['off'],
'sonarjs/no-duplicate-string': ['off'],
'sonarjs/cognitive-complexity': ['warn']
},
};