@oriflame/config-eslint 4.2.3 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +2 -81
- package/dts/index.d.ts +10 -0
- package/lib/index.js +45 -40
- package/lib/index.js.map +1 -0
- package/package.json +37 -30
- package/src/index.ts +21 -27
- package/CHANGELOG.md +0 -3605
- package/lib/index.d.ts +0 -10
- package/lib/index.d.ts.map +0 -1
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.d.ts +0 -4
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.d.ts.map +0 -1
- package/lib/presets/SECRET_CONFIG_DO_NOT_USE_THIS.js +0 -32
- package/lib/presets/base.d.ts +0 -4
- package/lib/presets/base.d.ts.map +0 -1
- package/lib/presets/base.js +0 -120
- package/lib/presets/future.d.ts +0 -4
- package/lib/presets/future.d.ts.map +0 -1
- package/lib/presets/future.js +0 -13
- package/lib/presets/nextjs.d.ts +0 -4
- package/lib/presets/nextjs.d.ts.map +0 -1
- package/lib/presets/nextjs.js +0 -13
- package/lib/presets/node.d.ts +0 -4
- package/lib/presets/node.d.ts.map +0 -1
- package/lib/presets/node.js +0 -26
- package/lib/presets/prettier.d.ts +0 -4
- package/lib/presets/prettier.d.ts.map +0 -1
- package/lib/presets/prettier.js +0 -13
- package/lib/presets/typescript.d.ts +0 -4
- package/lib/presets/typescript.d.ts.map +0 -1
- package/lib/presets/typescript.js +0 -40
- package/lib/resolvers/graphql.d.ts +0 -6
- package/lib/resolvers/graphql.d.ts.map +0 -1
- package/lib/resolvers/graphql.js +0 -12
- package/lib/rules/a11y.d.ts +0 -4
- package/lib/rules/a11y.d.ts.map +0 -1
- package/lib/rules/a11y.js +0 -45
- package/lib/rules/eslint-comments.d.ts +0 -4
- package/lib/rules/eslint-comments.d.ts.map +0 -1
- package/lib/rules/eslint-comments.js +0 -14
- package/lib/rules/eslint.d.ts +0 -4
- package/lib/rules/eslint.d.ts.map +0 -1
- package/lib/rules/eslint.js +0 -385
- package/lib/rules/import.d.ts +0 -4
- package/lib/rules/import.d.ts.map +0 -1
- package/lib/rules/import.js +0 -76
- package/lib/rules/jest.d.ts +0 -4
- package/lib/rules/jest.d.ts.map +0 -1
- package/lib/rules/jest.js +0 -59
- package/lib/rules/nextjs.d.ts +0 -4
- package/lib/rules/nextjs.d.ts.map +0 -1
- package/lib/rules/nextjs.js +0 -17
- package/lib/rules/node.d.ts +0 -4
- package/lib/rules/node.d.ts.map +0 -1
- package/lib/rules/node.js +0 -45
- package/lib/rules/prettier.d.ts +0 -4
- package/lib/rules/prettier.d.ts.map +0 -1
- package/lib/rules/prettier.js +0 -6
- package/lib/rules/promise.d.ts +0 -4
- package/lib/rules/promise.d.ts.map +0 -1
- package/lib/rules/promise.js +0 -24
- package/lib/rules/react-hooks.d.ts +0 -4
- package/lib/rules/react-hooks.d.ts.map +0 -1
- package/lib/rules/react-hooks.js +0 -7
- package/lib/rules/react.d.ts +0 -4
- package/lib/rules/react.d.ts.map +0 -1
- package/lib/rules/react.js +0 -143
- package/lib/rules/testing-library.d.ts +0 -4
- package/lib/rules/testing-library.d.ts.map +0 -1
- package/lib/rules/testing-library.js +0 -31
- package/lib/rules/typescript.d.ts +0 -4
- package/lib/rules/typescript.d.ts.map +0 -1
- package/lib/rules/typescript.js +0 -369
- package/lib/rules/unicorn.d.ts +0 -4
- package/lib/rules/unicorn.d.ts.map +0 -1
- package/lib/rules/unicorn.js +0 -105
- package/src/presets/SECRET_CONFIG_DO_NOT_USE_THIS.ts +0 -34
- package/src/presets/base.ts +0 -143
- package/src/presets/future.ts +0 -13
- package/src/presets/nextjs.ts +0 -13
- package/src/presets/node.ts +0 -27
- package/src/presets/prettier.ts +0 -13
- package/src/presets/typescript.ts +0 -45
- package/src/resolvers/graphql.ts +0 -11
- package/src/rules/a11y.ts +0 -47
- package/src/rules/eslint-comments.ts +0 -16
- package/src/rules/eslint.ts +0 -384
- package/src/rules/import.ts +0 -79
- package/src/rules/jest.ts +0 -64
- package/src/rules/nextjs.ts +0 -19
- package/src/rules/node.ts +0 -47
- package/src/rules/prettier.ts +0 -8
- package/src/rules/promise.ts +0 -26
- package/src/rules/react-hooks.ts +0 -9
- package/src/rules/react.ts +0 -145
- package/src/rules/testing-library.ts +0 -33
- package/src/rules/typescript.ts +0 -377
- package/src/rules/unicorn.ts +0 -108
- package/test/index.test.ts +0 -81
- package/test/lint-files/combo.ts +0 -10
- package/test/lint-files/errors/combo.ts +0 -3
- package/test/lint-files/errors/javascript.js +0 -2
- package/test/lint-files/errors/next.js +0 -11
- package/test/lint-files/errors/node.js +0 -3
- package/test/lint-files/errors/prettier.js +0 -5
- package/test/lint-files/errors/test.js +0 -3
- package/test/lint-files/errors/typescript.ts +0 -3
- package/test/lint-files/javascript.js +0 -1
- package/test/lint-files/next.js +0 -5
- package/test/lint-files/node.js +0 -2
- package/test/lint-files/prettier.js +0 -1
- package/test/lint-files/test.js +0 -5
- package/test/lint-files/typescript.ts +0 -20
- package/test/tsconfig.json +0 -19
- package/test/utils/getErrors.ts +0 -16
- package/tools/check-rules/allRules.ts +0 -99
- package/tools/check-rules/index.ts +0 -90
- package/tools/check-rules/tsconfig.json +0 -17
- package/tsconfig.json +0 -22
- package/tsconfig.tsbuildinfo +0 -1
package/lib/rules/eslint.js
DELETED
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const confusing_browser_globals_1 = __importDefault(require("confusing-browser-globals"));
|
|
6
|
-
const config = {
|
|
7
|
-
// ESLint rules
|
|
8
|
-
'accessor-pairs': 'off',
|
|
9
|
-
'array-bracket-newline': 'off',
|
|
10
|
-
'array-bracket-spacing': 'off',
|
|
11
|
-
'array-callback-return': ['error', { allowImplicit: true }],
|
|
12
|
-
'array-element-newline': 'off',
|
|
13
|
-
'arrow-body-style': ['warn', 'as-needed'],
|
|
14
|
-
'arrow-parens': 'off',
|
|
15
|
-
'arrow-spacing': 'off',
|
|
16
|
-
'block-scoped-var': 'error',
|
|
17
|
-
'block-spacing': 'off',
|
|
18
|
-
'brace-style': 'off',
|
|
19
|
-
camelcase: ['warn', { properties: 'always' }],
|
|
20
|
-
'capitalized-comments': 'off',
|
|
21
|
-
'class-methods-use-this': 'warn',
|
|
22
|
-
'comma-dangle': 'off',
|
|
23
|
-
'comma-spacing': 'off',
|
|
24
|
-
'comma-style': 'off',
|
|
25
|
-
complexity: ['warn', 20],
|
|
26
|
-
'computed-property-spacing': 'off',
|
|
27
|
-
'consistent-return': 'error',
|
|
28
|
-
'consistent-this': 'off',
|
|
29
|
-
'constructor-super': 'error',
|
|
30
|
-
curly: ['error', 'all'],
|
|
31
|
-
'default-case': 'warn',
|
|
32
|
-
'default-case-last': 'warn',
|
|
33
|
-
'default-param-last': 'warn',
|
|
34
|
-
'dot-location': 'off',
|
|
35
|
-
'dot-notation': ['error', { allowKeywords: true }],
|
|
36
|
-
'eol-last': 'off',
|
|
37
|
-
eqeqeq: ['error', 'smart'],
|
|
38
|
-
'for-direction': 'error',
|
|
39
|
-
'func-call-spacing': 'off',
|
|
40
|
-
'func-name-matching': ['error', 'always', { considerPropertyDescriptor: true }],
|
|
41
|
-
'func-names': 'warn',
|
|
42
|
-
'func-style': ['warn', 'declaration', { allowArrowFunctions: true }],
|
|
43
|
-
'function-call-argument-newline': 'off',
|
|
44
|
-
'function-paren-newline': 'off',
|
|
45
|
-
'generator-star-spacing': 'off',
|
|
46
|
-
'getter-return': ['error', { allowImplicit: true }],
|
|
47
|
-
'grouped-accessor-pairs': 'warn',
|
|
48
|
-
'guard-for-in': 'error',
|
|
49
|
-
'id-denylist': [
|
|
50
|
-
'error',
|
|
51
|
-
'any',
|
|
52
|
-
'Number',
|
|
53
|
-
'number',
|
|
54
|
-
'String',
|
|
55
|
-
'string',
|
|
56
|
-
'Boolean',
|
|
57
|
-
'boolean',
|
|
58
|
-
'Undefined',
|
|
59
|
-
'undefined',
|
|
60
|
-
],
|
|
61
|
-
'id-length': 'off',
|
|
62
|
-
'id-match': 'off',
|
|
63
|
-
'implicit-arrow-linebreak': 'off',
|
|
64
|
-
indent: 'off',
|
|
65
|
-
'init-declarations': 'off',
|
|
66
|
-
'jsx-quotes': 'off',
|
|
67
|
-
'key-spacing': 'off',
|
|
68
|
-
'keyword-spacing': 'off',
|
|
69
|
-
'line-comment-position': 'off',
|
|
70
|
-
'linebreak-style': 'off',
|
|
71
|
-
'lines-around-comment': 'off',
|
|
72
|
-
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
|
|
73
|
-
'max-classes-per-file': ['warn', 1],
|
|
74
|
-
'max-depth': 'off',
|
|
75
|
-
'max-len': 'off',
|
|
76
|
-
'max-lines': 'off',
|
|
77
|
-
'max-lines-per-function': 'off',
|
|
78
|
-
'max-nested-callbacks': 'off',
|
|
79
|
-
'max-params': ['warn', 3],
|
|
80
|
-
'max-statements': 'off',
|
|
81
|
-
'max-statements-per-line': 'off',
|
|
82
|
-
'multiline-comment-style': 'off',
|
|
83
|
-
'multiline-ternary': 'off',
|
|
84
|
-
'new-cap': 'warn',
|
|
85
|
-
'new-parens': 'off',
|
|
86
|
-
'newline-per-chained-call': 'off',
|
|
87
|
-
'no-alert': 'error',
|
|
88
|
-
'no-array-constructor': 'warn',
|
|
89
|
-
'no-async-promise-executor': 'error',
|
|
90
|
-
'no-await-in-loop': 'warn',
|
|
91
|
-
'no-bitwise': 'error',
|
|
92
|
-
'no-caller': 'error',
|
|
93
|
-
'no-case-declarations': 'error',
|
|
94
|
-
'no-class-assign': 'error',
|
|
95
|
-
'no-compare-neg-zero': 'error',
|
|
96
|
-
'no-cond-assign': ['error', 'always'],
|
|
97
|
-
'no-confusing-arrow': 'off',
|
|
98
|
-
'no-console': 'warn',
|
|
99
|
-
'no-const-assign': 'error',
|
|
100
|
-
'no-constant-condition': 'warn',
|
|
101
|
-
'no-constructor-return': 'warn',
|
|
102
|
-
'no-continue': 'off',
|
|
103
|
-
'no-control-regex': 'error',
|
|
104
|
-
'no-debugger': 'error',
|
|
105
|
-
'no-delete-var': 'error',
|
|
106
|
-
'no-div-regex': 'warn',
|
|
107
|
-
'no-dupe-args': 'error',
|
|
108
|
-
'no-dupe-class-members': 'error',
|
|
109
|
-
'no-dupe-else-if': 'error',
|
|
110
|
-
'no-dupe-keys': 'error',
|
|
111
|
-
'no-duplicate-case': 'error',
|
|
112
|
-
'no-duplicate-imports': 'error',
|
|
113
|
-
'no-else-return': 'error',
|
|
114
|
-
'no-empty': 'error',
|
|
115
|
-
'no-empty-character-class': 'error',
|
|
116
|
-
'no-empty-function': 'error',
|
|
117
|
-
'no-empty-pattern': 'error',
|
|
118
|
-
'no-eq-null': 'off',
|
|
119
|
-
'no-eval': 'error',
|
|
120
|
-
'no-ex-assign': 'error',
|
|
121
|
-
'no-extend-native': 'error',
|
|
122
|
-
'no-extra-bind': 'error',
|
|
123
|
-
'no-extra-boolean-cast': 'error',
|
|
124
|
-
'no-extra-label': 'error',
|
|
125
|
-
'no-extra-parens': 'off',
|
|
126
|
-
'no-extra-semi': 'off',
|
|
127
|
-
'no-fallthrough': 'error',
|
|
128
|
-
'no-floating-decimal': 'off',
|
|
129
|
-
'no-func-assign': 'error',
|
|
130
|
-
'no-global-assign': 'error',
|
|
131
|
-
'no-implicit-coercion': 'off',
|
|
132
|
-
'no-implicit-globals': 'error',
|
|
133
|
-
'no-implied-eval': 'error',
|
|
134
|
-
'no-import-assign': 'error',
|
|
135
|
-
'no-inline-comments': 'off',
|
|
136
|
-
'no-inner-declarations': 'error',
|
|
137
|
-
'no-invalid-regexp': 'error',
|
|
138
|
-
'no-invalid-this': 'error',
|
|
139
|
-
'no-irregular-whitespace': 'error',
|
|
140
|
-
'no-iterator': 'error',
|
|
141
|
-
'no-label-var': 'error',
|
|
142
|
-
'no-labels': 'error',
|
|
143
|
-
'no-lone-blocks': 'error',
|
|
144
|
-
'no-lonely-if': 'error',
|
|
145
|
-
'no-loop-func': 'error',
|
|
146
|
-
'no-loss-of-precision': 'error',
|
|
147
|
-
'no-magic-numbers': 'off',
|
|
148
|
-
'no-misleading-character-class': 'error',
|
|
149
|
-
'no-mixed-operators': 'off',
|
|
150
|
-
'no-mixed-spaces-and-tabs': 'off',
|
|
151
|
-
'no-multi-assign': 'error',
|
|
152
|
-
'no-multi-spaces': 'off',
|
|
153
|
-
'no-multi-str': 'error',
|
|
154
|
-
'no-multiple-empty-lines': 'off',
|
|
155
|
-
'no-negated-condition': 'error',
|
|
156
|
-
'no-nested-ternary': 'error',
|
|
157
|
-
'no-new': 'error',
|
|
158
|
-
'no-new-func': 'error',
|
|
159
|
-
'no-new-object': 'error',
|
|
160
|
-
'no-new-symbol': 'error',
|
|
161
|
-
'no-new-wrappers': 'error',
|
|
162
|
-
'no-nonoctal-decimal-escape': 'error',
|
|
163
|
-
'no-obj-calls': 'error',
|
|
164
|
-
'no-octal': 'error',
|
|
165
|
-
'no-octal-escape': 'error',
|
|
166
|
-
'no-param-reassign': [
|
|
167
|
-
'error',
|
|
168
|
-
{
|
|
169
|
-
props: true,
|
|
170
|
-
ignorePropertyModificationsFor: [
|
|
171
|
-
'accumulator',
|
|
172
|
-
'error',
|
|
173
|
-
'context',
|
|
174
|
-
'request',
|
|
175
|
-
'response',
|
|
176
|
-
'$scope',
|
|
177
|
-
'staticContext',
|
|
178
|
-
],
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
|
182
|
-
'no-promise-executor-return': 'error',
|
|
183
|
-
'no-proto': 'error',
|
|
184
|
-
'no-prototype-builtins': 'warn',
|
|
185
|
-
'no-redeclare': 'error',
|
|
186
|
-
'no-regex-spaces': 'error',
|
|
187
|
-
'no-restricted-exports': [
|
|
188
|
-
'error',
|
|
189
|
-
{
|
|
190
|
-
restrictedNamedExports: [
|
|
191
|
-
'then', // this will cause tons of confusion when your module is dynamically `import()`ed
|
|
192
|
-
],
|
|
193
|
-
},
|
|
194
|
-
],
|
|
195
|
-
'no-restricted-globals': [
|
|
196
|
-
'error',
|
|
197
|
-
{
|
|
198
|
-
name: 'isFinite',
|
|
199
|
-
message: 'Use Number.isFinite instead',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
name: 'isNaN',
|
|
203
|
-
message: 'Use Number.isNaN instead',
|
|
204
|
-
},
|
|
205
|
-
...confusing_browser_globals_1.default,
|
|
206
|
-
],
|
|
207
|
-
'no-restricted-imports': 'off',
|
|
208
|
-
'no-restricted-properties': [
|
|
209
|
-
'error',
|
|
210
|
-
{
|
|
211
|
-
object: 'arguments',
|
|
212
|
-
property: 'callee',
|
|
213
|
-
message: 'arguments.callee is deprecated',
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
object: 'global',
|
|
217
|
-
property: 'isFinite',
|
|
218
|
-
message: 'Please use Number.isFinite instead',
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
object: 'self',
|
|
222
|
-
property: 'isFinite',
|
|
223
|
-
message: 'Please use Number.isFinite instead',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
object: 'window',
|
|
227
|
-
property: 'isFinite',
|
|
228
|
-
message: 'Please use Number.isFinite instead',
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
object: 'global',
|
|
232
|
-
property: 'isNaN',
|
|
233
|
-
message: 'Please use Number.isNaN instead',
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
object: 'self',
|
|
237
|
-
property: 'isNaN',
|
|
238
|
-
message: 'Please use Number.isNaN instead',
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
object: 'window',
|
|
242
|
-
property: 'isNaN',
|
|
243
|
-
message: 'Please use Number.isNaN instead',
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
property: '__defineGetter__',
|
|
247
|
-
message: 'Please use Object.defineProperty instead.',
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
property: '__defineSetter__',
|
|
251
|
-
message: 'Please use Object.defineProperty instead.',
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
object: 'Math',
|
|
255
|
-
property: 'pow',
|
|
256
|
-
message: 'Use the exponentiation operator (**) instead.',
|
|
257
|
-
},
|
|
258
|
-
],
|
|
259
|
-
'no-restricted-syntax': 'off',
|
|
260
|
-
'no-return-assign': 'error',
|
|
261
|
-
'no-return-await': 'error',
|
|
262
|
-
'no-script-url': 'error',
|
|
263
|
-
'no-self-assign': 'error',
|
|
264
|
-
'no-self-compare': 'error',
|
|
265
|
-
'no-sequences': ['error', { allowInParentheses: false }],
|
|
266
|
-
'no-setter-return': 'error',
|
|
267
|
-
'no-shadow': ['warn', { allow: ['resolve, reject'] }],
|
|
268
|
-
'no-shadow-restricted-names': 'error',
|
|
269
|
-
'no-sparse-arrays': 'error',
|
|
270
|
-
'no-tabs': 'off',
|
|
271
|
-
'no-template-curly-in-string': 'error',
|
|
272
|
-
'no-ternary': 'off',
|
|
273
|
-
'no-this-before-super': 'error',
|
|
274
|
-
'no-throw-literal': 'error',
|
|
275
|
-
'no-trailing-spaces': 'off',
|
|
276
|
-
'no-undef': 'error',
|
|
277
|
-
'no-undef-init': 'error',
|
|
278
|
-
'no-undefined': 'off',
|
|
279
|
-
'no-underscore-dangle': 'error',
|
|
280
|
-
'no-unexpected-multiline': 'warn',
|
|
281
|
-
'no-unmodified-loop-condition': 'warn',
|
|
282
|
-
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
283
|
-
'no-unreachable': 'error',
|
|
284
|
-
'no-unreachable-loop': 'warn',
|
|
285
|
-
'no-unsafe-finally': 'error',
|
|
286
|
-
'no-unsafe-negation': 'error',
|
|
287
|
-
'no-unsafe-optional-chaining': 'error',
|
|
288
|
-
'no-unused-expressions': [
|
|
289
|
-
'error',
|
|
290
|
-
{ allowShortCircuit: true, allowTernary: true, enforceForJSX: true },
|
|
291
|
-
],
|
|
292
|
-
'no-unused-labels': 'error',
|
|
293
|
-
'no-unused-vars': ['error', { vars: 'local', args: 'after-used' }],
|
|
294
|
-
'no-use-before-define': 'error',
|
|
295
|
-
'no-useless-backreference': 'warn',
|
|
296
|
-
'no-useless-call': 'error',
|
|
297
|
-
'no-useless-catch': 'error',
|
|
298
|
-
'no-useless-computed-key': 'error',
|
|
299
|
-
'no-useless-concat': 'error',
|
|
300
|
-
'no-useless-constructor': 'error',
|
|
301
|
-
'no-useless-escape': 'error',
|
|
302
|
-
'no-useless-rename': 'error',
|
|
303
|
-
'no-useless-return': 'error',
|
|
304
|
-
'no-var': 'error',
|
|
305
|
-
'no-void': 'off',
|
|
306
|
-
'no-warning-comments': ['warn', { terms: ['todo:', 'fixme:', 'debug:'], location: 'start' }],
|
|
307
|
-
'no-whitespace-before-property': 'off',
|
|
308
|
-
'no-with': 'error',
|
|
309
|
-
'nonblock-statement-body-position': 'off',
|
|
310
|
-
'object-curly-newline': 'off',
|
|
311
|
-
'object-curly-spacing': 'off',
|
|
312
|
-
'object-property-newline': 'off',
|
|
313
|
-
'object-shorthand': ['error', 'always', { avoidQuotes: true }],
|
|
314
|
-
'one-var': ['error', 'never'],
|
|
315
|
-
'one-var-declaration-per-line': 'off',
|
|
316
|
-
'operator-assignment': ['error', 'always'],
|
|
317
|
-
'operator-linebreak': 'off',
|
|
318
|
-
'padded-blocks': 'off',
|
|
319
|
-
'padding-line-between-statements': [
|
|
320
|
-
'warn',
|
|
321
|
-
{ blankLine: 'always', prev: '*', next: 'return' },
|
|
322
|
-
{ blankLine: 'always', prev: 'import', next: '*' },
|
|
323
|
-
{ blankLine: 'any', prev: 'import', next: 'import' },
|
|
324
|
-
],
|
|
325
|
-
'prefer-arrow-callback': 'error',
|
|
326
|
-
'prefer-const': 'error',
|
|
327
|
-
'prefer-destructuring': [
|
|
328
|
-
'error',
|
|
329
|
-
{
|
|
330
|
-
VariableDeclarator: { array: false, object: true },
|
|
331
|
-
AssignmentExpression: { array: true, object: false },
|
|
332
|
-
},
|
|
333
|
-
{ enforceForRenamedProperties: false },
|
|
334
|
-
],
|
|
335
|
-
'prefer-exponentiation-operator': 'error',
|
|
336
|
-
'prefer-named-capture-group': 'off',
|
|
337
|
-
'prefer-numeric-literals': 'error',
|
|
338
|
-
'prefer-object-spread': 'error',
|
|
339
|
-
'prefer-promise-reject-errors': 'error',
|
|
340
|
-
'prefer-regex-literals': 'error',
|
|
341
|
-
'prefer-rest-params': 'error',
|
|
342
|
-
'prefer-spread': 'error',
|
|
343
|
-
'prefer-template': 'error',
|
|
344
|
-
'quote-props': 'off',
|
|
345
|
-
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
|
|
346
|
-
radix: 'error',
|
|
347
|
-
'require-atomic-updates': 'warn',
|
|
348
|
-
'require-await': 'off',
|
|
349
|
-
'require-unicode-regexp': 'off',
|
|
350
|
-
'require-yield': 'error',
|
|
351
|
-
'rest-spread-spacing': 'off',
|
|
352
|
-
semi: 'off',
|
|
353
|
-
'semi-spacing': 'off',
|
|
354
|
-
'semi-style': 'off',
|
|
355
|
-
'sort-imports': [
|
|
356
|
-
'warn',
|
|
357
|
-
{
|
|
358
|
-
ignoreCase: true,
|
|
359
|
-
memberSyntaxSortOrder: ['none', 'single', 'all', 'multiple'],
|
|
360
|
-
allowSeparatedGroups: true,
|
|
361
|
-
},
|
|
362
|
-
],
|
|
363
|
-
'sort-keys': 'off',
|
|
364
|
-
'sort-vars': 'off',
|
|
365
|
-
'space-before-blocks': 'off',
|
|
366
|
-
'space-before-function-paren': 'off',
|
|
367
|
-
'space-in-parens': 'off',
|
|
368
|
-
'space-infix-ops': 'off',
|
|
369
|
-
'space-unary-ops': 'off',
|
|
370
|
-
'spaced-comment': ['warn', 'always'],
|
|
371
|
-
strict: ['error', 'never'],
|
|
372
|
-
'switch-colon-spacing': 'off',
|
|
373
|
-
'symbol-description': 'error',
|
|
374
|
-
'template-curly-spacing': 'off',
|
|
375
|
-
'template-tag-spacing': 'off',
|
|
376
|
-
'unicode-bom': 'off',
|
|
377
|
-
'use-isnan': 'error',
|
|
378
|
-
'valid-typeof': ['error', { requireStringLiterals: true }],
|
|
379
|
-
'vars-on-top': 'error',
|
|
380
|
-
'wrap-iife': 'off',
|
|
381
|
-
'wrap-regex': 'off',
|
|
382
|
-
'yield-star-spacing': 'off',
|
|
383
|
-
yoda: 'error', // require or disallow “Yoda” conditions
|
|
384
|
-
};
|
|
385
|
-
module.exports = config;
|
package/lib/rules/import.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/rules/import.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CAyEjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/rules/import.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const lumos_common_1 = require("@oriflame/lumos-common");
|
|
3
|
-
const config = {
|
|
4
|
-
// override ESLint rules
|
|
5
|
-
'no-duplicate-imports': 'off',
|
|
6
|
-
'sort-imports': 'off',
|
|
7
|
-
// eslint-plugin-import rules
|
|
8
|
-
'import/default': 'off',
|
|
9
|
-
'import/dynamic-import-chunkname': 'off',
|
|
10
|
-
'import/export': 'error',
|
|
11
|
-
'import/exports-last': 'off',
|
|
12
|
-
'import/extensions': ['error', 'always', { js: 'never', jsx: 'never', mjs: 'never' }],
|
|
13
|
-
'import/first': 'error',
|
|
14
|
-
'import/group-exports': 'off',
|
|
15
|
-
'import/max-dependencies': 'off',
|
|
16
|
-
'import/no-internal-modules': 'off',
|
|
17
|
-
/* TODO [enable this when https://github.com/benmosher/eslint-plugin-import/issues/1998 is fixed]: 'import/named': 'error', // ensure named imports correspond to a named export in the remote file */
|
|
18
|
-
'import/named': 'off',
|
|
19
|
-
'import/namespace': 'off',
|
|
20
|
-
'import/newline-after-import': 'warn',
|
|
21
|
-
'import/no-absolute-path': 'error',
|
|
22
|
-
'import/no-amd': 'error',
|
|
23
|
-
'import/no-anonymous-default-export': 'off',
|
|
24
|
-
'import/no-commonjs': 'off',
|
|
25
|
-
'import/no-cycle': 'error',
|
|
26
|
-
'import/no-default-export': 'off',
|
|
27
|
-
'import/no-deprecated': 'warn',
|
|
28
|
-
'import/no-duplicates': 'error',
|
|
29
|
-
'import/no-dynamic-require': 'error',
|
|
30
|
-
'import/no-extraneous-dependencies': [
|
|
31
|
-
'error',
|
|
32
|
-
{
|
|
33
|
-
devDependencies: [
|
|
34
|
-
`test/**/*.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
35
|
-
`tests/**/*.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
36
|
-
`**/*.test.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
37
|
-
`__tests__/**/*.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
38
|
-
`**/__tests__/**/*.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
39
|
-
`**/jest.config.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
40
|
-
`**/webpack.config.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
41
|
-
`**/webpack.config.*.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
42
|
-
`tools/**/*.${lumos_common_1.JSX_EXTS_GROUP}`,
|
|
43
|
-
],
|
|
44
|
-
optionalDependencies: false,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
'import/no-import-module-exports': 'off',
|
|
48
|
-
'import/no-mutable-exports': 'error',
|
|
49
|
-
'import/no-named-as-default': 'off',
|
|
50
|
-
'import/no-named-as-default-member': 'error',
|
|
51
|
-
'import/no-named-default': 'error',
|
|
52
|
-
'import/no-named-export': 'off',
|
|
53
|
-
'import/no-namespace': 'off',
|
|
54
|
-
'import/no-nodejs-modules': 'off',
|
|
55
|
-
/* TODO [enable this when https://github.com/benmosher/eslint-plugin-import/issues/2081 is fixed]: 'import/no-relative-packages': 'error', // prevent importing packages through relative paths */
|
|
56
|
-
'import/no-relative-packages': 'off',
|
|
57
|
-
'import/no-relative-parent-imports': 'off',
|
|
58
|
-
'import/no-restricted-paths': 'off',
|
|
59
|
-
'import/no-self-import': 'error',
|
|
60
|
-
'import/no-unassigned-import': 'off',
|
|
61
|
-
'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }],
|
|
62
|
-
'import/no-unused-modules': 'off',
|
|
63
|
-
'import/no-useless-path-segments': ['error', { noUselessIndex: true }],
|
|
64
|
-
'import/no-webpack-loader-syntax': 'error',
|
|
65
|
-
'import/unambiguous': 'off',
|
|
66
|
-
'import/order': [
|
|
67
|
-
'warn',
|
|
68
|
-
{
|
|
69
|
-
groups: [['builtin', 'external']],
|
|
70
|
-
'newlines-between': 'always',
|
|
71
|
-
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
'import/prefer-default-export': 'off', // prefer a default export if module exports a single name
|
|
75
|
-
};
|
|
76
|
-
module.exports = config;
|
package/lib/rules/jest.d.ts
DELETED
package/lib/rules/jest.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest.d.ts","sourceRoot":"","sources":["../../src/rules/jest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CA2DjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/rules/jest.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const config = {
|
|
3
|
-
// override ESLint rules
|
|
4
|
-
'max-classes-per-file': 'off',
|
|
5
|
-
// override eslint-plugin-node rules
|
|
6
|
-
'node/no-sync': 'off',
|
|
7
|
-
// override @typescript-eslint/eslint-plugin rules
|
|
8
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
9
|
-
'@typescript-eslint/no-floating-promises': 'off',
|
|
10
|
-
'@typescript-eslint/unbound-method': 'off',
|
|
11
|
-
// eslint-plugin-jest
|
|
12
|
-
'jest/consistent-test-it': 'off',
|
|
13
|
-
'jest/expect-expect': 'warn',
|
|
14
|
-
'jest/lowercase-name': 'off',
|
|
15
|
-
'jest/max-nested-describe': [
|
|
16
|
-
'error',
|
|
17
|
-
{
|
|
18
|
-
max: 3,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
'jest/no-alias-methods': 'warn',
|
|
22
|
-
'jest/no-commented-out-tests': 'warn',
|
|
23
|
-
'jest/no-conditional-expect': 'error',
|
|
24
|
-
'jest/no-deprecated-functions': 'error',
|
|
25
|
-
'jest/no-disabled-tests': 'warn',
|
|
26
|
-
'jest/no-done-callback': 'warn',
|
|
27
|
-
'jest/no-duplicate-hooks': 'error',
|
|
28
|
-
'jest/no-export': 'error',
|
|
29
|
-
'jest/no-focused-tests': 'error',
|
|
30
|
-
'jest/no-hooks': 'off',
|
|
31
|
-
'jest/no-identical-title': 'error',
|
|
32
|
-
'jest/no-if': 'error',
|
|
33
|
-
'jest/no-interpolation-in-snapshots': 'error',
|
|
34
|
-
'jest/no-jasmine-globals': 'error',
|
|
35
|
-
'jest/no-jest-import': 'error',
|
|
36
|
-
'jest/no-large-snapshots': 'off',
|
|
37
|
-
'jest/no-mocks-import': 'error',
|
|
38
|
-
'jest/no-restricted-matchers': 'off',
|
|
39
|
-
'jest/no-standalone-expect': 'error',
|
|
40
|
-
'jest/no-test-prefixes': 'error',
|
|
41
|
-
'jest/no-test-return-statement': 'error',
|
|
42
|
-
'jest/prefer-called-with': 'warn',
|
|
43
|
-
'jest/prefer-expect-assertions': 'off',
|
|
44
|
-
'jest/prefer-hooks-on-top': 'warn',
|
|
45
|
-
'jest/prefer-spy-on': 'error',
|
|
46
|
-
'jest/prefer-strict-equal': 'off',
|
|
47
|
-
'jest/prefer-to-contain': 'warn',
|
|
48
|
-
'jest/prefer-to-have-length': 'warn',
|
|
49
|
-
'jest/prefer-todo': 'warn',
|
|
50
|
-
'jest/require-to-throw-message': 'error',
|
|
51
|
-
'jest/require-top-level-describe': 'error',
|
|
52
|
-
'jest/unbound-method': 'error',
|
|
53
|
-
'jest/valid-describe-callback': 'error',
|
|
54
|
-
'jest/prefer-lowercase-title': 'warn',
|
|
55
|
-
'jest/valid-expect': ['error', { alwaysAwait: true }],
|
|
56
|
-
'jest/valid-expect-in-promise': 'error',
|
|
57
|
-
'jest/valid-title': 'warn', // enforce valid titles
|
|
58
|
-
};
|
|
59
|
-
module.exports = config;
|
package/lib/rules/nextjs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/rules/nextjs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CAcjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/rules/nextjs.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const config = {
|
|
3
|
-
'@next/next/google-font-display': 'off',
|
|
4
|
-
'@next/next/google-font-preconnect': 'off',
|
|
5
|
-
'@next/next/link-passhref': 'warn',
|
|
6
|
-
'@next/next/no-css-tags': 'off',
|
|
7
|
-
'@next/next/no-document-import-in-page': 'error',
|
|
8
|
-
'@next/next/no-head-import-in-document': 'error',
|
|
9
|
-
'@next/next/no-html-link-for-pages': 'error',
|
|
10
|
-
'@next/next/no-img-element': 'off',
|
|
11
|
-
'@next/next/no-page-custom-font': 'off',
|
|
12
|
-
'@next/next/no-sync-scripts': 'warn',
|
|
13
|
-
'@next/next/no-title-in-document-head': 'error',
|
|
14
|
-
'@next/next/no-unwanted-polyfillio': 'off',
|
|
15
|
-
'@next/next/no-typos': 'warn', // ensure no typos were made declaring Next.js's data fetching function
|
|
16
|
-
};
|
|
17
|
-
module.exports = config;
|
package/lib/rules/node.d.ts
DELETED
package/lib/rules/node.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/rules/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CA0CjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/rules/node.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const config = {
|
|
3
|
-
// eslint-plugin-node rules
|
|
4
|
-
'node/callback-return': 'warn',
|
|
5
|
-
'node/exports-style': 'off',
|
|
6
|
-
'node/file-extension-in-import': ['error', 'always', { '.js': 'never', '.jsx': 'never' }],
|
|
7
|
-
'node/global-require': 'warn',
|
|
8
|
-
'node/handle-callback-err': 'warn',
|
|
9
|
-
'node/no-callback-literal': 'off',
|
|
10
|
-
'node/no-deprecated-api': 'error',
|
|
11
|
-
'node/no-exports-assign': 'error',
|
|
12
|
-
'node/no-extraneous-import': 'off',
|
|
13
|
-
'node/no-extraneous-require': 'off',
|
|
14
|
-
'node/no-missing-import': 'error',
|
|
15
|
-
'node/no-missing-require': 'error',
|
|
16
|
-
'node/no-mixed-requires': 'warn',
|
|
17
|
-
'node/no-new-require': 'warn',
|
|
18
|
-
'node/no-path-concat': 'warn',
|
|
19
|
-
'node/no-process-env': 'off',
|
|
20
|
-
'node/no-process-exit': 'warn',
|
|
21
|
-
'node/no-restricted-import': 'off',
|
|
22
|
-
'node/no-restricted-require': 'off',
|
|
23
|
-
'node/no-sync': 'warn',
|
|
24
|
-
'node/no-unpublished-bin': 'off',
|
|
25
|
-
'node/no-unpublished-import': 'off',
|
|
26
|
-
'node/no-unpublished-require': 'off',
|
|
27
|
-
'node/no-unsupported-features/es-builtins': ['error', { ignores: [], version: '>=14.0.0' }],
|
|
28
|
-
'node/no-unsupported-features/es-syntax': [
|
|
29
|
-
'error',
|
|
30
|
-
{ ignores: ['modules', 'dynamicImport'], version: '>=14.0.0' },
|
|
31
|
-
],
|
|
32
|
-
'node/no-unsupported-features/node-builtins': ['error', { ignores: [], version: '>=14.0.0' }],
|
|
33
|
-
'node/prefer-global/buffer': 'warn',
|
|
34
|
-
'node/prefer-global/console': 'warn',
|
|
35
|
-
'node/prefer-global/process': 'warn',
|
|
36
|
-
'node/prefer-global/text-decoder': 'warn',
|
|
37
|
-
'node/prefer-global/text-encoder': 'warn',
|
|
38
|
-
'node/prefer-global/url': 'warn',
|
|
39
|
-
'node/prefer-global/url-search-params': 'warn',
|
|
40
|
-
'node/prefer-promises/dns': 'error',
|
|
41
|
-
'node/prefer-promises/fs': 'error',
|
|
42
|
-
'node/process-exit-as-throw': 'off',
|
|
43
|
-
'node/shebang': 'warn', // suggest correct usage of shebang
|
|
44
|
-
};
|
|
45
|
-
module.exports = config;
|
package/lib/rules/prettier.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/rules/prettier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CAGjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|
package/lib/rules/prettier.js
DELETED
package/lib/rules/promise.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../src/rules/promise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,QAAA,MAAM,MAAM,EAAE,YAAY,CAAC,OAAO,CAqBjC,CAAC;AAEF,SAAS,MAAM,CAAC"}
|