-
Notifications
You must be signed in to change notification settings - Fork 99
/
.eslintrc
154 lines (154 loc) · 5.41 KB
/
.eslintrc
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"overrides": [
{
"files": [
"*.ts"
],
"plugins": [
"import",
"@typescript-eslint",
"sonarjs"
],
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:sonarjs/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"max-len": [
"error",
{
"code": 140
}
],
"no-console": "error",
"no-else-return": "error",
"no-lonely-if": "error",
"no-return-await": "error",
"no-unused-expressions": "error",
"no-useless-return": "error",
"no-restricted-imports": [
"error",
{
"patterns": [
"rxjs/*",
"!rxjs/operators"
],
"paths": [
{
"name": "@ngrx/store",
"importNames": [
"props"
],
"message": "Import \"props\" from \"src/shared/ngrx-util\" instead."
},
{
"name": "@ngrx/effects",
"importNames": [
"ofType"
],
"message": "Import \"ofType\" from \"src/shared/ngrx-util-of-type\" instead."
}
]
}
],
"prefer-destructuring": "error",
"semi": "warn",
"import/no-unresolved": "off",
"import/no-relative-parent-imports": "error",
"sonarjs/prefer-immediate-return": "off",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-nested-template-literals": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
],
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true
}
]
}
},
{
"extends": [
// TODO activate "plugin:ngrx/recommended"
// "plugin:ngrx/recommended",
"plugin:@angular-eslint/recommended"
],
"files": [
"./src/web/browser-window/**/*.ts"
],
"rules": {
"quotes": [
2,
"double",
{
"allowTemplateLiterals": true
}
],
"@typescript-eslint/member-ordering": "off",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "electron-mail",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "electron-mail",
"style": "kebab-case"
}
]
}
},
{
"files": [
"./src/web/browser-window/**/*.component.html"
],
"parser": "@angular-eslint/template-parser",
"plugins": [
"@angular-eslint/template"
],
"rules": {
"@angular-eslint/template/banana-in-a-box": "error",
"@angular-eslint/template/cyclomatic-complexity": "error",
"@angular-eslint/template/no-call-expression": "error",
"@angular-eslint/template/no-negated-async": "error",
"@angular-eslint/template/i18n": [
"error",
{
"checkId": false,
"checkText": true,
"checkAttributes": true,
"ignoreAttributes": [
"field",
"identifier"
]
}
]
}
}
]
}