-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
120 lines (120 loc) · 3.82 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
108
109
110
111
112
113
114
115
116
117
118
119
120
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint/eslint-plugin', 'jest-formatting', 'sonarjs'],
extends: [
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest-formatting/recommended',
'plugin:sonarjs/recommended',
"eslint:recommended"
],
root: true,
env: {
node: true,
jest: true
},
overrides: [
{
files: ['*.e2e-spec.ts', 'country.helper.ts', '*.spec.ts'],
rules: {
'max-lines-per-function': 'off',
'max-lines': 'off'
}
},
{
files: ['*.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'error'
}
}
],
ignorePatterns: ['.eslintrc.js'],
rules: {
'jest-formatting/padding-around-after-all-blocks': 2,
'jest-formatting/padding-around-after-each-blocks': 2,
'jest-formatting/padding-around-test-blocks': 2,
'jest-formatting/padding-around-describe-blocks': 2,
'jest-formatting/padding-around-before-all-blocks': 2,
'jest-formatting/padding-around-before-each-blocks': 2,
'max-lines': [
'error',
{
max: 400,
skipComments: true
}
],
'max-lines-per-function': [
'error',
{
max: 70,
skipComments: true
}
],
'@typescript-eslint/naming-convention': [
'error',
{ selector: 'enumMember', format: ['UPPER_CASE'] },
{
selector: ['objectLiteralProperty'],
format: ['camelCase', 'PascalCase', 'UPPER_CASE']
},
{
selector: [
'parameter',
'variable',
'function',
'classProperty',
'typeProperty',
'parameterProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod'
],
format: ['camelCase']
},
{
selector: ['class', 'interface', 'enum'],
format: ['PascalCase']
},
{
selector: ['variable'],
modifiers: ['exported'],
format: ['PascalCase', 'camelCase', 'UPPER_CASE']
},
{
selector: ['function'],
modifiers: ['exported'],
format: ['PascalCase', 'camelCase']
}
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
indent: 'off',
'prettier/prettier': [
'error',
{
singleQuote: true,
printWidth: 120,
proseWrap: "always",
tabWidth: 4,
useTabs: false,
trailingComma: "none",
bracketSpacing: true,
jsxBracketSameLine: false,
semi: true,
endOfLine: "auto"
}
],
'prefer-const': 'off',
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'sonarjs/no-duplicate-string': 'warn'
}
};