@enigmatry/eslint-config 1.2.25 → 1.2.27

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.
Files changed (2) hide show
  1. package/index.js +141 -88
  2. package/package.json +19 -21
package/index.js CHANGED
@@ -1,15 +1,16 @@
1
1
  'use strict';
2
2
  module.exports = {
3
- root: true,
4
- env: {
5
- browser: true,
6
- jest: true,
7
- node: true
8
- },
9
- overrides: [
3
+ root: true,
4
+ env: {
5
+ browser: true,
6
+ jest: true,
7
+ node: true
8
+ },
9
+ overrides: [
10
10
  {
11
- files: [ "*.ts" ],
12
- plugins: [ "@typescript-eslint", "@angular-eslint", "no-loops", "no-secrets", "no-unsanitized", "promise", "unused-imports", "xss", "deprecation" ],
11
+ files: ["*.ts"],
12
+ plugins: ["@typescript-eslint", "@angular-eslint", "no-loops", "no-secrets",
13
+ "import", "no-unsanitized", "promise", "unused-imports", "xss", "deprecation"],
13
14
  parser: "@typescript-eslint/parser",
14
15
  parserOptions: {
15
16
  project: [
@@ -22,11 +23,11 @@ module.exports = {
22
23
  "plugin:@angular-eslint/recommended",
23
24
  "plugin:@angular-eslint/template/process-inline-templates"
24
25
  ],
25
- rules: {
26
- // The rules below are listed in the order they appear on the eslint
27
- // rules page. All rules are listed to make it easier to keep in sync
28
- // as new ESLint rules are added.
29
- // http://eslint.org/docs/rules/
26
+ rules: {
27
+ // The rules below are listed in the order they appear on the eslint
28
+ // rules page. All rules are listed to make it easier to keep in sync
29
+ // as new ESLint rules are added.
30
+ // http://eslint.org/docs/rules/
30
31
  "for-direction": "error",
31
32
  "getter-return": "error",
32
33
  "no-async-promise-executor": "error",
@@ -71,7 +72,6 @@ module.exports = {
71
72
  "require-atomic-updates": "error",
72
73
  "use-isnan": "error",
73
74
  "valid-typeof": "error",
74
- "accessor-pairs": "error",
75
75
  "array-callback-return": "error",
76
76
  "block-scoped-var": "error",
77
77
  "class-methods-use-this": "off",
@@ -81,12 +81,12 @@ module.exports = {
81
81
  "default-case": "warn",
82
82
  "default-case-last": "error",
83
83
  "default-param-last": "off",
84
- "dot-location": [ "error", "property" ],
84
+ "dot-location": ["error", "property"],
85
85
  "dot-notation": "off",
86
86
  "eqeqeq": "error",
87
87
  "grouped-accessor-pairs": "warn",
88
88
  "guard-for-in": "warn",
89
- "max-classes-per-file": [ "error", 1 ],
89
+ "max-classes-per-file": ["error", 1],
90
90
  "no-alert": "error",
91
91
  "no-caller": "error",
92
92
  "no-case-declarations": "error",
@@ -134,9 +134,11 @@ module.exports = {
134
134
  "no-unmodified-loop-condition": "error",
135
135
  "no-unused-expressions": "off",
136
136
  "no-unused-labels": "error",
137
+ "no-unused-private-class-members": "error",
137
138
  "no-useless-call": "error",
138
139
  "no-useless-catch": "error",
139
140
  "no-useless-concat": "error",
141
+ "no-useless-empty-export": "off",
140
142
  "no-useless-escape": "error",
141
143
  "no-useless-return": "error",
142
144
  "no-void": "error",
@@ -164,7 +166,7 @@ module.exports = {
164
166
  "no-unused-vars": "off",
165
167
  "no-use-before-define": "off",
166
168
  "array-bracket-newline": "off",
167
- "array-bracket-spacing": [ "error", "never" ],
169
+ "array-bracket-spacing": ["error", "never"],
168
170
  "array-element-newline": "off",
169
171
  "block-spacing": "error",
170
172
  "brace-style": "off",
@@ -192,24 +194,17 @@ module.exports = {
192
194
  ],
193
195
  "id-match": "off",
194
196
  "implicit-arrow-linebreak": "off",
195
- "indent": [ "off", "tab" ],
197
+ "import/no-duplicates": "off",
198
+ "indent": ["off", "tab"],
196
199
  "jsx-quotes": "error",
197
200
  "key-spacing": "error",
198
201
  "keyword-spacing": "off",
199
- "line-comment-position": "error",
200
- "linebreak-style": "off",
201
- "lines-around-comment": [
202
- "error",
203
- {
204
- "allowClassStart": true
205
- }
206
- ],
207
202
  "lines-between-class-members": [
208
203
  "off",
209
204
  "always",
210
205
  { "exceptAfterSingleLine": true }
211
206
  ],
212
- "max-depth": [ "error", 3 ],
207
+ "max-depth": ["error", 3],
213
208
  "max-len": [
214
209
  "error",
215
210
  {
@@ -217,11 +212,11 @@ module.exports = {
217
212
  "ignoreComments": true
218
213
  }
219
214
  ],
220
- "max-lines": [ "error", 150 ],
221
- "max-lines-per-function": [ "error", 40 ],
222
- "max-nested-callbacks": [ "error", 3 ],
223
- "max-params": [ "error", 8 ],
224
- "max-statements": [ "error", 20 ],
215
+ "max-lines": ["error", 150],
216
+ "max-lines-per-function": ["error", 40],
217
+ "max-nested-callbacks": ["error", 3],
218
+ "max-params": ["error", 8],
219
+ "max-statements": ["error", 20],
225
220
  "max-statements-per-line": "error",
226
221
  "multiline-ternary": "off",
227
222
  "new-cap": "off",
@@ -249,7 +244,7 @@ module.exports = {
249
244
  "no-underscore-dangle": "off",
250
245
  "no-unneeded-ternary": "error",
251
246
  "no-whitespace-before-property": "error",
252
- "nonblock-statement-body-position": [ "error", "below" ],
247
+ "nonblock-statement-body-position": ["error", "below"],
253
248
  "object-curly-newline": "off",
254
249
  "object-curly-spacing": "off",
255
250
  "object-property-newline": [
@@ -260,11 +255,11 @@ module.exports = {
260
255
  "one-var-declaration-per-line": "off",
261
256
  "operator-assignment": "error",
262
257
  "operator-linebreak": "off",
263
- "padded-blocks": [ "error", "never" ],
258
+ "padded-blocks": ["error", "never"],
264
259
  "padding-line-between-statements": "off",
265
260
  "prefer-exponentiation-operator": "off",
266
261
  "prefer-object-spread": "off",
267
- "quote-props": [ "error", "as-needed" ],
262
+ "quote-props": ["error", "as-needed"],
268
263
  "quotes": "off",
269
264
  "semi": "off",
270
265
  "semi-spacing": "error",
@@ -298,7 +293,8 @@ module.exports = {
298
293
  "no-confusing-arrow": "off",
299
294
  "no-const-assign": "error",
300
295
  "no-dupe-class-members": "off",
301
- "no-duplicate-imports": "off",
296
+ "no-empty-static-block": "off",
297
+ "no-new-native-nonconstructor": "error",
302
298
  "no-new-symbol": "error",
303
299
  "no-restricted-exports": "off",
304
300
  "no-restricted-imports": "off",
@@ -324,21 +320,25 @@ module.exports = {
324
320
  "no-loops/no-loops": 2,
325
321
  "no-secrets/no-secrets": [
326
322
  "error",
327
- { "ignoreContent": [ "__zone_symbol__UNPATCHED_EVENTS" ] }
323
+ { "ignoreContent": ["__zone_symbol__UNPATCHED_EVENTS"] }
328
324
  ],
329
325
  "no-unsanitized/method": "error",
330
326
  "no-unsanitized/property": "error",
331
- "promise/always-return": "error",
327
+ "promise/always-return": [
328
+ "error",
329
+ { "ignoreLastCallback": true }
330
+ ],
332
331
  "promise/no-return-wrap": [
333
332
  "error",
334
333
  { "allowReject": true }
335
334
  ],
335
+ "promise/no-multiple-resolved": "error",
336
336
  "promise/param-names": "error",
337
337
  "promise/catch-or-return": [
338
338
  "error",
339
339
  {
340
340
  "allowThen": true,
341
- "terminationMethod": [ "catch", "finally" ]
341
+ "terminationMethod": ["catch", "finally"]
342
342
  }
343
343
  ],
344
344
  "promise/no-native": "off",
@@ -362,12 +362,12 @@ module.exports = {
362
362
  "xss/no-mixed-html": [
363
363
  2,
364
364
  {
365
- "htmlVariableRules": [ "AsHtml", "HtmlEncoded/i", "^html$" ],
366
- "htmlFunctionRules": [ ".asHtml/i", "toHtml" ],
365
+ "htmlVariableRules": ["AsHtml", "HtmlEncoded/i", "^html$"],
366
+ "htmlFunctionRules": [".asHtml/i", "toHtml"],
367
367
  "functions": {
368
368
  "$": {
369
369
  "htmlInput": true,
370
- "safe": [ "document", "this" ]
370
+ "safe": ["document", "this"]
371
371
  },
372
372
  ".html": {
373
373
  "htmlInput": true,
@@ -388,46 +388,95 @@ module.exports = {
388
388
  "escapeFunc": "escapeHref"
389
389
  }
390
390
  ],
391
- "@typescript-eslint/brace-style": [ "error" ],
392
- "@typescript-eslint/comma-dangle": [ "error", "never" ],
393
- "@typescript-eslint/comma-spacing": [ "error" ],
394
- "@typescript-eslint/consistent-type-exports": [
395
- "error",
391
+ "import/export": ["error"],
392
+ "import/no-deprecated": ["error"],
393
+ "import/no-empty-named-blocks": ["error"],
394
+ "import/no-extraneous-dependencies": ["error"],
395
+ "import/no-mutable-exports": ["error"],
396
+ "import/no-named-as-default": ["error"],
397
+ "import/no-named-as-default-member": ["error"],
398
+ "import/no-unused-modules": ["off"],
399
+ "import/no-amd": ["error"],
400
+ "import/no-commonjs": ["error"],
401
+ "import/no-import-module-exports": ["error"],
402
+ "import/no-nodejs-modules": ["off"],
403
+ "import/unambiguous": ["error"],
404
+ "import/default": ["error"],
405
+ "import/named": ["off"],
406
+ "import/namespace": ["error"],
407
+ "import/no-absolute-path": ["off"],
408
+ "import/no-cycle": ["error"],
409
+ "import/no-dynamic-require": ["off"],
410
+ "import/no-internal-modules": ["off"],
411
+ "import/no-relative-packages": ["off"],
412
+ "import/no-relative-parent-imports": ["off"],
413
+ "import/no-restricted-paths": ["off"],
414
+ "import/no-self-import": ["error"],
415
+ "import/no-unresolved": ["off"],
416
+ "import/no-useless-path-segments": ["error"],
417
+ "import/no-webpack-loader-syntax": ["error"],
418
+ "import/consistent-type-specifier-style": ["off"],
419
+ "import/dynamic-import-chunkname": ["off"],
420
+ "import/exports-last": ["off"],
421
+ "import/extensions": ["off", "never"],
422
+ "import/first": ["error"],
423
+ "import/max-dependencies": ["error", {
424
+ "max": 20,
425
+ "ignoreTypeImports": false,
426
+ }],
427
+ "import/newline-after-import": ["error"],
428
+ "import/no-anonymous-default-export": ["error"],
429
+ "import/no-default-export": ["off"],
430
+ "import/no-duplicates": ["error"],
431
+ "import/no-named-default": ["error"],
432
+ "import/no-named-export": ["off"],
433
+ "import/no-namespace": ["off"],
434
+ "import/no-unassigned-import": ["off"],
435
+ "import/order": ["error", { "alphabetize": { "order": "asc", "caseInsensitive": true } }],
436
+ "import/prefer-default-export": ["off"],
437
+ "@typescript-eslint/brace-style": ["error"],
438
+ "@typescript-eslint/comma-dangle": ["error", "never"],
439
+ "@typescript-eslint/comma-spacing": ["error"],
440
+ "@typescript-eslint/consistent-type-exports": [
441
+ "error",
396
442
  {
397
443
  "fixMixedExportsWithInlineTypeSpecifier": true
398
444
  }
399
445
  ],
400
- "@typescript-eslint/consistent-type-imports": [ "off" ],
401
- "@typescript-eslint/default-param-last": [ "error" ],
402
- "@typescript-eslint/dot-notation": [ "error" ],
403
- "@typescript-eslint/func-call-spacing": [ "error" ],
404
- "@typescript-eslint/indent": [ "off", "tab" ],
405
- "@typescript-eslint/init-declarations": [ "off" ],
406
- "@typescript-eslint/keyword-spacing": [ "error" ],
446
+ "@typescript-eslint/consistent-type-imports": ["off"],
447
+ "@typescript-eslint/default-param-last": ["error"],
448
+ "@typescript-eslint/dot-notation": ["error"],
449
+ "@typescript-eslint/func-call-spacing": ["error"],
450
+ "@typescript-eslint/indent": ["off", "tab"],
451
+ "@typescript-eslint/init-declarations": ["off"],
452
+ "@typescript-eslint/keyword-spacing": ["error"],
407
453
  "@typescript-eslint/lines-between-class-members": [
408
454
  "error",
409
455
  "always",
410
456
  { "exceptAfterSingleLine": true }
411
457
  ],
412
- "@typescript-eslint/no-array-constructor": [ "error" ],
413
- "@typescript-eslint/no-dupe-class-members": [ "error" ],
414
- "@typescript-eslint/no-duplicate-imports": [ "error" ],
415
- "@typescript-eslint/no-empty-function": [ "error" ],
416
- "@typescript-eslint/no-extra-parens": [ "error" ],
417
- "@typescript-eslint/no-extra-semi": [ "error" ],
418
- "@typescript-eslint/no-implied-eval": [ "error" ],
419
- "@typescript-eslint/no-invalid-this": [ "error" ],
420
- "@typescript-eslint/no-loop-func": [ "error" ],
421
- "@typescript-eslint/no-loss-of-precision": [ "error" ],
458
+ "@typescript-eslint/no-array-constructor": ["error"],
459
+ "@typescript-eslint/no-dupe-class-members": ["error"],
460
+ "@typescript-eslint/no-empty-function": ["error"],
461
+ "@typescript-eslint/no-extra-parens": ["error"],
462
+ "@typescript-eslint/no-extra-semi": ["error"],
463
+ "@typescript-eslint/no-implied-eval": ["error"],
464
+ "@typescript-eslint/no-import-type-side-effects": "error",
465
+ "@typescript-eslint/no-invalid-this": ["error"],
466
+ "@typescript-eslint/no-loop-func": ["error"],
467
+ "@typescript-eslint/no-loss-of-precision": ["error"],
422
468
  "@typescript-eslint/no-magic-numbers": [
423
469
  "error",
424
470
  {
425
- "ignore": [ 0, 1 ],
471
+ "ignore": [0, 1],
472
+ "enforceConst": true,
426
473
  "ignoreArrayIndexes": true,
474
+ "ignoreClassFieldInitialValues": true,
427
475
  "ignoreDefaultValues": true,
428
476
  "ignoreEnums": true,
477
+ "ignoreNumericLiteralTypes": true,
429
478
  "ignoreReadonlyClassProperties": true,
430
- "enforceConst": true
479
+ "ignoreTypeIndexes": true
431
480
  }
432
481
  ],
433
482
  "@typescript-eslint/no-meaningless-void-operator": [
@@ -436,34 +485,38 @@ module.exports = {
436
485
  "checkNever": false
437
486
  }
438
487
  ],
439
- "@typescript-eslint/no-non-null-assertion": [ "error" ],
440
- "@typescript-eslint/no-redeclare": [ "error" ],
441
- "@typescript-eslint/no-restricted-imports": [ "off" ],
442
- "@typescript-eslint/no-shadow": [ "error" ],
443
- "@typescript-eslint/no-throw-literal": [ "error" ],
444
- "@typescript-eslint/no-unused-expressions": [ "error" ],
488
+ "@typescript-eslint/no-mixed-enums": "error",
489
+ "@typescript-eslint/no-non-null-assertion": ["error"],
490
+ "@typescript-eslint/no-redeclare": ["error"],
491
+ "@typescript-eslint/no-redundant-type-constituents": ["error"],
492
+ "@typescript-eslint/no-restricted-imports": ["off"],
493
+ "@typescript-eslint/no-shadow": ["error"],
494
+ "@typescript-eslint/no-throw-literal": ["error"],
495
+ "@typescript-eslint/no-unsafe-declaration-merging": ["error"],
496
+ "@typescript-eslint/no-unused-expressions": ["error"],
445
497
  "@typescript-eslint/no-unused-vars": [
446
498
  "error",
447
499
  { "argsIgnorePattern": "^_" }
448
500
  ],
449
- "@typescript-eslint/no-use-before-define": [ "error" ],
450
- "@typescript-eslint/no-useless-constructor": [ "error" ],
451
- "@typescript-eslint/object-curly-spacing": [ "error", "always" ],
501
+ "@typescript-eslint/no-use-before-define": ["error"],
502
+ "@typescript-eslint/no-useless-constructor": ["error"],
503
+ "@typescript-eslint/object-curly-spacing": ["error", "always"],
504
+ "@typescript-eslint/parameter-properties": "off",
452
505
  "@typescript-eslint/quotes": [
453
506
  "error",
454
507
  "single",
455
508
  { "allowTemplateLiterals": true }
456
509
  ],
457
- "@typescript-eslint/require-await": [ "error" ],
458
- "@typescript-eslint/return-await": [ "error" ],
459
- "@typescript-eslint/semi": [ "error" ],
460
- "@typescript-eslint/space-before-function-paren": [ "error", "never" ],
461
- "@typescript-eslint/space-infix-ops": [ "error" ],
510
+ "@typescript-eslint/require-await": ["error"],
511
+ "@typescript-eslint/return-await": ["error"],
512
+ "@typescript-eslint/semi": ["error"],
513
+ "@typescript-eslint/space-before-function-paren": ["error", "never"],
514
+ "@typescript-eslint/space-infix-ops": ["error"],
462
515
  "@angular-eslint/component-selector": [
463
516
  "error",
464
517
  {
465
518
  "type": "element",
466
- "prefix": [ "app", "enigmatry", "appg" ],
519
+ "prefix": ["app", "enigmatry", "appg"],
467
520
  "style": "kebab-case"
468
521
  }
469
522
  ],
@@ -471,18 +524,18 @@ module.exports = {
471
524
  "error",
472
525
  {
473
526
  "type": "attribute",
474
- "prefix": [ "app", "enigmatry", "appg" ],
527
+ "prefix": ["app", "enigmatry", "appg"],
475
528
  "style": "camelCase"
476
529
  }
477
- ],
530
+ ],
478
531
  "deprecation/deprecation": "error"
479
532
  }
480
- },
533
+ },
481
534
  {
482
- files: [ "*.html" ],
483
- extends: [ "plugin:@angular-eslint/template/recommended" ],
535
+ files: ["*.html"],
536
+ extends: ["plugin:@angular-eslint/template/recommended"],
484
537
  parser: "@angular-eslint/template-parser",
485
- plugins: [ "@angular-eslint/template" ]
538
+ plugins: ["@angular-eslint/template"]
486
539
  }
487
540
  ]
488
541
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmatry/eslint-config",
3
- "version": "1.2.25",
3
+ "version": "1.2.27",
4
4
  "author": "Enigmatry",
5
5
  "description": "ESLint shareable config for the Enigmatry style.",
6
6
  "homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/projects/eslint-config#readme",
@@ -13,12 +13,11 @@
13
13
  "index.js"
14
14
  ],
15
15
  "dependencies": {
16
- "eslint": "8.32.0",
17
- "@typescript-eslint/eslint-plugin": "5.48.1",
18
- "@typescript-eslint/parser": "5.48.1",
16
+ "eslint": "8.37.0",
17
+ "@typescript-eslint/eslint-plugin": "5.57.0",
18
+ "@typescript-eslint/parser": "5.57.0",
19
19
  "eslint-plugin-deprecation": "1.3.3",
20
- "eslint-plugin-import": "2.27.4",
21
- "eslint-plugin-jsdoc": "39.6.4",
20
+ "eslint-plugin-import": "2.27.5",
22
21
  "eslint-plugin-no-loops": "0.3.0",
23
22
  "eslint-plugin-no-secrets": "0.8.9",
24
23
  "eslint-plugin-no-unsanitized": "4.0.2",
@@ -26,19 +25,18 @@
26
25
  "eslint-plugin-promise": "6.1.1",
27
26
  "eslint-plugin-unused-imports": "2.0.0",
28
27
  "eslint-plugin-xss": "0.1.12",
29
- "@angular-eslint/builder": "14.0.2",
30
- "@angular-eslint/eslint-plugin": "14.0.2",
31
- "@angular-eslint/eslint-plugin-template": "14.0.2",
32
- "@angular-eslint/schematics": "14.0.2",
33
- "@angular-eslint/template-parser": "14.0.2"
28
+ "@angular-eslint/builder": "14.4.0",
29
+ "@angular-eslint/eslint-plugin": "14.4.0",
30
+ "@angular-eslint/eslint-plugin-template": "14.4.0",
31
+ "@angular-eslint/schematics": "14.4.0",
32
+ "@angular-eslint/template-parser": "14.4.0"
34
33
  },
35
34
  "peerDependencies": {
36
- "eslint": "8.32.0",
37
- "@typescript-eslint/eslint-plugin": "5.48.1",
38
- "@typescript-eslint/parser": "5.48.1",
35
+ "eslint": "8.37.0",
36
+ "@typescript-eslint/eslint-plugin": "5.57.0",
37
+ "@typescript-eslint/parser": "5.57.0",
39
38
  "eslint-plugin-deprecation": "1.3.3",
40
- "eslint-plugin-import": "2.27.4",
41
- "eslint-plugin-jsdoc": "39.6.4",
39
+ "eslint-plugin-import": "2.27.5",
42
40
  "eslint-plugin-no-loops": "0.3.0",
43
41
  "eslint-plugin-no-secrets": "0.8.9",
44
42
  "eslint-plugin-no-unsanitized": "4.0.2",
@@ -46,11 +44,11 @@
46
44
  "eslint-plugin-promise": "6.1.1",
47
45
  "eslint-plugin-unused-imports": "2.0.0",
48
46
  "eslint-plugin-xss": "0.1.12",
49
- "@angular-eslint/builder": "14.0.2",
50
- "@angular-eslint/eslint-plugin": "14.0.2",
51
- "@angular-eslint/eslint-plugin-template": "14.0.2",
52
- "@angular-eslint/schematics": "14.0.2",
53
- "@angular-eslint/template-parser": "14.0.2"
47
+ "@angular-eslint/builder": "14.4.0",
48
+ "@angular-eslint/eslint-plugin": "14.4.0",
49
+ "@angular-eslint/eslint-plugin-template": "14.4.0",
50
+ "@angular-eslint/schematics": "14.4.0",
51
+ "@angular-eslint/template-parser": "14.4.0"
54
52
  },
55
53
  "publishConfig": {
56
54
  "access": "public"