-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
103 lines (95 loc) · 2.02 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
module.exports = {
ignorePatterns: [
'dist',
'node_modules',
'.nyc_output',
'coverage',
'reports',
'.md-check',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
experimentalDecorators: true,
experimentalObjectRestSpread: true,
},
},
env: {
node: 12,
commonjs: true,
es2020: true,
browser: false,
mocha: true,
},
plugins: [
'mocha',
'md',
'markdown',
'@typescript-eslint',
'optimize-regex',
'sonarjs',
'no-secrets',
'security',
'editorconfig',
'json',
],
extends: [
'eslint:recommended',
'plugin:json/recommended',
'plugin:md/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:sonarjs/recommended',
'plugin:security/recommended',
'plugin:editorconfig/noconflict',
'plugin:mdx/recommended',
],
overrides: [
{
files: ['*.js', '*.md', '*.mdx'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['*.spec.ts', '*.e2e.ts'],
rules: {
'mdx/no-unused-expressions': 'off',
},
},
],
rules: {
quotes: ['warn', 'single'],
// TYPESCRIPT
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-ignore': 'warn',
'@typescript-eslint/no-this-alias': 'off',
// SECURITY
'no-secrets/no-secrets': 'error',
'security/detect-object-injection': 'off',
// SONAR
'sonarjs/cognitive-complexity': 'warn',
// OTHER
'optimize-regex/optimize-regex': 'warn',
'@typescript-eslint/ban-types': [
'error',
{
types: {
String: {
message: 'Use string instead',
fixWith: 'string',
},
Boolean: {
message: 'Use boolean instead',
fixWith: 'boolean',
},
Number: {
message: 'Use number instead',
fixWith: 'number',
},
},
},
],
},
};