linter-bundle 2.26.0 → 2.28.0

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/CHANGELOG.md CHANGED
@@ -6,7 +6,104 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.26.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.28.0...HEAD)
10
+
11
+ ## [2.28.0] - 2023-04-21
12
+
13
+ ### Changed
14
+
15
+ - [eslint] Updated `@typescript-eslint` from `5.49.0` to `5.59.0`
16
+ - [eslint] Updated `eslint` from `8.32.0` to `8.39.0`
17
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.5.3` to `3.5.5`
18
+ - [eslint] Updated `eslint-plugin-functional` from `4.4.1` to `5.0.8`
19
+ - [eslint] Updated `eslint-plugin-jsdoc` from `39.6.9` to `43.0.7`
20
+ - [eslint] Updated `eslint-plugin-n` from `15.6.1` to `15.7.0`
21
+ - [eslint] Updated `eslint-plugin-react` from `7.32.1` to `7.32.2`
22
+ - [eslint] Updated `eslint-plugin-unicorn` from `45.0.2` to `46.0.0`
23
+ - [stylelint] Updated `stylelint` from `14.16.1` to `15.5.0`
24
+ - [stylelint] Updated `stylelint-declaration-block-no-ignored-properties` from `2.6.0` to `2.7.0`
25
+ - [stylelint] Updated `stylelint-order` from `6.0.1` to `6.0.3`
26
+ - [stylelint] Updated `stylelint-scss` from `4.3.0` to `4.6.0`
27
+ - [stylelint] Updated `stylelint-use-logical-spec` from `4.1.0` to `5.0.0`
28
+ - [eslint] Consider JavaScript files with the '.mjs' file extension (ECMAScript Modules)
29
+ - [eslint] Activated [`react/destructuring-assignment`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md) rule
30
+ - [stylelint] Since all 76 stylistic Stylelint rules have been marked as deprecated, code to fork them has been implemented
31
+
32
+ ### Added
33
+
34
+ - [eslint] Added new [`@typescript-eslint/key-spacing`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/key-spacing.md) rule
35
+ - [eslint] Added new [`@typescript-eslint/no-duplicate-type-constituents.md`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.md) rule
36
+ - [eslint] Added new [`@typescript-eslint/no-import-type-side-effects`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md) rule
37
+ - [eslint] Added new [`@typescript-eslint/no-mixed-enums`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-mixed-enums.md) rule
38
+ - [eslint] Added new [`@typescript-eslint/no-unsafe-enum-comparison`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md) rule
39
+ - [eslint] Added new [`@typescript-eslint/sort-type-constituents`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md) rule
40
+ - [eslint] Added new [`no-constant-binary-expression`](https://github.com/eslint/eslint/blob/main/docs/src/rules/no-constant-binary-expression.md) rule
41
+ - [eslint] Added new [`functional/prefer-immutable-types`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/prefer-immutable-types.md) rule, but disabled it
42
+ - [eslint] Added new [`functional/readonly-type`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/readonly-type.md) rule with option `keyword`
43
+ - [eslint] Added new [`functional/type-declaration-immutability`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/type-declaration-immutability.md) rule, but disabled it
44
+ - [stylelint] Added new [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-property-value-no-unknown/README.md) rule
45
+ - [stylelint] Added new [`media-feature-name-unit-allowed-list`](https://github.com/stylelint/stylelint/blob/main/lib/rules/media-feature-name-unit-allowed-list/README.md) rule, but disabled it
46
+ - [stylelint] Added new [`no-unknown-custom-properties`](https://github.com/stylelint/stylelint/blob/main/lib/rules/no-unknown-custom-properties/README.md) rule, but disabled
47
+ - [stylelint] Added new [`selector-anb-no-unmatchable`](https://github.com/stylelint/stylelint/blob/main/lib/rules/selector-anb-no-unmatchable/README.md) rule
48
+
49
+ ### Removed
50
+
51
+ - [eslint] Removed deprecated rule `functional/prefer-readonly-type`
52
+ - [eslint/overrides-jsdoc] Removed deprecated rule `jsdoc/newline-after-description`
53
+ - [stylelint] Removed deprecated rule `at-rule-name-newline-after`
54
+ - [stylelint] Removed deprecated rule `block-closing-brace-space-after`
55
+ - [stylelint] Removed deprecated rule `block-opening-brace-newline-before`
56
+
57
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.27.0...v2.28.0)
58
+
59
+ ## [2.27.0] - 2023-01-27
60
+
61
+ ### Changed
62
+
63
+ - [eslint] Updated `@typescript-eslint` from `5.41.0` to `5.49.0`
64
+ - [eslint] Updated `eslint` from `8.26.0` to `8.32.0`
65
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.5.2` to `3.5.3`
66
+ - [eslint] Updated `eslint-plugin-import` from `2.26.0` to `2.27.5`
67
+ - [eslint] Updated `eslint-plugin-jest` from `27.1.3` to `27.2.1`
68
+ - [eslint] Updated `eslint-plugin-jsdoc` from `39.3.25` to `39.6.9`
69
+ - [eslint] Updated `eslint-plugin-jsx-a11y` from `6.6.1` to `6.7.1`
70
+ - [eslint] Updated `eslint-plugin-n` from `15.3.0` to `15.6.1`
71
+ - [eslint] Updated `eslint-plugin-react` from `7.31.10` to `7.32.1`
72
+ - [eslint] Updated `eslint-plugin-unicorn` from `44.0.2` to `45.0.2`
73
+ - [markdownlint] Updated `markdownlint-cli` from `0.32.2` to `0.33.0`
74
+ - [stylelint] Updated `postcss-scss` from `4.0.5` to `4.0.6`
75
+ - [stylelint] Updated `stylelint` from `14.14.0` to `14.16.1`
76
+ - [stylelint] Updated `stylelint-order` from `5.0.0` to `6.0.1`
77
+ - [eslint] Define order for getters and setters and private fields of [`@typescript-eslint/member-ordering`](https://typescript-eslint.io/rules/member-ordering/) rule
78
+
79
+ ### Added
80
+
81
+ - [eslint] Added new [`no-empty-static-block`](https://eslint.org/docs/latest/rules/no-empty-static-block) rule
82
+ - [eslint] Added new [`no-new-native-nonconstructor`](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor) rule
83
+ - [eslint] Added new [`import/no-empty-named-blocks`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-empty-named-blocks.md) rule
84
+ - [eslint] Added new [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/consistent-type-specifier-style.md) rule, and used `"prefer-top-level"` option
85
+ - [eslint] Make use of new `alphabetize.orderImportKind` option of [`import/order`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md) rule, and set it to `"asc"`
86
+ - [eslint] Make use of new `distinctGroup` option of [`import/order`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md) rule, and set it to `false`
87
+ - [eslint] Make use of new `considerComments` option of [`import/newline-after-import`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md) rule, and set it to `true`
88
+ - [eslint] Added new [`unicorn/no-typeof-undefined`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md) rule
89
+ - [eslint] Added, but disabled new [`unicorn/no-negated-condition`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md) rule
90
+ - [eslint] Added new [`unicorn/prefer-set-size`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md) rule
91
+ - [eslint/overrides-jest] Added new [`jest/no-untyped-mock-factory`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-untyped-mock-factory.md) rule for TypeScript files
92
+ - [eslint/overrides-jsdoc] Activate `exemptDestructuredRootsFromChecks` setting for the rules [`jsdoc/require-param-type`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type) and
93
+ [`jsdoc/require-param-description`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-description)
94
+ - [eslint/overrides-jsdoc] Added, but disabled new [`jsdoc/text-escaping`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-text-escaping) rule
95
+ - [eslint/overrides-react] Added, but disabled new [`jsx-a11y/anchor-ambiguous-text`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-ambiguous-text.md) rule
96
+ - [eslint/overrides-react] Added new [`jsx-a11y/no-aria-hidden-on-focusable`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-aria-hidden-on-focusable.md) rule
97
+ - [eslint/overrides-react] Added new [`react/no-object-type-as-default-prop`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md) rule
98
+ - [eslint/overrides-react] Added new [`react/sort-default-props`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md) rule
99
+ - [eslint/overrides-react] Make use of new `allowDestructuredState` option of [`react/hook-use-state`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md) rule
100
+ - [stylelint] Added new [`media-feature-range-notation`](https://stylelint.io/user-guide/rules/media-feature-range-notation/) rule, and used `"prefix"` option
101
+
102
+ ### Fixed
103
+
104
+ - [general] Fix typo in `linterBundleSettings.overrides.general.additionalRest*r*ictions`
105
+
106
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.26.0...v2.27.0)
10
107
 
11
108
  ## [2.26.0] - 2022-10-27
12
109
 
@@ -54,13 +151,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
54
151
  - [eslint] Updated `eslint-plugin-react` from `7.31.8` to `7.31.10`
55
152
  - [eslint] Updated `eslint-plugin-unicorn` from `43.0.2` to `44.0.2`
56
153
  - [eslint] Moved `eslint-plugin-jsx-a11y` configuration to `eslint/overrides-react`
154
+ - [stylelint] Updated `stylelint` from `14.12.1` to `14.14.0`
155
+ - [stylelint] Ignore `!default` annotation in [`annotation-no-unknown`](https://stylelint.io/user-guide/rules/annotation-no-unknown/) rule
156
+
157
+ ### Added
158
+
57
159
  - [eslint] Added new [`logical-assignment-operators`](https://eslint.org/docs/latest/rules/logical-assignment-operators) rule with option `"always"`
58
160
  - [eslint] Added new [`promise/no-multiple-resolved`](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md) rule
59
161
  - [eslint] Make use of new [`unicorn/no-unnecessary-await`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md) rule
60
162
  - [eslint] Make use of new [`unicorn/switch-case-braces`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md) rule with option `"avoid"`
61
163
  - [eslint/overrides-jest] Added but disable new [`jest/no-restricted-jest-methods`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-restricted-jest-methods.md) rule
62
- - [stylelint] Updated `stylelint` from `14.12.1` to `14.14.0`
63
- - [stylelint] Ignore `!default` annotation in [`annotation-no-unknown`](https://stylelint.io/user-guide/rules/annotation-no-unknown/) rule
64
164
 
65
165
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.24.0...v2.25.0)
66
166
 
@@ -798,7 +898,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
798
898
 
799
899
  - [eslint] Updated `@typescript-eslint` from v4.24.0 to v4.25.0
800
900
  - [eslint] Updated `eslint-plugin-jsdoc` from v34.8.2 to v35.0.0
801
- - [eslint] Activated `ignoreNonDOM` option for `jsx-a11y/no-autofocus` rule
901
+ - [eslint] Activated `ignoreNonDOM` option for [`jsx-a11y/no-autofocus`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md) rule
802
902
 
803
903
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.20.0...v1.21.0)
804
904
 
package/README.md CHANGED
@@ -109,7 +109,7 @@ global.linterBundleSettings = {
109
109
  overrides: {
110
110
  general: {
111
111
  'no-restricted-globals': {
112
- additionalRestictions: [
112
+ additionalRestrictions: [
113
113
  {
114
114
  name: 'fetch',
115
115
  message: 'Use Utils.fetchWithTimeout() instead.'
@@ -117,7 +117,7 @@ global.linterBundleSettings = {
117
117
  ]
118
118
  },
119
119
  'no-restricted-properties': {
120
- additionalRestictions: [
120
+ additionalRestrictions: [
121
121
  {
122
122
  object: 'localStorage',
123
123
  property: 'getItem',
@@ -136,7 +136,7 @@ global.linterBundleSettings = {
136
136
  ]
137
137
  },
138
138
  'no-restricted-syntax': {
139
- additionalRestictions: [
139
+ additionalRestrictions: [
140
140
  {
141
141
  selector: 'NewExpression[callee.name="Blob"]',
142
142
  message: 'Use BlobHelper.create() instead of new Blob().'
@@ -278,7 +278,7 @@ Argument | Description | Example
278
278
  Will execute:
279
279
 
280
280
  ```sh
281
- eslint "./**/*.{js,jsx,ts,tsx}" --format unix
281
+ eslint "./**/*.{js,mjs,jsx,ts,tsx}" --format unix
282
282
  ```
283
283
 
284
284
  Additionally, the environment variable `TIMING` is set to `10`.
@@ -397,6 +397,9 @@ To visualize the max line-length rules in VSCode, you can activate rulers, by ad
397
397
 
398
398
  ```json
399
399
  {
400
+ "[javascript]": {
401
+ "editor.rulers": [300]
402
+ },
400
403
  "[markdown]": {
401
404
  "editor.rulers": [300]
402
405
  },
package/TODO.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  <!-- markdownlint-disable -->
4
4
 
5
+ - Keine Hard-kodierten HexEdit-spezifischen Werte:
6
+ react: {
7
+ 'react/forbid-component-props': {
8
+ allowClassNameFor: ['Checkbox', 'Grid', 'GridItem', 'Button'],
9
+ allowStyleFor: []
10
+ }
11
+ }
12
+ Diese müssen konfigurierbar sein. Hier gibt es neu auch `disallowFor`, aber ggf. sollte das gesammte Konfig-Objekt von aussen kommen.
13
+
5
14
  - Bereiche in Readme aufklappbar machen:
6
15
  <details>
7
16
  summary>yarn</summary>
package/eslint/index.js CHANGED
@@ -98,7 +98,6 @@ module.exports = {
98
98
 
99
99
  /**
100
100
  * eslint
101
- *
102
101
  * @see https://eslint.org/docs/rules/
103
102
  */
104
103
  'accessor-pairs': 'error',
@@ -149,7 +148,7 @@ module.exports = {
149
148
  'indent': 'off', // Covered by @typescript-eslint/indent
150
149
  'init-declarations': 'off', // @todo It should be possible to ignore predefined consts like MAX_RADIX
151
150
  'jsx-quotes': 'error',
152
- 'key-spacing': 'error',
151
+ 'key-spacing': 'off', // Covered by @typescript-eslint/key-spacing
153
152
  'keyword-spacing': 'error',
154
153
  'line-comment-position': 'off',
155
154
  'linebreak-style': 'error',
@@ -188,6 +187,7 @@ module.exports = {
188
187
  'no-confusing-arrow': ['error', { allowParens: true }],
189
188
  'no-console': 'error',
190
189
  'no-const-assign': 'error',
190
+ 'no-constant-binary-expression': 'error',
191
191
  'no-constant-condition': 'error',
192
192
  'no-constructor-return': 'error',
193
193
  'no-continue': 'off', // If it makes the code more readable, wer are using `continue`
@@ -205,6 +205,7 @@ module.exports = {
205
205
  'no-empty-character-class': 'error',
206
206
  'no-empty-function': 'off', // Covered by @typescript-eslint/no-empty-function
207
207
  'no-empty-pattern': 'error',
208
+ 'no-empty-static-block': 'error',
208
209
  'no-empty': 'error',
209
210
  'no-eq-null': 'error',
210
211
  'no-eval': 'error',
@@ -246,6 +247,7 @@ module.exports = {
246
247
  'no-negated-condition': 'off',
247
248
  'no-nested-ternary': 'error',
248
249
  'no-new-func': 'error',
250
+ 'no-new-native-nonconstructor': 'error',
249
251
  'no-new-object': 'error',
250
252
  'no-new-symbol': 'error',
251
253
  'no-new-wrappers': 'error',
@@ -268,16 +270,16 @@ module.exports = {
268
270
  name: 'isNaN',
269
271
  message: 'Use Number.isNaN() instead, and ensure that the input value is of type number. isNaN(undefined) !== Number.isNaN(undefined)'
270
272
  },
271
- ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-globals']?.additionalRestictions)
273
+ ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-globals']?.additionalRestrictions)
272
274
  ],
273
275
  'no-restricted-imports': 'off', // Covered by @typescript-eslint/no-restricted-imports
274
276
  'no-restricted-properties': [
275
277
  'error',
276
- ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-properties']?.additionalRestictions)
278
+ ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-properties']?.additionalRestrictions)
277
279
  ],
278
280
  'no-restricted-syntax': [
279
281
  'error',
280
- ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-syntax']?.additionalRestictions)
282
+ ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['no-restricted-syntax']?.additionalRestrictions)
281
283
  ],
282
284
  'no-return-assign': 'error',
283
285
  'no-return-await': 'off', // Covered by @typescript-eslint/return-await
@@ -385,7 +387,6 @@ module.exports = {
385
387
 
386
388
  /**
387
389
  * typescript-eslint
388
- *
389
390
  * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
390
391
  */
391
392
  '@typescript-eslint/adjacent-overload-signatures': 'error',
@@ -461,6 +462,7 @@ module.exports = {
461
462
  ignoredNodes: ['ConditionalExpression']
462
463
  }
463
464
  ],
465
+ '@typescript-eslint/key-spacing': 'error',
464
466
  '@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'semi', requireLast: true }, singleline: { delimiter: 'semi', requireLast: true } }],
465
467
  '@typescript-eslint/member-ordering': ['error', {
466
468
  default: [
@@ -470,6 +472,7 @@ module.exports = {
470
472
  // Fields
471
473
  'public-static-field',
472
474
  'protected-static-field',
475
+ '#private-static-field',
473
476
  'private-static-field',
474
477
 
475
478
  'public-decorated-field',
@@ -478,32 +481,59 @@ module.exports = {
478
481
 
479
482
  'public-instance-field',
480
483
  'protected-instance-field',
484
+ '#private-instance-field',
481
485
  'private-instance-field',
482
486
 
483
487
  'public-abstract-field',
484
488
  'protected-abstract-field',
485
- 'private-abstract-field',
486
489
 
487
490
  // Constructors
488
491
  'public-constructor',
489
492
  'protected-constructor',
490
493
  'private-constructor',
491
494
 
492
- // Methods
495
+ // Methods / Getters / Setters
496
+ 'public-decorated-set',
497
+ 'public-decorated-get',
493
498
  'public-decorated-method',
499
+ 'public-instance-set',
500
+ 'public-instance-get',
494
501
  'public-instance-method',
502
+ 'public-static-set',
503
+ 'public-static-get',
495
504
  'public-static-method',
505
+ 'public-abstract-get',
506
+ 'public-abstract-set',
496
507
  'public-abstract-method',
497
508
 
509
+ 'protected-decorated-set',
510
+ 'protected-decorated-get',
498
511
  'protected-decorated-method',
512
+ 'protected-instance-set',
513
+ 'protected-instance-get',
499
514
  'protected-instance-method',
515
+ 'protected-static-set',
516
+ 'protected-static-get',
500
517
  'protected-static-method',
518
+ 'protected-abstract-get',
519
+ 'protected-abstract-set',
501
520
  'protected-abstract-method',
502
521
 
522
+ 'private-decorated-set',
523
+ 'private-decorated-get',
503
524
  'private-decorated-method',
525
+ '#private-instance-set',
526
+ '#private-instance-get',
527
+ '#private-instance-method',
528
+ 'private-instance-set',
529
+ 'private-instance-get',
504
530
  'private-instance-method',
505
- 'private-static-method',
506
- 'private-abstract-method'
531
+ '#private-static-set',
532
+ '#private-static-get',
533
+ '#private-static-method',
534
+ 'private-static-set',
535
+ 'private-static-get',
536
+ 'private-static-method'
507
537
  ]
508
538
  }],
509
539
  '@typescript-eslint/method-signature-style': ['error', 'property'],
@@ -539,7 +569,7 @@ module.exports = {
539
569
  // Function
540
570
  { selector: 'function', format: ['camelCase', 'PascalCase'] },
541
571
 
542
- // Paramter
572
+ // Parameter
543
573
  { selector: 'parameter', format: ['camelCase', 'PascalCase'], leadingUnderscore: 'allow' },
544
574
 
545
575
  // Property
@@ -574,7 +604,7 @@ module.exports = {
574
604
  format: null
575
605
  },
576
606
  {
577
- // Allow properties which which don't contain an underscore (to prevent usage of "UPPER_CASE") and contain atleast 4 characters
607
+ // Allow properties which which don't contain an underscore (to prevent usage of "UPPER_CASE") and contain at least 4 characters
578
608
  selector: 'objectLiteralProperty',
579
609
  filter: '^[^_]{4,}$',
580
610
  format: null
@@ -624,6 +654,7 @@ module.exports = {
624
654
  '@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
625
655
  '@typescript-eslint/no-dupe-class-members': 'error',
626
656
  '@typescript-eslint/no-duplicate-enum-values': 'error',
657
+ '@typescript-eslint/no-duplicate-type-constituents': 'error',
627
658
  '@typescript-eslint/no-dynamic-delete': 'error',
628
659
  '@typescript-eslint/no-empty-function': 'error',
629
660
  '@typescript-eslint/no-empty-interface': 'off',
@@ -635,6 +666,7 @@ module.exports = {
635
666
  '@typescript-eslint/no-floating-promises': 'error',
636
667
  '@typescript-eslint/no-for-in-array': 'error',
637
668
  '@typescript-eslint/no-implicit-any-catch': 'off', // Results into false-positive with the TS4.4 option "useUnknownInCatchVariables"
669
+ '@typescript-eslint/no-import-type-side-effects': 'error',
638
670
  '@typescript-eslint/no-inferrable-types': 'off', // Sometimes an explicit type helps to understand the code better
639
671
  '@typescript-eslint/no-invalid-this': 'error',
640
672
  '@typescript-eslint/no-invalid-void-type': ['error', { allowInGenericTypeArguments: true }],
@@ -644,12 +676,14 @@ module.exports = {
644
676
  /* ['error', {
645
677
  ignore: [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 15, 16, 24, 32, 60, 63, 64, 100, 128, 250, 255, 256, 500, 1000, 4_294_967_296],
646
678
  ignoreArrayIndexes: true,
679
+ ignoreClassFieldInitialValues: true,
647
680
  enforceConst: true,
648
681
  detectObjects: true
649
682
  }], */
650
683
  '@typescript-eslint/no-meaningless-void-operator': 'error',
651
684
  '@typescript-eslint/no-misused-new': 'error',
652
685
  '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
686
+ '@typescript-eslint/no-mixed-enums': 'error',
653
687
  '@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
654
688
  '@typescript-eslint/no-non-null-assertion': 'error',
655
689
  '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
@@ -683,6 +717,7 @@ module.exports = {
683
717
  '@typescript-eslint/no-unsafe-assignment': 'error',
684
718
  '@typescript-eslint/no-unsafe-call': 'error',
685
719
  '@typescript-eslint/no-unsafe-declaration-merging': 'error',
720
+ '@typescript-eslint/no-unsafe-enum-comparison': 'error',
686
721
  '@typescript-eslint/no-unsafe-member-access': 'error',
687
722
  '@typescript-eslint/no-unsafe-return': 'error',
688
723
  '@typescript-eslint/no-unused-expressions': 'error',
@@ -721,6 +756,7 @@ module.exports = {
721
756
  }],
722
757
  '@typescript-eslint/return-await': 'error',
723
758
  '@typescript-eslint/semi': 'error',
759
+ '@typescript-eslint/sort-type-constituents': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
724
760
  '@typescript-eslint/sort-type-union-intersection-members': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
725
761
  '@typescript-eslint/space-before-function-paren': 'error',
726
762
  '@typescript-eslint/space-infix-ops': 'error',
@@ -734,47 +770,48 @@ module.exports = {
734
770
 
735
771
  /**
736
772
  * eslint-plugin-functional
737
- *
738
773
  * @see https://github.com/jonaskello/eslint-plugin-functional#supported-rules
739
774
  */
740
775
  'functional/functional-parameters': 'off',
741
776
  'functional/immutable-data': 'off', // This rule would require a lot of additional code and workarounds, which would make the result much more illegible.
742
- 'functional/no-class': 'off',
743
- 'functional/no-conditional-statement': 'off',
744
- 'functional/no-expression-statement': ['off', { ignoreVoid: true }], // Creates too much false-positives
777
+ 'functional/no-classes': 'off',
778
+ 'functional/no-conditional-statements': 'off',
779
+ 'functional/no-expression-statements': ['off', { ignoreVoid: true }], // Creates too much false-positives
745
780
  'functional/no-let': 'off', // This is better covered by the `prefer-const` rule
746
- 'functional/no-loop-statement': 'off',
747
- 'functional/no-method-signature': 'off', // Covered by @typescript-eslint/method-signature-style
748
- 'functional/no-mixed-type': ['error', {
781
+ 'functional/no-loop-statements': 'off',
782
+ 'functional/no-mixed-types': ['error', {
749
783
  checkInterfaces: false,
750
784
  checkTypeLiterals: true
751
785
  }],
752
786
  'functional/no-promise-reject': 'off',
753
787
  'functional/no-return-void': 'off',
754
- 'functional/no-this-expression': 'off',
755
- 'functional/no-throw-statement': 'off',
756
- 'functional/no-try-statement': 'off',
757
- 'functional/prefer-readonly-type': ['error', { ignoreClass: true, allowLocalMutation: true, ignoreCollections: true, ignoreInterface: true }],
788
+ 'functional/no-this-expressions': 'off',
789
+ 'functional/no-throw-statements': 'off',
790
+ 'functional/no-try-statements': 'off',
791
+ 'functional/prefer-immutable-types': 'off',
792
+ 'functional/prefer-property-signatures': 'off', // Covered by @typescript-eslint/method-signature-style
758
793
  'functional/prefer-tacit': 'off', // @see https://github.com/jonaskello/eslint-plugin-functional/issues/263
794
+ 'functional/readonly-type': ['error', 'keyword'],
795
+ 'functional/type-declaration-immutability': 'off',
759
796
 
760
797
  /**
761
798
  * eslint-plugin-import
762
- *
763
799
  * @see https://github.com/import-js/eslint-plugin-import
764
800
  */
801
+ 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
765
802
  'import/default': 'error',
766
- 'import/dynamic-import-chunkname': ['off', { // Here an "ignore" option is missing, which allows to ignore "@json\/locales\/.+?\.json", because these are handled in the webpack configuration.
803
+ 'import/dynamic-import-chunkname': ['error', {
767
804
  webpackChunknameFormat: '[0-9a-zA-Z-_/.+]+'
768
805
  }],
769
806
  'import/export': 'error',
770
807
  'import/exports-last': 'off', // Exports should be declared first; helper functions last
771
- 'import/extensions': 'off', // There is no check that it's really an extension or part of the file name. Misinterpretes 'JavaDateTime' as extension in 'DateTime.JavaDateTime' for 'DateTime.DOSDateTime.ts'. So, we disable this rule
808
+ 'import/extensions': 'off', // There is no check that it's really an extension or part of the file name. Misinterprets 'JavaDateTime' as extension in 'DateTime.JavaDateTime' for 'DateTime.DOSDateTime.ts'. So, we disable this rule
772
809
  'import/first': 'error',
773
810
  'import/group-exports': 'off',
774
811
  'import/max-dependencies': ['error', { max: 20, ignoreTypeImports: true }],
775
812
  'import/named': 'error',
776
813
  'import/namespace': ['error', { allowComputed: true }],
777
- 'import/newline-after-import': 'error',
814
+ 'import/newline-after-import': ['error', { considerComments: true }],
778
815
  'import/no-absolute-path': 'error',
779
816
  'import/no-amd': 'error',
780
817
  'import/no-anonymous-default-export': 'error',
@@ -784,6 +821,7 @@ module.exports = {
784
821
  'import/no-deprecated': 'error',
785
822
  'import/no-duplicates': 'error',
786
823
  'import/no-dynamic-require': 'error',
824
+ 'import/no-empty-named-blocks': 'error',
787
825
  'import/no-extraneous-dependencies': 'error',
788
826
  'import/no-internal-modules': ['off', { // @todo Throws an "Cannot read property 'value' of null" error in src/help/scss/help.scss.d.ts:2 since the update to v2.21.1. If this issue does not get fixed in the next releases, report it!
789
827
  allow: [
@@ -813,7 +851,7 @@ module.exports = {
813
851
  'import/no-useless-path-segments': 'error',
814
852
  'import/no-webpack-loader-syntax': 'off', // Indeed, you should avoid that, but if we do it, we have a reason for it
815
853
  'import/order': ['error', {
816
- 'alphabetize': { order: 'asc', caseInsensitive: true },
854
+ 'alphabetize': { order: 'asc', orderImportKind: 'asc', caseInsensitive: true },
817
855
  'groups': ['builtin', 'unknown', 'external', 'internal', 'parent', 'sibling', 'index'],
818
856
  'newlines-between': 'always',
819
857
  'pathGroupsExcludedImportTypes': [],
@@ -821,7 +859,6 @@ module.exports = {
821
859
  ...ensureType.array(global.linterBundleSettings?.overrides?.general?.['import/order']?.additionalExternalPatterns).map(
822
860
  /**
823
861
  * Creates an "external" group using the additional external pattern configuration.
824
- *
825
862
  * @param {string} pattern - A given pattern
826
863
  * @returns {{ pattern: string; group: 'external'; }} An "external" path configuration object
827
864
  */
@@ -830,14 +867,14 @@ module.exports = {
830
867
  { pattern: '@*', group: 'internal' },
831
868
  { pattern: '@*/**', group: 'internal' },
832
869
  { pattern: '*!*/**', group: 'internal', position: 'after' } // Webpack loaders, e.g. 'worker-ref-loader!@app/components/FileFormatIdentificationDialog/TypeDetection.worker'
833
- ]
870
+ ],
871
+ 'distinctGroup': false
834
872
  }],
835
873
  'import/prefer-default-export': 'off',
836
874
  'import/unambiguous': 'off',
837
875
 
838
876
  /**
839
877
  * eslint-plugin-eslint-comments
840
- *
841
878
  * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/
842
879
  */
843
880
  'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
@@ -852,7 +889,6 @@ module.exports = {
852
889
 
853
890
  /**
854
891
  * eslint-plugin-promise
855
- *
856
892
  * @see https://github.com/xjamundx/eslint-plugin-promise
857
893
  */
858
894
  'promise/always-return': 'off', // If the result of an `.then()` is not used, there is no need to return something.
@@ -873,7 +909,6 @@ module.exports = {
873
909
 
874
910
  /**
875
911
  * eslint-plugin-unicorn
876
- *
877
912
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
878
913
  */
879
914
  'unicorn/better-regex': 'error',
@@ -912,6 +947,7 @@ module.exports = {
912
947
  'unicorn/no-instanceof-array': 'error',
913
948
  'unicorn/no-keyword-prefix': 'off',
914
949
  'unicorn/no-lonely-if': 'off', // Sometimes the code is clearer if-conditions are not combined
950
+ 'unicorn/no-negated-condition': 'off',
915
951
  'unicorn/no-nested-ternary': 'off', // We prefer no-nested-ternary of ESlint
916
952
  'unicorn/no-new-array': 'off', // `new Array(length)` should be preferred over `Array.from({ length })` because it's much faster. @see https://jsben.ch/qTpYp
917
953
  'unicorn/no-new-buffer': 'error',
@@ -921,6 +957,7 @@ module.exports = {
921
957
  'unicorn/no-static-only-class': 'error',
922
958
  'unicorn/no-thenable': 'error',
923
959
  'unicorn/no-this-assignment': 'error',
960
+ 'unicorn/no-typeof-undefined': 'error',
924
961
  'unicorn/no-unnecessary-await': 'error',
925
962
  'unicorn/no-unreadable-array-destructuring': 'error',
926
963
  'unicorn/no-unreadable-iife': 'error',
@@ -970,8 +1007,9 @@ module.exports = {
970
1007
  'unicorn/prefer-query-selector': 'off', // document.getElementById() is much faster
971
1008
  'unicorn/prefer-reflect-apply': 'error',
972
1009
  'unicorn/prefer-set-has': 'error',
1010
+ 'unicorn/prefer-set-size': 'error',
973
1011
  'unicorn/prefer-spread': 'off', // @todo Disabled till there a solution for the warning, that `slice()` on Typed-Arrays should be replaced (which is not possible). @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1064
974
- 'unicorn/prefer-string-replace-all': 'off',
1012
+ 'unicorn/prefer-string-replace-all': 'off', // @todo Available since 2020 in browsers. SHould this be preferred?
975
1013
  'unicorn/prefer-string-slice': 'off', // @todo As of today (2020.08.24) and since the last 9 years, substr() is three times faster than slice() in Firefox.
976
1014
  'unicorn/prefer-string-starts-ends-with': 'error',
977
1015
  'unicorn/prefer-string-trim-start-end': 'error',
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * @file Settings for Gatsby-based projects.
3
+ *
3
4
  */
4
5
 
5
6
  module.exports = {
@@ -14,10 +15,8 @@ module.exports = {
14
15
 
15
16
  /**
16
17
  * eslint
17
- *
18
18
  * @see https://eslint.org/docs/rules/
19
19
  */
20
-
21
20
  'no-restricted-imports': ['error', {
22
21
  paths: [{
23
22
  name: '@reach/router',
@@ -28,21 +27,18 @@ module.exports = {
28
27
 
29
28
  /**
30
29
  * typescript-eslint
31
- *
32
30
  * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
33
31
  */
34
32
  '@typescript-eslint/no-confusing-void-expression': 'off', // @todo Conflicts with graphql-template strings
35
33
 
36
34
  /**
37
35
  * eslint-plugin-import
38
- *
39
36
  * @see https://github.com/import-js/eslint-plugin-import
40
37
  */
41
38
  'import/no-unresolved': ['error', { caseSensitiveStrict: true, ignore: ['@reach/router'] }],
42
39
 
43
40
  /**
44
41
  * eslint-plugin-unicorn
45
- *
46
42
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
47
43
  */
48
44
  'unicorn/string-content': ['error', {
@@ -64,7 +60,6 @@ module.exports = {
64
60
  rules: {
65
61
  /**
66
62
  * eslint-plugin-unicorn
67
- *
68
63
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
69
64
  */
70
65
  'unicorn/filename-case': ['error', {
@@ -83,7 +78,6 @@ module.exports = {
83
78
  rules: {
84
79
  /**
85
80
  * eslint-plugin-import
86
- *
87
81
  * @see https://github.com/import-js/eslint-plugin-import
88
82
  */
89
83
  'import/no-default-export': 'off',
@@ -91,7 +85,6 @@ module.exports = {
91
85
 
92
86
  /**
93
87
  * eslint-plugin-unicorn
94
- *
95
88
  * @see https://github.com/sindresorhus/eslint-plugin-unicorn
96
89
  */
97
90
  'unicorn/filename-case': ['error', {
@@ -106,7 +99,6 @@ module.exports = {
106
99
  rules: {
107
100
  /**
108
101
  * eslint-plugin-n
109
- *
110
102
  * @see https://github.com/eslint-community/eslint-plugin-n
111
103
  */
112
104
  'n/no-unsupported-features/es-syntax': 'off'