-
Notifications
You must be signed in to change notification settings - Fork 97
/
.eslintrc.js
232 lines (231 loc) · 7.51 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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
module.exports = {
root: true,
overrides: [
{
files: ['webapp/app/**/*', 'webapp/tests/**/*', 'webapp/types/**/*'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './webapp/tsconfig.json'
},
plugins: ['@typescript-eslint', 'ember', 'mirego'],
extends: [
'eslint:recommended',
'plugin:mirego/recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
],
env: {
es6: true,
browser: true
},
globals: {
JsDiff: true
},
rules: {
'complexity': 0,
'no-irregular-whitespace': 0,
'ember/closure-actions': 2,
'ember/named-functions-in-promises': 0,
'ember/new-module-imports': 2,
'ember/no-global-jquery': 2,
'ember/no-on-calls-in-components': 2,
'ember/no-duplicate-dependent-keys': 2,
'ember/no-side-effects': 2,
'ember/avoid-leaking-state-in-ember-objects': 2,
'ember/use-brace-expansion': 2,
'ember/jquery-ember-run': 2,
'ember/order-in-routes': 2,
'ember/order-in-controllers': 2,
'ember/no-empty-attrs': 2,
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/array-type': [2, {default: 'array-simple'}],
'@typescript-eslint/await-thenable': 2,
'@typescript-eslint/consistent-type-assertions': [
2,
{assertionStyle: 'as'}
],
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
'@typescript-eslint/member-delimiter-style': [
2,
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'@typescript-eslint/member-ordering': 0,
'@typescript-eslint/no-empty-interface': 2,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-misused-new': 2,
'@typescript-eslint/no-misused-promises': 2,
'@typescript-eslint/no-non-null-assertion': 2,
'@typescript-eslint/no-parameter-properties': 2,
'@typescript-eslint/no-require-imports': 2,
'@typescript-eslint/no-unnecessary-type-assertion': 2,
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/promise-function-async': 2,
'@typescript-eslint/require-await': 2,
'@typescript-eslint/type-annotation-spacing': 2,
'@typescript-eslint/unified-signatures': 2,
'no-unused-vars': 0,
'no-invalid-this': 0,
}
},
{
files: [
'webapp/.ember-cli.js',
'webapp/.eslintrc.js',
'webapp/.template-lintrc.js',
'webapp/ember-cli-build.js',
'webapp/testem.js',
'webapp/config/**/*.js',
'webapp/lib/*/index.js',
'webapp/scripts/**/*.js',
'webapp/node-server/**/*.js'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: {
'@typescript-eslint/no-require-imports': 0,
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
},
extends: ['plugin:node/recommended']
},
{
files: ['cli/**/*'],
env: {
es6: true
},
globals: {
process: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './cli/tsconfig.json'
},
plugins: ['@typescript-eslint', 'mirego'],
extends: [
'eslint:recommended',
'plugin:mirego/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'complexity': 0,
'no-irregular-whitespace': 0,
'no-unused-vars': 0,
'no-console': 0,
'max-nested-callbacks': [2, {max: 3}],
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/array-type': [2, {default: 'array-simple'}],
'@typescript-eslint/await-thenable': 2,
'@typescript-eslint/consistent-type-assertions': [
2,
{assertionStyle: 'as'}
],
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
'@typescript-eslint/member-delimiter-style': [
2,
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'@typescript-eslint/member-ordering': 2,
'@typescript-eslint/no-empty-interface': 2,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-misused-new': 2,
'@typescript-eslint/no-misused-promises': 2,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-parameter-properties': 2,
'@typescript-eslint/no-require-imports': 2,
'@typescript-eslint/no-unnecessary-type-assertion': 2,
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/promise-function-async': 2,
'@typescript-eslint/require-await': 2,
'@typescript-eslint/type-annotation-spacing': 2,
'@typescript-eslint/unified-signatures': 2,
}
},
{
files: ['jipt/**/*'],
env: {
es6: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './jipt/tsconfig.json'
},
plugins: ['@typescript-eslint', 'mirego'],
extends: [
'eslint:recommended',
'plugin:mirego/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'complexity': 0,
'no-irregular-whitespace': 0,
'no-unused-vars': 0,
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/array-type': [2, {default: 'array-simple'}],
'@typescript-eslint/await-thenable': 2,
'@typescript-eslint/consistent-type-assertions': [
2,
{assertionStyle: 'as'}
],
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
'@typescript-eslint/member-delimiter-style': [
2,
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'@typescript-eslint/member-ordering': 2,
'@typescript-eslint/no-empty-interface': 2,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-misused-new': 2,
'@typescript-eslint/no-misused-promises': 2,
'@typescript-eslint/no-non-null-assertion': 2,
'@typescript-eslint/no-parameter-properties': 2,
'@typescript-eslint/no-require-imports': 2,
'@typescript-eslint/no-unnecessary-type-assertion': 2,
'@typescript-eslint/promise-function-async': 2,
'@typescript-eslint/require-await': 2,
'@typescript-eslint/type-annotation-spacing': 2,
'@typescript-eslint/unified-signatures': 2,
'@typescript-eslint/no-unused-vars': 2
}
}
]
};