@playcanvas/eslint-config 1.7.4 → 2.0.1

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 CHANGED
@@ -1,19 +1,19 @@
1
- Copyright (c) 2011-2021 PlayCanvas Ltd.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
1
+ Copyright (c) 2011-2021 PlayCanvas Ltd.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,25 +1,25 @@
1
- # PlayCanvas ESLint Config
2
-
3
- ESLint configuration developed by the PlayCanvas team and leveraged by many PlayCanvas-related projects, including the [PlayCanvas Engine][engine]. However, you can use it for any JavaScript-based project if you approve of the PlayCanvas coding style.
4
-
5
- The configuration is defined in [`index.js`][index]. It configures ESLint's rules in the same order as they are enumerated [here][rules]. It also configures rules for checking JSDoc comments using the ESLint plugin [`eslint-plugin-jsdoc-rules`][jsdoc-plugin].
6
-
7
- The configuration attempts to enable as many rules as possible, particularly those categorized as 'recommended' by ESLint.
8
-
9
- ## Using this config in your own projects
10
-
11
- Edit your project's `package.json` file:
12
-
13
- 1. Add `eslint` and `@playcanvas/eslint-config` to your `devDependencies` section.
14
- 2. Add an `eslintConfig` section. At a minimum, you will need:
15
-
16
- ```json
17
- "eslintConfig": {
18
- "extends": "@playcanvas/eslint-config"
19
- },
20
- ```
21
-
22
- [engine]: https://github.com/playcanvas/engine
23
- [index]: https://github.com/playcanvas/playcanvas-eslint-config/blob/master/index.js
24
- [rules]: https://eslint.org/docs/rules/
25
- [jsdoc-plugin]: https://github.com/gajus/eslint-plugin-jsdoc
1
+ # PlayCanvas ESLint Config
2
+
3
+ ESLint configuration developed by the PlayCanvas team and leveraged by many PlayCanvas-related projects, including the [PlayCanvas Engine][engine]. However, you can use it for any JavaScript-based project if you approve of the PlayCanvas coding style.
4
+
5
+ The configuration is defined in [`index.js`][index]. It configures ESLint's rules in the same order as they are enumerated [here][rules]. It also configures rules for checking JSDoc comments using the ESLint plugin [`eslint-plugin-jsdoc-rules`][jsdoc-plugin].
6
+
7
+ The configuration attempts to enable as many rules as possible, particularly those categorized as 'recommended' by ESLint.
8
+
9
+ ## Using this config in your own projects
10
+
11
+ Edit your project's `package.json` file:
12
+
13
+ 1. Add `eslint` and `@playcanvas/eslint-config` to your `devDependencies` section.
14
+ 2. Add an `eslintConfig` section. At a minimum, you will need:
15
+
16
+ ```json
17
+ "eslintConfig": {
18
+ "extends": "@playcanvas/eslint-config"
19
+ },
20
+ ```
21
+
22
+ [engine]: https://github.com/playcanvas/engine
23
+ [index]: https://github.com/playcanvas/playcanvas-eslint-config/blob/master/index.js
24
+ [rules]: https://eslint.org/docs/rules/
25
+ [jsdoc-plugin]: https://github.com/gajus/eslint-plugin-jsdoc
@@ -0,0 +1,536 @@
1
+ import jsdocPlugin from 'eslint-plugin-jsdoc';
2
+ // import importPlugin from 'eslint-plugin-import';
3
+ import regexpPlugin from 'eslint-plugin-regexp';
4
+
5
+ export default [
6
+ {
7
+ plugins: {
8
+ // import: importPlugin,
9
+ jsdoc: jsdocPlugin,
10
+ regexp: regexpPlugin
11
+ },
12
+ rules: {
13
+ // Possible Problems
14
+ "array-callback-return": "error",
15
+ "constructor-super": "error",
16
+ "for-direction": "error",
17
+ "getter-return": "error",
18
+ "no-async-promise-executor": "error",
19
+ "no-await-in-loop": "error",
20
+ "no-class-assign": "error",
21
+ "no-compare-neg-zero": "error",
22
+ "no-cond-assign": "error",
23
+ "no-const-assign": "error",
24
+ "no-constant-binary-expression": "error",
25
+ "no-constant-condition": [
26
+ "error", {
27
+ "checkLoops": false
28
+ }
29
+ ],
30
+ "no-constructor-return": "error",
31
+ "no-control-regex": "error",
32
+ "no-debugger": "error",
33
+ "no-dupe-args": "error",
34
+ "no-dupe-class-members": "error",
35
+ "no-dupe-else-if": "error",
36
+ "no-dupe-keys": "error",
37
+ "no-duplicate-case": "error",
38
+ "no-duplicate-imports": "error",
39
+ "no-empty-character-class": "error",
40
+ "no-empty-pattern": "error",
41
+ "no-ex-assign": "error",
42
+ "no-fallthrough": "error",
43
+ "no-func-assign": "error",
44
+ "no-import-assign": "error",
45
+ "no-inner-declarations": "error",
46
+ "no-invalid-regexp": "error",
47
+ "no-irregular-whitespace": "error",
48
+ "no-loss-of-precision": "error",
49
+ "no-misleading-character-class": "error",
50
+ "no-new-native-nonconstructor": "error",
51
+ "no-new-symbol": "error",
52
+ "no-obj-calls": "error",
53
+ "no-promise-executor-return": "error",
54
+ "no-prototype-builtins": "off",
55
+ "no-self-assign": "error",
56
+ "no-self-compare": "error",
57
+ "no-setter-return": "error",
58
+ "no-sparse-arrays": "error",
59
+ "no-template-curly-in-string": "error",
60
+ "no-this-before-super": "error",
61
+ "no-undef": "error",
62
+ "no-unexpected-multiline": "error",
63
+ "no-unmodified-loop-condition": "error",
64
+ "no-unreachable": "error",
65
+ "no-unreachable-loop": "error",
66
+ "no-unsafe-finally": "error",
67
+ "no-unsafe-negation": "error",
68
+ "no-unsafe-optional-chaining": "error",
69
+ "no-unused-private-class-members": "error",
70
+ "no-unused-vars": [
71
+ "error", {
72
+ "args": "none",
73
+ "caughtErrors": "none"
74
+ }
75
+ ],
76
+ "no-use-before-define": [
77
+ "error", {
78
+ "functions": false
79
+ }
80
+ ],
81
+ "no-useless-backreference": "error",
82
+ "require-atomic-updates": "error",
83
+ "use-isnan": "error",
84
+ "valid-typeof": "error",
85
+
86
+ // Suggestions
87
+ "accessor-pairs": "error",
88
+ "arrow-body-style": "off",
89
+ "block-scoped-var": "error",
90
+ "camelcase": "off",
91
+ "capitalized-comments": "off",
92
+ "class-methods-use-this": "off",
93
+ "complexity": "off",
94
+ "consistent-return": "off",
95
+ "consistent-this": "off",
96
+ "curly": ["error", "multi-line"],
97
+ "default-case": "off",
98
+ "default-case-last": "off",
99
+ "default-param-last": "off",
100
+ "dot-notation": "error",
101
+ "eqeqeq": ["error", "smart"],
102
+ "func-name-matching": "error",
103
+ "func-names": "off",
104
+ "func-style": "off",
105
+ "grouped-accessor-pairs": ["error", "setBeforeGet"],
106
+ "guard-for-in": "off",
107
+ "id-denylist": "off",
108
+ "id-length": "off",
109
+ "id-match": "off",
110
+ "init-declarations": "off",
111
+ "logical-assignment-operators": "off",
112
+ "max-classes-per-file": "off",
113
+ "max-depth": "off",
114
+ "max-lines": "off",
115
+ "max-lines-per-function": "off",
116
+ "max-nested-callbacks": "off",
117
+ "max-params": "off",
118
+ "max-statements": "off",
119
+ "multiline-comment-style": ["warn", "separate-lines"],
120
+ "new-cap": "off",
121
+ "no-alert": "error",
122
+ "no-array-constructor": "error",
123
+ "no-bitwise": "off",
124
+ "no-caller": "error",
125
+ "no-case-declarations": "error",
126
+ "no-confusing-arrow": "error",
127
+ "no-console": "off",
128
+ "no-continue": "off",
129
+ "no-delete-var": "error",
130
+ "no-div-regex": "error",
131
+ "no-else-return": "error",
132
+ "no-empty": [
133
+ "error", {
134
+ "allowEmptyCatch": true
135
+ }
136
+ ],
137
+ "no-empty-function": "off",
138
+ "no-empty-static-block": "error",
139
+ "no-eq-null": "off",
140
+ "no-eval": "error",
141
+ "no-extend-native": "error",
142
+ "no-extra-bind": "error",
143
+ "no-extra-boolean-cast": "off",
144
+ "no-extra-label": "error",
145
+ "no-extra-semi": "error",
146
+ "no-floating-decimal": "error",
147
+ "no-global-assign": "error",
148
+ "no-implicit-coercion": "off",
149
+ "no-implicit-globals": "error",
150
+ "no-implied-eval": "error",
151
+ "no-inline-comments": "off",
152
+ "no-invalid-this": "off",
153
+ "no-iterator": "error",
154
+ "no-label-var": "error",
155
+ "no-labels": "error",
156
+ "no-lone-blocks": "error",
157
+ "no-lonely-if": "off",
158
+ "no-loop-func": "error",
159
+ "no-magic-numbers": "off",
160
+ "no-mixed-operators": "off",
161
+ "no-multi-assign": "off",
162
+ "no-multi-str": "error",
163
+ "no-negated-condition": "off",
164
+ "no-nested-ternary": "off",
165
+ "no-new": "warn",
166
+ "no-new-func": "error",
167
+ "no-new-object": "error",
168
+ "no-new-wrappers": "error",
169
+ "no-nonoctal-decimal-escape": "error",
170
+ "no-octal": "error",
171
+ "no-octal-escape": "error",
172
+ "no-param-reassign": "off",
173
+ "no-plusplus": "off",
174
+ "no-proto": "error",
175
+ "no-redeclare": "error",
176
+ "no-regex-spaces": "error",
177
+ "no-restricted-exports": "error",
178
+ "no-restricted-globals": "off",
179
+ "no-restricted-imports": "error",
180
+ "no-restricted-properties": "off",
181
+ "no-restricted-syntax": "error",
182
+ "no-return-assign": "error",
183
+ "no-script-url": "error",
184
+ "no-sequences": "error",
185
+ "no-shadow": "off",
186
+ "no-shadow-restricted-names": "error",
187
+ "no-ternary": "off",
188
+ "no-throw-literal": "error",
189
+ "no-undef-init": "error",
190
+ "no-undefined": "off",
191
+ "no-underscore-dangle": "off",
192
+ "no-unneeded-ternary": "error",
193
+ "no-unused-expressions": "error",
194
+ "no-unused-labels": "error",
195
+ "no-useless-call": "error",
196
+ "no-useless-catch": "error",
197
+ "no-useless-computed-key": "error",
198
+ "no-useless-concat": "error",
199
+ "no-useless-constructor": "error",
200
+ "no-useless-escape": "off",
201
+ "no-useless-rename": "error",
202
+ "no-useless-return": "error",
203
+ "no-var": "off", // update to error
204
+ "no-void": "error",
205
+ "no-warning-comments": "off",
206
+ "no-with": "error",
207
+ "object-shorthand": "off",
208
+ "one-var": "off",
209
+ "one-var-declaration-per-line": "off",
210
+ "operator-assignment": ["error", "always"],
211
+ "prefer-arrow-callback": "error",
212
+ "prefer-const": "error",
213
+ "prefer-destructuring": "off",
214
+ "prefer-exponentiation-operator": "off",
215
+ "prefer-named-capture-group": "off",
216
+ "prefer-numeric-literals": "error",
217
+ "prefer-object-has-own": "off",
218
+ "prefer-object-spread": "off",
219
+ "prefer-promise-reject-errors": "error",
220
+ "prefer-regex-literals": "off",
221
+ "prefer-rest-params": "off",
222
+ "prefer-spread": "warn",
223
+ "prefer-template": "error",
224
+ "quote-props": "off",
225
+ "radix": "error",
226
+ "require-await": "error",
227
+ "require-unicode-regexp": "off",
228
+ "require-yield": "error",
229
+ "sort-imports": "off",
230
+ "sort-keys": "off",
231
+ "sort-vars": "off",
232
+ "spaced-comment": [
233
+ "error", "always", {
234
+ "exceptions": ["/"]
235
+ }
236
+ ],
237
+ "strict": "error",
238
+ "symbol-description": "error",
239
+ "vars-on-top": "off",
240
+ "yoda": "error",
241
+
242
+ // Layout & Formatting
243
+ "array-bracket-newline": ["error", "consistent"],
244
+ "array-bracket-spacing": ["error", "never"],
245
+ "array-element-newline": "off",
246
+ "arrow-parens": [
247
+ "error", "as-needed", {
248
+ "requireForBlockBody": true
249
+ }
250
+ ],
251
+ "arrow-spacing": "error",
252
+ "block-spacing": "error",
253
+ "brace-style": "error",
254
+ "comma-dangle": ["error", "never"],
255
+ "comma-spacing": [
256
+ "error", {
257
+ "before": false,
258
+ "after": true
259
+ }
260
+ ],
261
+ "comma-style": ["error", "last"],
262
+ "computed-property-spacing": ["error", "never"],
263
+ "dot-location": ["error", "property"],
264
+ "eol-last": ["error", "always"],
265
+ "func-call-spacing": ["error", "never"],
266
+ "function-call-argument-newline": "off",
267
+ "function-paren-newline": "off",
268
+ "generator-star-spacing": "error",
269
+ "implicit-arrow-linebreak": "error",
270
+ "indent": ["error", 4, {
271
+ "MemberExpression": 0,
272
+ "SwitchCase": 1
273
+ }],
274
+ "jsx-quotes": "off",
275
+ "key-spacing": [
276
+ "error", {
277
+ "beforeColon": false,
278
+ "afterColon": true
279
+ }
280
+ ],
281
+ "keyword-spacing": [
282
+ "error", {
283
+ "before": true,
284
+ "after": true
285
+ }
286
+ ],
287
+ "line-comment-position": "off",
288
+ "linebreak-style": "off",
289
+ "lines-around-comment": "off",
290
+ "lines-between-class-members": ["error", "always"],
291
+ "max-len": "off",
292
+ "max-statements-per-line": "off",
293
+ "multiline-ternary": "off",
294
+ "new-parens": "error",
295
+ "newline-per-chained-call": "off",
296
+ "no-extra-parens": ["error", "functions"],
297
+ "no-mixed-spaces-and-tabs": "error",
298
+ "no-multi-spaces": [
299
+ "error", {
300
+ "ignoreEOLComments": true,
301
+ "exceptions": {
302
+ "ArrayExpression": true,
303
+ "AssignmentExpression": true,
304
+ "BinaryExpression": true,
305
+ "IfStatement": true,
306
+ "LogicalExpression": true,
307
+ "SwitchCase": true,
308
+ "VariableDeclarator": true
309
+ }
310
+ }
311
+ ],
312
+ "no-multiple-empty-lines": [
313
+ "error", {
314
+ "max": 2,
315
+ "maxBOF": 0,
316
+ "maxEOF": 0
317
+ }
318
+ ],
319
+ "no-tabs": "error",
320
+ "no-trailing-spaces": "error",
321
+ "no-whitespace-before-property": "error",
322
+ "nonblock-statement-body-position": "off",
323
+ "object-curly-newline": [
324
+ "error", {
325
+ "consistent": true
326
+ }
327
+ ],
328
+ "object-curly-spacing": ["error", "always"],
329
+ "object-property-newline": [
330
+ "error", {
331
+ "allowAllPropertiesOnSameLine": true
332
+ }
333
+ ],
334
+ "operator-linebreak": ["error", "after"],
335
+ "padded-blocks": [
336
+ "error", {
337
+ "classes": "never"
338
+ }
339
+ ],
340
+ "padding-line-between-statements": "off",
341
+ "quotes": ["error", "single"],
342
+ "rest-spread-spacing": "error",
343
+ "semi": ["error", "always"],
344
+ "semi-spacing": [
345
+ "error", {
346
+ "before": false,
347
+ "after": true
348
+ }
349
+ ],
350
+ "semi-style": ["error", "last"],
351
+ "space-before-blocks": "error",
352
+ "space-before-function-paren": [
353
+ "error", {
354
+ "anonymous": "always",
355
+ "named": "never"
356
+ }
357
+ ],
358
+ "space-in-parens": ["error", "never"],
359
+ "space-infix-ops": [
360
+ "error", {
361
+ "int32Hint": false
362
+ }
363
+ ],
364
+ "space-unary-ops": [
365
+ "error", {
366
+ "words": true,
367
+ "nonwords": false,
368
+ "overrides": {
369
+ }
370
+ }],
371
+ "switch-colon-spacing": [
372
+ "error", {
373
+ "after": true,
374
+ "before": false
375
+ }
376
+ ],
377
+ "template-curly-spacing": "error",
378
+ "template-tag-spacing": "error",
379
+ "unicode-bom": ["error", "never"],
380
+ "wrap-iife": "off",
381
+ "wrap-regex": "off",
382
+ "yield-star-spacing": "error",
383
+
384
+ /*
385
+ // Import rules
386
+
387
+ // Static analysis
388
+ "import/default": "error",
389
+ "import/named": "error",
390
+ "import/namespace": "error",
391
+ "import/no-unresolved": "error",
392
+ "import/order": ["error", {
393
+ "groups": ["builtin", "external", "internal", ["parent", "sibling"], "index", "unknown"],
394
+ "newlines-between": "always",
395
+ "alphabetize": { "order": "asc", "caseInsensitive": true }
396
+ }],
397
+
398
+ // Helpful warnings
399
+ "import/export": "error",
400
+ "import/no-named-as-default": "warn",
401
+ "import/no-named-as-default-member": "warn",
402
+
403
+ // Style guide
404
+ "import/extensions": ["error", "always", { "ts": "never", "tsx": "never" }],
405
+ "import/no-duplicates": "warn",
406
+ */
407
+
408
+ // JSDoc rules
409
+ "jsdoc/check-access": "error",
410
+ "jsdoc/check-alignment": "error",
411
+ "jsdoc/check-examples": "off",
412
+ "jsdoc/check-indentation": "off",
413
+ "jsdoc/check-line-alignment": "error",
414
+ "jsdoc/check-param-names": "off",
415
+ "jsdoc/check-property-names": "error",
416
+ "jsdoc/check-syntax": "error",
417
+ "jsdoc/check-tag-names": ["error", { "definedTags": ["attribute", "category", "import"] }],
418
+ "jsdoc/check-types": "off",
419
+ "jsdoc/check-values": "error",
420
+ "jsdoc/empty-tags": "error",
421
+ "jsdoc/implements-on-classes": "error",
422
+ "jsdoc/informative-docs": "off",
423
+ "jsdoc/match-description": "off",
424
+ "jsdoc/match-name": "off",
425
+ "jsdoc/multiline-blocks": "error",
426
+ "jsdoc/no-bad-blocks": "error",
427
+ "jsdoc/no-blank-block-descriptions": "error",
428
+ "jsdoc/no-blank-blocks": "error",
429
+ "jsdoc/no-defaults": "error",
430
+ "jsdoc/no-missing-syntax": "off",
431
+ "jsdoc/no-multi-asterisks": "error",
432
+ "jsdoc/no-restricted-syntax": "off",
433
+ "jsdoc/no-types": "off",
434
+ "jsdoc/no-undefined-types": "off",
435
+ "jsdoc/require-asterisk-prefix": "error",
436
+ "jsdoc/require-description": "off",
437
+ "jsdoc/require-description-complete-sentence": [
438
+ "off", {
439
+ "abbreviations": ["e.g."]
440
+ }
441
+ ],
442
+ "jsdoc/require-example": "off",
443
+ "jsdoc/require-file-overview": "off",
444
+ "jsdoc/require-hyphen-before-param-description": ["error", "always"],
445
+ "jsdoc/require-jsdoc": "off",
446
+ "jsdoc/require-param": "error",
447
+ "jsdoc/require-param-description": "error",
448
+ "jsdoc/require-param-name": "error",
449
+ "jsdoc/require-param-type": "error",
450
+ "jsdoc/require-property": "error",
451
+ "jsdoc/require-property-description": "error",
452
+ "jsdoc/require-property-name": "error",
453
+ "jsdoc/require-property-type": "error",
454
+ "jsdoc/require-returns": "error",
455
+ "jsdoc/require-returns-check": "error",
456
+ "jsdoc/require-returns-description": "error",
457
+ "jsdoc/require-returns-type": "error",
458
+ "jsdoc/require-throws": "off",
459
+ "jsdoc/require-yields": "error",
460
+ "jsdoc/require-yields-check": "error",
461
+ "jsdoc/sort-tags": "off",
462
+ "jsdoc/tag-lines": "off",
463
+ "jsdoc/text-escaping": "off",
464
+ "jsdoc/valid-types": "off",
465
+
466
+ // Regex rules
467
+ "no-control-regex": "error",
468
+ "no-misleading-character-class": "error",
469
+ "no-regex-spaces": "error",
470
+ "prefer-regex-literals": "error",
471
+ "no-invalid-regexp": "off",
472
+ "no-useless-backreference": "off",
473
+ "no-empty-character-class": "off",
474
+ "regexp/confusing-quantifier": "warn",
475
+ "regexp/control-character-escape": "error",
476
+ "regexp/match-any": "error",
477
+ "regexp/negation": "error",
478
+ "regexp/no-contradiction-with-assertion": "error",
479
+ "regexp/no-dupe-characters-character-class": "error",
480
+ "regexp/no-dupe-disjunctions": "error",
481
+ "regexp/no-empty-alternative": "warn",
482
+ "regexp/no-empty-capturing-group": "error",
483
+ "regexp/no-empty-character-class": "error",
484
+ "regexp/no-empty-group": "error",
485
+ "regexp/no-empty-lookarounds-assertion": "error",
486
+ "regexp/no-empty-string-literal": "error",
487
+ "regexp/no-escape-backspace": "error",
488
+ "regexp/no-extra-lookaround-assertions": "error",
489
+ "regexp/no-invalid-regexp": "error",
490
+ "regexp/no-invisible-character": "error",
491
+ "regexp/no-lazy-ends": "warn",
492
+ "regexp/no-legacy-features": "error",
493
+ "regexp/no-misleading-capturing-group": "error",
494
+ "regexp/no-misleading-unicode-character": "error",
495
+ "regexp/no-missing-g-flag": "error",
496
+ "regexp/no-non-standard-flag": "error",
497
+ "regexp/no-obscure-range": "error",
498
+ "regexp/no-optional-assertion": "error",
499
+ "regexp/no-potentially-useless-backreference": "warn",
500
+ "regexp/no-super-linear-backtracking": "error",
501
+ "regexp/no-trivially-nested-assertion": "error",
502
+ "regexp/no-trivially-nested-quantifier": "error",
503
+ "regexp/no-unused-capturing-group": "error",
504
+ "regexp/no-useless-assertions": "error",
505
+ "regexp/no-useless-backreference": "error",
506
+ "regexp/no-useless-character-class": "error",
507
+ "regexp/no-useless-dollar-replacements": "error",
508
+ "regexp/no-useless-escape": "error",
509
+ "regexp/no-useless-flag": "warn",
510
+ "regexp/no-useless-lazy": "error",
511
+ "regexp/no-useless-non-capturing-group": "error",
512
+ "regexp/no-useless-quantifier": "error",
513
+ "regexp/no-useless-range": "error",
514
+ "regexp/no-useless-set-operand": "error",
515
+ "regexp/no-useless-string-literal": "error",
516
+ "regexp/no-useless-two-nums-quantifier": "error",
517
+ "regexp/no-zero-quantifier": "error",
518
+ "regexp/optimal-lookaround-quantifier": "warn",
519
+ "regexp/optimal-quantifier-concatenation": "error",
520
+ "regexp/prefer-character-class": "error",
521
+ "regexp/prefer-d": "error",
522
+ "regexp/prefer-plus-quantifier": "error",
523
+ "regexp/prefer-predefined-assertion": "error",
524
+ "regexp/prefer-question-quantifier": "error",
525
+ "regexp/prefer-range": "error",
526
+ "regexp/prefer-set-operation": "error",
527
+ "regexp/prefer-star-quantifier": "error",
528
+ "regexp/prefer-unicode-codepoint-escapes": "error",
529
+ "regexp/prefer-w": "error",
530
+ "regexp/simplify-set-operations": "error",
531
+ "regexp/sort-flags": "error",
532
+ "regexp/strict": "error",
533
+ "regexp/use-ignore-case": "error",
534
+ }
535
+ }
536
+ ];
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
- {
2
- "name": "@playcanvas/eslint-config",
3
- "version": "1.7.4",
4
- "author": "PlayCanvas <support@playcanvas.com>",
5
- "homepage": "https://playcanvas.com",
6
- "description": "ESLint configuration used by PlayCanvas",
7
- "keywords": [
8
- "eslint",
9
- "eslintrc",
10
- "config",
11
- "playcanvas"
12
- ],
13
- "license": "MIT",
14
- "main": "index.js",
15
- "bugs": {
16
- "url": "https://github.com/playcanvas/playcanvas-eslint-config/issues"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/playcanvas/playcanvas-eslint-config.git"
21
- },
22
- "files": [
23
- "LICENSE",
24
- "index.js",
25
- "package.json",
26
- "README.md"
27
- ],
28
- "dependencies": {
29
- "eslint-plugin-import": "^2.28.0",
30
- "eslint-plugin-jsdoc": "^46.4.6",
31
- "eslint-plugin-regexp": "^2.6.0"
32
- },
33
- "scripts": {
34
- "test": "echo \"Error: no test specified\" && exit 1"
35
- },
36
- "peerDependencies": {
37
- "eslint": ">= 4"
38
- }
39
- }
1
+ {
2
+ "name": "@playcanvas/eslint-config",
3
+ "version": "2.0.1",
4
+ "author": "PlayCanvas <support@playcanvas.com>",
5
+ "homepage": "https://playcanvas.com",
6
+ "description": "ESLint configuration used by PlayCanvas",
7
+ "keywords": [
8
+ "config",
9
+ "eslint",
10
+ "eslintrc",
11
+ "playcanvas"
12
+ ],
13
+ "license": "MIT",
14
+ "main": "eslint.config.mjs",
15
+ "bugs": {
16
+ "url": "https://github.com/playcanvas/playcanvas-eslint-config/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/playcanvas/playcanvas-eslint-config.git"
21
+ },
22
+ "files": [
23
+ "LICENSE",
24
+ "eslint.config.mjs",
25
+ "package.json",
26
+ "README.md"
27
+ ],
28
+ "dependencies": {
29
+ "eslint-plugin-import": "^2.30.0",
30
+ "eslint-plugin-jsdoc": "^50.2.2",
31
+ "eslint-plugin-regexp": "^2.6.0"
32
+ },
33
+ "scripts": {
34
+ "test": "echo \"Error: no test specified\" && exit 1"
35
+ },
36
+ "peerDependencies": {
37
+ "eslint": ">= 8"
38
+ }
39
+ }
package/index.js DELETED
@@ -1,550 +0,0 @@
1
- module.exports = {
2
-
3
- "parserOptions": {
4
- "ecmaVersion": 2022,
5
- "sourceType": "module",
6
- "ecmaFeatures": {}
7
- },
8
-
9
- // Rules reference: https://eslint.org/docs/rules/
10
- "rules": {
11
- // Possible Problems
12
- "array-callback-return": "error",
13
- "constructor-super": "error",
14
- "for-direction": "error",
15
- "getter-return": "error",
16
- "no-async-promise-executor": "error",
17
- "no-await-in-loop": "error",
18
- "no-class-assign": "error",
19
- "no-compare-neg-zero": "error",
20
- "no-cond-assign": "error",
21
- "no-const-assign": "error",
22
- "no-constant-binary-expression": "error",
23
- "no-constant-condition": [
24
- "error", {
25
- "checkLoops": false
26
- }
27
- ],
28
- "no-constructor-return": "error",
29
- "no-control-regex": "error",
30
- "no-debugger": "error",
31
- "no-dupe-args": "error",
32
- "no-dupe-class-members": "error",
33
- "no-dupe-else-if": "error",
34
- "no-dupe-keys": "error",
35
- "no-duplicate-case": "error",
36
- "no-duplicate-imports": "error",
37
- "no-empty-character-class": "error",
38
- "no-empty-pattern": "error",
39
- "no-ex-assign": "error",
40
- "no-fallthrough": "error",
41
- "no-func-assign": "error",
42
- "no-import-assign": "error",
43
- "no-inner-declarations": "error",
44
- "no-invalid-regexp": "error",
45
- "no-irregular-whitespace": "error",
46
- "no-loss-of-precision": "error",
47
- "no-misleading-character-class": "error",
48
- "no-new-native-nonconstructor": "error",
49
- "no-new-symbol": "error",
50
- "no-obj-calls": "error",
51
- "no-promise-executor-return": "error",
52
- "no-prototype-builtins": "off",
53
- "no-self-assign": "error",
54
- "no-self-compare": "error",
55
- "no-setter-return": "error",
56
- "no-sparse-arrays": "error",
57
- "no-template-curly-in-string": "error",
58
- "no-this-before-super": "error",
59
- "no-undef": "error",
60
- "no-unexpected-multiline": "error",
61
- "no-unmodified-loop-condition": "error",
62
- "no-unreachable": "error",
63
- "no-unreachable-loop": "error",
64
- "no-unsafe-finally": "error",
65
- "no-unsafe-negation": "error",
66
- "no-unsafe-optional-chaining": "error",
67
- "no-unused-private-class-members": "error",
68
- "no-unused-vars": [
69
- "error", {
70
- "args": "none"
71
- }
72
- ],
73
- "no-use-before-define": [
74
- "error", {
75
- "functions": false
76
- }
77
- ],
78
- "no-useless-backreference": "error",
79
- "require-atomic-updates": "error",
80
- "use-isnan": "error",
81
- "valid-typeof": "error",
82
-
83
- // Suggestions
84
- "accessor-pairs": "error",
85
- "arrow-body-style": "off",
86
- "block-scoped-var": "error",
87
- "camelcase": "off",
88
- "capitalized-comments": "off",
89
- "class-methods-use-this": "off",
90
- "complexity": "off",
91
- "consistent-return": "off",
92
- "consistent-this": "off",
93
- "curly": ["error", "multi-line"],
94
- "default-case": "off",
95
- "default-case-last": "off",
96
- "default-param-last": "off",
97
- "dot-notation": "error",
98
- "eqeqeq": ["error", "smart"],
99
- "func-name-matching": "error",
100
- "func-names": "off",
101
- "func-style": "off",
102
- "grouped-accessor-pairs": ["error", "setBeforeGet"],
103
- "guard-for-in": "off",
104
- "id-denylist": "off",
105
- "id-length": "off",
106
- "id-match": "off",
107
- "init-declarations": "off",
108
- "logical-assignment-operators": "off",
109
- "max-classes-per-file": "off",
110
- "max-depth": "off",
111
- "max-lines": "off",
112
- "max-lines-per-function": "off",
113
- "max-nested-callbacks": "off",
114
- "max-params": "off",
115
- "max-statements": "off",
116
- "multiline-comment-style": ["warn", "separate-lines"],
117
- "new-cap": "off",
118
- "no-alert": "error",
119
- "no-array-constructor": "error",
120
- "no-bitwise": "off",
121
- "no-caller": "error",
122
- "no-case-declarations": "error",
123
- "no-confusing-arrow": "error",
124
- "no-console": "off",
125
- "no-continue": "off",
126
- "no-delete-var": "error",
127
- "no-div-regex": "error",
128
- "no-else-return": "error",
129
- "no-empty": [
130
- "error", {
131
- "allowEmptyCatch": true
132
- }
133
- ],
134
- "no-empty-function": "off",
135
- "no-empty-static-block": "error",
136
- "no-eq-null": "off",
137
- "no-eval": "error",
138
- "no-extend-native": "error",
139
- "no-extra-bind": "error",
140
- "no-extra-boolean-cast": "off",
141
- "no-extra-label": "error",
142
- "no-extra-semi": "error",
143
- "no-floating-decimal": "error",
144
- "no-global-assign": "error",
145
- "no-implicit-coercion": "off",
146
- "no-implicit-globals": "error",
147
- "no-implied-eval": "error",
148
- "no-inline-comments": "off",
149
- "no-invalid-this": "off",
150
- "no-iterator": "error",
151
- "no-label-var": "error",
152
- "no-labels": "error",
153
- "no-lone-blocks": "error",
154
- "no-lonely-if": "off",
155
- "no-loop-func": "error",
156
- "no-magic-numbers": "off",
157
- "no-mixed-operators": "off",
158
- "no-multi-assign": "off",
159
- "no-multi-str": "error",
160
- "no-negated-condition": "off",
161
- "no-nested-ternary": "off",
162
- "no-new": "warn",
163
- "no-new-func": "error",
164
- "no-new-object": "error",
165
- "no-new-wrappers": "error",
166
- "no-nonoctal-decimal-escape": "error",
167
- "no-octal": "error",
168
- "no-octal-escape": "error",
169
- "no-param-reassign": "off",
170
- "no-plusplus": "off",
171
- "no-proto": "error",
172
- "no-redeclare": "error",
173
- "no-regex-spaces": "error",
174
- "no-restricted-exports": "error",
175
- "no-restricted-globals": "off",
176
- "no-restricted-imports": "error",
177
- "no-restricted-properties": "off",
178
- "no-restricted-syntax": "error",
179
- "no-return-assign": "error",
180
- "no-script-url": "error",
181
- "no-sequences": "error",
182
- "no-shadow": "off",
183
- "no-shadow-restricted-names": "error",
184
- "no-ternary": "off",
185
- "no-throw-literal": "error",
186
- "no-undef-init": "error",
187
- "no-undefined": "off",
188
- "no-underscore-dangle": "off",
189
- "no-unneeded-ternary": "error",
190
- "no-unused-expressions": "error",
191
- "no-unused-labels": "error",
192
- "no-useless-call": "error",
193
- "no-useless-catch": "error",
194
- "no-useless-computed-key": "error",
195
- "no-useless-concat": "error",
196
- "no-useless-constructor": "error",
197
- "no-useless-escape": "off",
198
- "no-useless-rename": "error",
199
- "no-useless-return": "error",
200
- "no-var": "off", // update to error
201
- "no-void": "error",
202
- "no-warning-comments": "off",
203
- "no-with": "error",
204
- "object-shorthand": "off",
205
- "one-var": "off",
206
- "one-var-declaration-per-line": "off",
207
- "operator-assignment": ["error", "always"],
208
- "prefer-arrow-callback": "error",
209
- "prefer-const": "error",
210
- "prefer-destructuring": "off",
211
- "prefer-exponentiation-operator": "off",
212
- "prefer-named-capture-group": "off",
213
- "prefer-numeric-literals": "error",
214
- "prefer-object-has-own": "off",
215
- "prefer-object-spread": "off",
216
- "prefer-promise-reject-errors": "error",
217
- "prefer-regex-literals": "off",
218
- "prefer-rest-params": "off",
219
- "prefer-spread": "warn",
220
- "prefer-template": "error",
221
- "quote-props": "off",
222
- "radix": "error",
223
- "require-await": "error",
224
- "require-unicode-regexp": "off",
225
- "require-yield": "error",
226
- "sort-imports": "off",
227
- "sort-keys": "off",
228
- "sort-vars": "off",
229
- "spaced-comment": [
230
- "error", "always", {
231
- "exceptions": ["/"]
232
- }
233
- ],
234
- "strict": "error",
235
- "symbol-description": "error",
236
- "vars-on-top": "off",
237
- "yoda": "error",
238
-
239
- // Layout & Formatting
240
- "array-bracket-newline": ["error", "consistent"],
241
- "array-bracket-spacing": ["error", "never"],
242
- "array-element-newline": "off",
243
- "arrow-parens": [
244
- "error", "as-needed", {
245
- "requireForBlockBody": true
246
- }
247
- ],
248
- "arrow-spacing": "error",
249
- "block-spacing": "error",
250
- "brace-style": "error",
251
- "comma-dangle": ["error", "never"],
252
- "comma-spacing": [
253
- "error", {
254
- "before": false,
255
- "after": true
256
- }
257
- ],
258
- "comma-style": ["error", "last"],
259
- "computed-property-spacing": ["error", "never"],
260
- "dot-location": ["error", "property"],
261
- "eol-last": ["error", "always"],
262
- "func-call-spacing": ["error", "never"],
263
- "function-call-argument-newline": "off",
264
- "function-paren-newline": "off",
265
- "generator-star-spacing": "error",
266
- "implicit-arrow-linebreak": "error",
267
- "indent": ["error", 4, {
268
- "MemberExpression": 0,
269
- "SwitchCase": 1
270
- }],
271
- "jsx-quotes": "off",
272
- "key-spacing": [
273
- "error", {
274
- "beforeColon": false,
275
- "afterColon": true
276
- }
277
- ],
278
- "keyword-spacing": [
279
- "error", {
280
- "before": true,
281
- "after": true
282
- }
283
- ],
284
- "line-comment-position": "off",
285
- "linebreak-style": "off",
286
- "lines-around-comment": "off",
287
- "lines-between-class-members": ["error", "always"],
288
- "max-len": "off",
289
- "max-statements-per-line": "off",
290
- "multiline-ternary": "off",
291
- "new-parens": "error",
292
- "newline-per-chained-call": "off",
293
- "no-extra-parens": ["error", "functions"],
294
- "no-mixed-spaces-and-tabs": "error",
295
- "no-multi-spaces": [
296
- "error", {
297
- "ignoreEOLComments": true,
298
- "exceptions": {
299
- "ArrayExpression": true,
300
- "AssignmentExpression": true,
301
- "BinaryExpression": true,
302
- "IfStatement": true,
303
- "LogicalExpression": true,
304
- "SwitchCase": true,
305
- "VariableDeclarator": true
306
- }
307
- }
308
- ],
309
- "no-multiple-empty-lines": [
310
- "error", {
311
- "max": 2,
312
- "maxBOF": 0,
313
- "maxEOF": 0
314
- }
315
- ],
316
- "no-tabs": "error",
317
- "no-trailing-spaces": "error",
318
- "no-whitespace-before-property": "error",
319
- "nonblock-statement-body-position": "off",
320
- "object-curly-newline": [
321
- "error", {
322
- "consistent": true
323
- }
324
- ],
325
- "object-curly-spacing": ["error", "always"],
326
- "object-property-newline": [
327
- "error", {
328
- "allowAllPropertiesOnSameLine": true
329
- }
330
- ],
331
- "operator-linebreak": ["error", "after"],
332
- "padded-blocks": [
333
- "error", {
334
- "classes": "never"
335
- }
336
- ],
337
- "padding-line-between-statements": "off",
338
- "quotes": ["error", "single"],
339
- "rest-spread-spacing": "error",
340
- "semi": ["error", "always"],
341
- "semi-spacing": [
342
- "error", {
343
- "before": false,
344
- "after": true
345
- }
346
- ],
347
- "semi-style": ["error", "last"],
348
- "space-before-blocks": "error",
349
- "space-before-function-paren": [
350
- "error", {
351
- "anonymous": "always",
352
- "named": "never"
353
- }
354
- ],
355
- "space-in-parens": ["error", "never"],
356
- "space-infix-ops": [
357
- "error", {
358
- "int32Hint": false
359
- }
360
- ],
361
- "space-unary-ops": [
362
- "error", {
363
- "words": true,
364
- "nonwords": false,
365
- "overrides": {
366
- }
367
- }],
368
- "switch-colon-spacing": [
369
- "error", {
370
- "after": true,
371
- "before": false
372
- }
373
- ],
374
- "template-curly-spacing": "error",
375
- "template-tag-spacing": "error",
376
- "unicode-bom": ["error", "never"],
377
- "wrap-iife": "off",
378
- "wrap-regex": "off",
379
- "yield-star-spacing": "error",
380
-
381
- // Import rules
382
-
383
- // Static analysis
384
- "import/default": "error",
385
- "import/named": "error",
386
- "import/namespace": "error",
387
- "import/no-unresolved": "error",
388
- "import/order": ["error", {
389
- "groups": ["builtin", "external", "internal", ["parent", "sibling"], "index", "unknown"],
390
- "newlines-between": "always",
391
- "alphabetize": { "order": "asc", "caseInsensitive": true }
392
- }],
393
-
394
- // Helpful warnings
395
- "import/export": "error",
396
- "import/no-named-as-default": "warn",
397
- "import/no-named-as-default-member": "warn",
398
-
399
- // Style guide
400
- "import/extensions": ["error", "always", { "ts": "never", "tsx": "never" }],
401
- "import/no-duplicates": "warn",
402
-
403
- // JSDoc rules
404
- "jsdoc/check-access": "error",
405
- "jsdoc/check-alignment": "error",
406
- "jsdoc/check-examples": "off",
407
- "jsdoc/check-indentation": "off",
408
- "jsdoc/check-line-alignment": "error",
409
- "jsdoc/check-param-names": "off",
410
- "jsdoc/check-property-names": "error",
411
- "jsdoc/check-syntax": "error",
412
- "jsdoc/check-tag-names": ["error", { "definedTags": ["import"] }],
413
- "jsdoc/check-types": "off",
414
- "jsdoc/check-values": "error",
415
- "jsdoc/empty-tags": "error",
416
- "jsdoc/implements-on-classes": "error",
417
- "jsdoc/informative-docs": "off",
418
- "jsdoc/match-description": "off",
419
- "jsdoc/match-name": "off",
420
- "jsdoc/multiline-blocks": "error",
421
- "jsdoc/no-bad-blocks": "error",
422
- "jsdoc/no-blank-block-descriptions": "error",
423
- "jsdoc/no-blank-blocks": "error",
424
- "jsdoc/no-defaults": "error",
425
- "jsdoc/no-missing-syntax": "off",
426
- "jsdoc/no-multi-asterisks": "error",
427
- "jsdoc/no-restricted-syntax": "off",
428
- "jsdoc/no-types": "off",
429
- "jsdoc/no-undefined-types": "off",
430
- "jsdoc/require-asterisk-prefix": "error",
431
- "jsdoc/require-description": "off",
432
- "jsdoc/require-description-complete-sentence": [
433
- "off", {
434
- "abbreviations": ["e.g."]
435
- }
436
- ],
437
- "jsdoc/require-example": "off",
438
- "jsdoc/require-file-overview": "off",
439
- "jsdoc/require-hyphen-before-param-description": ["error", "always"],
440
- "jsdoc/require-jsdoc": "off",
441
- "jsdoc/require-param": "error",
442
- "jsdoc/require-param-description": "error",
443
- "jsdoc/require-param-name": "error",
444
- "jsdoc/require-param-type": "error",
445
- "jsdoc/require-property": "error",
446
- "jsdoc/require-property-description": "error",
447
- "jsdoc/require-property-name": "error",
448
- "jsdoc/require-property-type": "error",
449
- "jsdoc/require-returns": "error",
450
- "jsdoc/require-returns-check": "error",
451
- "jsdoc/require-returns-description": "error",
452
- "jsdoc/require-returns-type": "error",
453
- "jsdoc/require-throws": "off",
454
- "jsdoc/require-yields": "error",
455
- "jsdoc/require-yields-check": "error",
456
- "jsdoc/sort-tags": "off",
457
- "jsdoc/tag-lines": "off",
458
- "jsdoc/text-escaping": "off",
459
- "jsdoc/valid-types": "off",
460
-
461
- // Regex rules
462
- "no-control-regex": "error",
463
- "no-misleading-character-class": "error",
464
- "no-regex-spaces": "error",
465
- "prefer-regex-literals": "error",
466
- "no-invalid-regexp": "off",
467
- "no-useless-backreference": "off",
468
- "no-empty-character-class": "off",
469
- "regexp/confusing-quantifier": "warn",
470
- "regexp/control-character-escape": "error",
471
- "regexp/match-any": "error",
472
- "regexp/negation": "error",
473
- "regexp/no-contradiction-with-assertion": "error",
474
- "regexp/no-dupe-characters-character-class": "error",
475
- "regexp/no-dupe-disjunctions": "error",
476
- "regexp/no-empty-alternative": "warn",
477
- "regexp/no-empty-capturing-group": "error",
478
- "regexp/no-empty-character-class": "error",
479
- "regexp/no-empty-group": "error",
480
- "regexp/no-empty-lookarounds-assertion": "error",
481
- "regexp/no-empty-string-literal": "error",
482
- "regexp/no-escape-backspace": "error",
483
- "regexp/no-extra-lookaround-assertions": "error",
484
- "regexp/no-invalid-regexp": "error",
485
- "regexp/no-invisible-character": "error",
486
- "regexp/no-lazy-ends": "warn",
487
- "regexp/no-legacy-features": "error",
488
- "regexp/no-misleading-capturing-group": "error",
489
- "regexp/no-misleading-unicode-character": "error",
490
- "regexp/no-missing-g-flag": "error",
491
- "regexp/no-non-standard-flag": "error",
492
- "regexp/no-obscure-range": "error",
493
- "regexp/no-optional-assertion": "error",
494
- "regexp/no-potentially-useless-backreference": "warn",
495
- "regexp/no-super-linear-backtracking": "error",
496
- "regexp/no-trivially-nested-assertion": "error",
497
- "regexp/no-trivially-nested-quantifier": "error",
498
- "regexp/no-unused-capturing-group": "error",
499
- "regexp/no-useless-assertions": "error",
500
- "regexp/no-useless-backreference": "error",
501
- "regexp/no-useless-character-class": "error",
502
- "regexp/no-useless-dollar-replacements": "error",
503
- "regexp/no-useless-escape": "error",
504
- "regexp/no-useless-flag": "warn",
505
- "regexp/no-useless-lazy": "error",
506
- "regexp/no-useless-non-capturing-group": "error",
507
- "regexp/no-useless-quantifier": "error",
508
- "regexp/no-useless-range": "error",
509
- "regexp/no-useless-set-operand": "error",
510
- "regexp/no-useless-string-literal": "error",
511
- "regexp/no-useless-two-nums-quantifier": "error",
512
- "regexp/no-zero-quantifier": "error",
513
- "regexp/optimal-lookaround-quantifier": "warn",
514
- "regexp/optimal-quantifier-concatenation": "error",
515
- "regexp/prefer-character-class": "error",
516
- "regexp/prefer-d": "error",
517
- "regexp/prefer-plus-quantifier": "error",
518
- "regexp/prefer-predefined-assertion": "error",
519
- "regexp/prefer-question-quantifier": "error",
520
- "regexp/prefer-range": "error",
521
- "regexp/prefer-set-operation": "error",
522
- "regexp/prefer-star-quantifier": "error",
523
- "regexp/prefer-unicode-codepoint-escapes": "error",
524
- "regexp/prefer-w": "error",
525
- "regexp/simplify-set-operations": "error",
526
- "regexp/sort-flags": "error",
527
- "regexp/strict": "error",
528
- "regexp/use-ignore-case": "error",
529
- },
530
-
531
- "plugins": [
532
- "import",
533
- "jsdoc",
534
- "regexp"
535
- ],
536
-
537
- "settings": {
538
- "jsdoc": {
539
- "mode": "typescript"
540
- }
541
- },
542
-
543
- "env": {
544
- "browser": true,
545
- "es2022": true,
546
- "node": true,
547
- "worker": true
548
- }
549
-
550
- };