linter-bundle 6.2.2 → 7.0.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.
Files changed (144) hide show
  1. package/.linter-bundle.js +27 -17
  2. package/.linter-bundle.schema.json +45 -0
  3. package/CHANGELOG.md +149 -4
  4. package/README.md +60 -63
  5. package/eslint/gatsby.mjs +95 -0
  6. package/eslint/index.mjs +1127 -0
  7. package/eslint/javascript-lazy.mjs +24 -0
  8. package/eslint/javascript.mjs +126 -0
  9. package/eslint/jest.mjs +172 -0
  10. package/eslint/jsdoc.mjs +103 -0
  11. package/eslint/react.mjs +232 -0
  12. package/eslint/rules/no-unnecessary-typeof.md +1 -1
  13. package/eslint/rules/{no-unnecessary-typeof.js → no-unnecessary-typeof.mjs} +9 -11
  14. package/eslint/rules/restricted-filenames.md +4 -4
  15. package/eslint/rules/{restricted-filenames.js → restricted-filenames.mjs} +7 -6
  16. package/eslint/storybook.mjs +42 -0
  17. package/eslint/type-declarations.mjs +49 -0
  18. package/eslint/{overrides-worker.cjs → worker.mjs} +12 -14
  19. package/eslint.mjs +5 -0
  20. package/files/index.js +3 -3
  21. package/helper/{ensure-type.cjs → ensure-type.mjs} +1 -5
  22. package/helper/get-outdated-dependencies.js +4 -4
  23. package/helper/get-outdated-overrides.js +2 -2
  24. package/helper/get-stylelint-path.js +4 -3
  25. package/helper/is-npm-or-yarn.js +2 -2
  26. package/helper/linter-bundle-config.d.ts +24 -0
  27. package/helper/linter-bundle-config.js +9 -14
  28. package/helper/run-process.js +1 -1
  29. package/lint.js +21 -16
  30. package/package.json +31 -29
  31. package/stylelint/index.mjs +1111 -0
  32. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/{index.cjs → index.mjs} +1 -1
  33. package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/{selectors.cjs → selectors.mjs} +15 -31
  34. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/{index.cjs → index.mjs} +6 -12
  35. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/{index.cjs → index.mjs} +11 -13
  36. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/{index.cjs → index.mjs} +18 -22
  37. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/{index.cjs → index.mjs} +10 -9
  38. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{atRuleNameSpaceChecker.cjs → atRuleNameSpaceChecker.mjs} +4 -3
  39. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/{index.cjs → index.mjs} +16 -30
  40. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/{index.cjs → index.mjs} +13 -35
  41. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/{index.cjs → index.mjs} +11 -40
  42. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/{index.cjs → index.mjs} +10 -27
  43. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/{index.cjs → index.mjs} +14 -65
  44. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/{index.cjs → index.mjs} +13 -30
  45. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/{index.cjs → index.mjs} +14 -27
  46. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/{index.cjs → index.mjs} +10 -16
  47. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.mjs +93 -0
  48. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/{index.cjs → index.mjs} +11 -12
  49. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/{index.cjs → index.mjs} +11 -29
  50. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/{index.cjs → index.mjs} +9 -8
  51. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/{index.cjs → index.mjs} +10 -23
  52. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/{index.cjs → index.mjs} +11 -36
  53. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/{index.cjs → index.mjs} +9 -27
  54. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/{index.cjs → index.mjs} +9 -25
  55. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/{index.cjs → index.mjs} +8 -9
  56. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/{index.cjs → index.mjs} +8 -9
  57. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{declarationBangSpaceChecker.cjs → declarationBangSpaceChecker.mjs} +5 -4
  58. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{declarationColonSpaceChecker.cjs → declarationColonSpaceChecker.mjs} +5 -4
  59. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{findMediaOperator.cjs → findMediaOperator.mjs} +2 -2
  60. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/{index.cjs → index.mjs} +8 -9
  61. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/{index.cjs → index.mjs} +8 -9
  62. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/{index.cjs → index.mjs} +8 -9
  63. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/{index.cjs → index.mjs} +8 -9
  64. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/{index.cjs → index.mjs} +19 -39
  65. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/{index.cjs → index.mjs} +19 -54
  66. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/{index.cjs → index.mjs} +21 -68
  67. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/{index.cjs → index.mjs} +16 -31
  68. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{functionCommaSpaceChecker.cjs → functionCommaSpaceChecker.mjs} +8 -7
  69. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{functionCommaSpaceFix.cjs → functionCommaSpaceFix.mjs} +1 -1
  70. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/{index.cjs → index.mjs} +39 -64
  71. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/{index.cjs → index.mjs} +15 -44
  72. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/{index.cjs → index.mjs} +10 -49
  73. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/{index.cjs → index.mjs} +10 -9
  74. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/{index.cjs → index.mjs} +8 -9
  75. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/{index.cjs → index.mjs} +8 -9
  76. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/{index.cjs → index.mjs} +9 -16
  77. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/{index.cjs → index.mjs} +8 -21
  78. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/{index.cjs → index.mjs} +10 -11
  79. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/{index.cjs → index.mjs} +10 -11
  80. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/{index.cjs → index.mjs} +8 -9
  81. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/{index.cjs → index.mjs} +6 -6
  82. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/{index.cjs → index.mjs} +8 -9
  83. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/{index.cjs → index.mjs} +8 -9
  84. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{mediaFeatureColonSpaceChecker.cjs → mediaFeatureColonSpaceChecker.mjs} +5 -4
  85. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{mediaQueryListCommaWhitespaceChecker.cjs → mediaQueryListCommaWhitespaceChecker.mjs} +6 -5
  86. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/{index.cjs → index.mjs} +6 -20
  87. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/{index.cjs → index.mjs} +13 -16
  88. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/{index.cjs → index.mjs} +10 -33
  89. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/{index.cjs → index.mjs} +7 -13
  90. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/{index.cjs → index.mjs} +13 -31
  91. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/{index.cjs → index.mjs} +9 -18
  92. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/{index.cjs → index.mjs} +10 -16
  93. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/{index.cjs → index.mjs} +9 -36
  94. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/{index.cjs → index.mjs} +7 -8
  95. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/{index.cjs → index.mjs} +7 -8
  96. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/{index.cjs → index.mjs} +7 -8
  97. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/{index.cjs → index.mjs} +7 -8
  98. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/{index.cjs → index.mjs} +9 -20
  99. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/{index.cjs → index.mjs} +9 -14
  100. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/{index.cjs → index.mjs} +7 -8
  101. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/{index.cjs → index.mjs} +7 -8
  102. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/{index.cjs → index.mjs} +7 -8
  103. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/{index.cjs → index.mjs} +10 -21
  104. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/{index.cjs → index.mjs} +10 -24
  105. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/{index.cjs → index.mjs} +12 -35
  106. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/{index.cjs → index.mjs} +10 -15
  107. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorAttributeOperatorSpaceChecker.cjs → selectorAttributeOperatorSpaceChecker.mjs} +6 -5
  108. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorCombinatorSpaceChecker.cjs → selectorCombinatorSpaceChecker.mjs} +12 -11
  109. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorListCommaWhitespaceChecker.cjs → selectorListCommaWhitespaceChecker.mjs} +5 -4
  110. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/{index.cjs → index.mjs} +43 -65
  111. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/{index.cjs → index.mjs} +5 -5
  112. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/{index.cjs → index.mjs} +17 -34
  113. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/{index.cjs → index.mjs} +11 -12
  114. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/{index.cjs → index.mjs} +6 -6
  115. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/{index.cjs → index.mjs} +10 -11
  116. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/{index.cjs → index.mjs} +10 -11
  117. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/{index.cjs → index.mjs} +12 -18
  118. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{valueListCommaWhitespaceChecker.cjs → valueListCommaWhitespaceChecker.mjs} +6 -5
  119. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/{index.cjs → index.mjs} +1 -1
  120. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{addEmptyLineAfter.cjs → addEmptyLineAfter.mjs} +1 -1
  121. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{hasEmptyBlock.cjs → hasEmptyBlock.mjs} +2 -2
  122. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{nextNonCommentNode.cjs → nextNonCommentNode.mjs} +1 -1
  123. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{removeEmptyLinesAfter.cjs → removeEmptyLinesAfter.mjs} +1 -1
  124. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/transformSelector.mjs +19 -0
  125. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{whitespaceChecker.cjs → whitespaceChecker.mjs} +5 -5
  126. package/stylelint/plugins/stylelint-selector-no-empty.js +2 -0
  127. package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +2 -2
  128. package/stylelint.mjs +6 -0
  129. package/TODO.md +0 -58
  130. package/eslint/index.cjs +0 -1065
  131. package/eslint/overrides-gatsby.cjs +0 -108
  132. package/eslint/overrides-javascript-lazy.cjs +0 -27
  133. package/eslint/overrides-javascript.cjs +0 -121
  134. package/eslint/overrides-jest.cjs +0 -144
  135. package/eslint/overrides-jsdoc.cjs +0 -94
  136. package/eslint/overrides-react.cjs +0 -220
  137. package/eslint/overrides-storybook.cjs +0 -44
  138. package/eslint/overrides-type-declarations.cjs +0 -51
  139. package/eslint/rules/no-global-undefined-check.js +0 -85
  140. package/eslint/rules/no-global-undefined-check.md +0 -34
  141. package/eslint.cjs +0 -5
  142. package/stylelint/index.cjs +0 -1104
  143. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.cjs +0 -95
  144. package/stylelint.cjs +0 -5
package/eslint/index.cjs DELETED
@@ -1,1065 +0,0 @@
1
- /**
2
- * @file Global ESLint settings
3
- */
4
-
5
- /* eslint-disable max-lines -- The rules can be easier managed if they are all in one file */
6
- /* eslint-disable n/no-process-env -- `process.env` is required to inject configuration adjustments */
7
-
8
- const fs = require('node:fs');
9
- const path = require('node:path');
10
-
11
- const ensureType = require('../helper/ensure-type.cjs');
12
- const { linterBundleConfig } = require('../helper/linter-bundle-config.cjs');
13
-
14
- module.exports = {
15
- ignorePatterns: [
16
- '.cache/',
17
- '.vscode/',
18
- 'coverage/',
19
- 'node_modules/'
20
- ],
21
- parser: '@typescript-eslint/parser',
22
- plugins: [
23
- 'eslint-comments',
24
- 'functional',
25
- 'import',
26
- 'jsx-a11y',
27
- 'promise',
28
- 'react-hooks',
29
- 'react',
30
- 'unicorn'
31
- ],
32
- parserOptions: {
33
- ecmaVersion: 2020,
34
- sourceType: 'module',
35
- ecmaFeatures: {
36
- jsx: true
37
- },
38
- project: [
39
- (process.env['TSCONFIG'] ?? './tsconfig.json'),
40
- './jsconfig.json'
41
- ].filter((fileName) => {
42
- const filePath = path.resolve(process.cwd(), fileName);
43
-
44
- return (fs.existsSync(filePath) && fs.lstatSync(filePath).isFile());
45
- }),
46
- warnOnUnsupportedTypeScriptVersion: false
47
- },
48
- env: {
49
- browser: true,
50
- commonjs: true
51
- },
52
- globals: {
53
- ArrayBuffer: 'readonly',
54
- FileReaderSync: 'readonly',
55
- Float32Array: 'readonly',
56
- Float64Array: 'readonly',
57
- Int8Array: 'readonly',
58
- Int16Array: 'readonly',
59
- Int32Array: 'readonly',
60
- Map: 'readonly',
61
- Promise: 'readonly',
62
- Set: 'readonly',
63
- Uint8Array: 'readonly',
64
- Uint16Array: 'readonly',
65
- Uint32Array: 'readonly'
66
- },
67
- settings: {
68
- 'import/parsers': {
69
- '@typescript-eslint/parser': ['.ts', '.tsx']
70
- },
71
- 'import/resolver': {
72
- typescript: { alwaysTryTypes: true },
73
- ...(() => {
74
- const filePath = path.resolve(process.cwd(), 'webpack.config.js');
75
-
76
- if ((fs.existsSync(filePath) && fs.lstatSync(filePath).isFile())) {
77
- return {
78
- webpack: { config: filePath }
79
- };
80
- }
81
-
82
- return;
83
- })()
84
- },
85
- 'react': {
86
- version: 'detect'
87
- }
88
- },
89
- reportUnusedDisableDirectives: true,
90
- overrides: [
91
- {
92
- files: [
93
- '*.js',
94
- '*.cjs',
95
- '*.cts',
96
- '*.jsx',
97
- '*.mjs',
98
- '*.ts',
99
- '*.mts',
100
- '*.tsx'
101
- ],
102
- extends: [
103
- 'plugin:@typescript-eslint/recommended',
104
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
105
- ],
106
- rules: {
107
- /**
108
- * ./rules
109
- */
110
- 'no-unnecessary-typeof': 'error',
111
-
112
- /**
113
- * eslint
114
- * @see https://eslint.org/docs/rules/
115
- */
116
- 'accessor-pairs': 'error',
117
- 'array-bracket-newline': ['error', 'consistent'],
118
- 'array-bracket-spacing': 'error',
119
- 'array-callback-return': 'error',
120
- 'array-element-newline': 'off', // Line breaks should be used in such a way that maximum readability is achieved. This cannot be represented by a fixed rule.
121
- 'arrow-body-style': 'error',
122
- 'arrow-parens': 'error',
123
- 'arrow-spacing': 'error',
124
- 'block-scoped-var': 'error',
125
- 'block-spacing': 'error',
126
- 'brace-style': 'off', // Covered by @typescript-eslint/brace-style
127
- 'camelcase': 'off', // Covered by @typescript-eslint/naming-convention
128
- 'capitalized-comments': 'off',
129
- 'class-methods-use-this': 'off', // Covered by @typescript-eslint/class-methods-use-this
130
- 'comma-dangle': 'off', // Covered by @typescript-eslint/comma-dangle
131
- 'comma-spacing': 'off', // Covered by @typescript-eslint/comma-spacing
132
- 'comma-style': 'error',
133
- 'complexity': ['error', { max: 20 }],
134
- 'computed-property-spacing': 'error',
135
- 'consistent-return': 'off', // Handled by TypeScript type annotations
136
- 'consistent-this': 'error',
137
- 'constructor-super': 'error',
138
- 'curly': 'error',
139
- 'default-case-last': 'error',
140
- 'default-case': 'error',
141
- 'default-param-last': 'off', // @todo It should be valid to have optional parameters after default parameters
142
- 'dot-location': ['error', 'property'],
143
- 'dot-notation': 'off', // Covered by @typescript-eslint/dot-notation
144
- 'eol-last': 'error',
145
- 'eqeqeq': 'error',
146
- 'for-direction': 'error',
147
- 'func-call-spacing': 'off', // Covered by @typescript-eslint/func-call-spacing
148
- 'func-name-matching': 'error',
149
- 'func-names': 'error',
150
- 'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
151
- 'function-call-argument-newline': 'off', // @todo Multiple multi-line object arguments are not allowed, so this option is not usable right now
152
- 'function-paren-newline': ['error', 'multiline-arguments'],
153
- 'generator-star-spacing': 'error',
154
- 'getter-return': 'error',
155
- 'grouped-accessor-pairs': 'error',
156
- 'guard-for-in': 'error',
157
- 'id-denylist': 'error',
158
- 'id-length': ['error', { exceptions: ['a', 'b', 'i', 'j', 'n', 'x', 'y', 'z'] }],
159
- 'id-match': 'error',
160
- 'implicit-arrow-linebreak': 'error',
161
- 'indent': 'off', // Covered by @typescript-eslint/indent
162
- 'init-declarations': 'off', // @todo It should be possible to ignore predefined consts like MAX_RADIX
163
- 'jsx-quotes': 'error',
164
- 'key-spacing': 'off', // Covered by @typescript-eslint/key-spacing
165
- 'keyword-spacing': 'error',
166
- 'line-comment-position': 'off',
167
- 'linebreak-style': 'error',
168
- 'lines-around-comment': 'off', // Doesn't work with interfaces; sometimes doesn't make sense if the comment is related to the code above it
169
- 'lines-between-class-members': 'off', // @todo Deactivated till we have a JSDoc description for all class members
170
- 'logical-assignment-operators': ['error', 'always'],
171
- 'max-classes-per-file': 'error',
172
- 'max-depth': ['error', { max: 5 }],
173
- 'max-len': ['error', {
174
- code: 300,
175
- tabWidth: 4,
176
- comments: 300,
177
- ignoreUrls: true
178
- }],
179
- 'max-lines-per-function': ['error', { max: 200, skipBlankLines: true, skipComments: true }],
180
- 'max-lines': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
181
- 'max-nested-callbacks': 'error',
182
- 'max-params': ['error', { max: 5 }],
183
- 'max-statements-per-line': ['error', { max: 3 }],
184
- 'max-statements': ['error', 50, { ignoreTopLevelFunctions: true }],
185
- 'multiline-comment-style': 'off', // Comment style must be decided from case to case
186
- 'multiline-ternary': 'off', // I would prefer this style: `(a === b ? (\ntrue\n) : {\notherwise: false\n})`, which means line-breaks should be only allowed, if the operand is wrapped into `(`, `{` or `[`.
187
- 'new-cap': ['error', { properties: false }],
188
- 'new-parens': 'error',
189
- 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }],
190
- 'no-alert': 'error',
191
- 'no-array-constructor': 'off', // Covered by @typescript-eslint/no-array-constructor
192
- 'no-async-promise-executor': 'error',
193
- 'no-await-in-loop': 'error',
194
- 'no-bitwise': ['error', { allow: ['^', '~', '<<', '>>', '>>>', '|=', '&=', '^=', '<<=', '>>=', '>>>='] }], // Disallow "&" and "|".
195
- 'no-caller': 'error',
196
- 'no-case-declarations': 'error',
197
- 'no-class-assign': 'error',
198
- 'no-compare-neg-zero': 'error',
199
- 'no-cond-assign': 'error',
200
- 'no-confusing-arrow': ['error', { allowParens: true }],
201
- 'no-console': 'error',
202
- 'no-const-assign': 'error',
203
- 'no-constant-binary-expression': 'error',
204
- 'no-constant-condition': 'error',
205
- 'no-constructor-return': 'error',
206
- 'no-continue': 'off', // If it makes the code more readable, wer are using `continue`
207
- 'no-control-regex': 'off', // This rule does not make sense to me
208
- 'no-debugger': 'error',
209
- 'no-delete-var': 'error',
210
- 'no-div-regex': 'error',
211
- 'no-dupe-args': 'error',
212
- 'no-dupe-class-members': 'off', // Covered by @typescript-eslint/no-dupe-class-members
213
- 'no-dupe-else-if': 'error',
214
- 'no-dupe-keys': 'error',
215
- 'no-duplicate-case': 'error',
216
- 'no-duplicate-imports': 'off', // Covered by import/no-duplicates (see https://github.com/typescript-eslint/typescript-eslint/issues/2315)
217
- 'no-else-return': 'error',
218
- 'no-empty-character-class': 'error',
219
- 'no-empty-function': 'off', // Covered by @typescript-eslint/no-empty-function
220
- 'no-empty-pattern': 'error',
221
- 'no-empty-static-block': 'error',
222
- 'no-empty': 'error',
223
- 'no-eq-null': 'error',
224
- 'no-eval': 'error',
225
- 'no-ex-assign': 'error',
226
- 'no-extend-native': 'error',
227
- 'no-extra-bind': 'error',
228
- 'no-extra-boolean-cast': 'error',
229
- 'no-extra-label': 'error',
230
- 'no-extra-parens': 'off', // Covered by @typescript-eslint/no-extra-parens
231
- 'no-extra-semi': 'off', // Covered by @typescript-eslint/no-extra-semi
232
- 'no-fallthrough': ['error', { allowEmptyCase: true }],
233
- 'no-floating-decimal': 'error',
234
- 'no-func-assign': 'error',
235
- 'no-global-assign': 'error',
236
- 'no-implicit-coercion': ['error', { disallowTemplateShorthand: true }],
237
- 'no-implicit-globals': 'error',
238
- 'no-implied-eval': 'error',
239
- 'no-import-assign': 'error',
240
- 'no-inline-comments': 'off',
241
- 'no-inner-declarations': ['error', 'both'],
242
- 'no-invalid-regexp': 'error',
243
- 'no-invalid-this': 'off', // Covered by @typescript-eslint/no-invalid-this
244
- 'no-irregular-whitespace': 'error',
245
- 'no-iterator': 'error',
246
- 'no-label-var': 'error',
247
- 'no-labels': ['error', { allowLoop: true }],
248
- 'no-lone-blocks': 'error',
249
- 'no-lonely-if': 'off', // Covered by unicorn/no-lonely-if
250
- 'no-loop-func': 'off', // Covered by @typescript-eslint/no-loop-func
251
- 'no-loss-of-precision': 'off', // Covered by @typescript-eslint/no-loss-of-precision
252
- 'no-magic-numbers': 'off', // Covered by @typescript-eslint/no-magic-numbers
253
- 'no-misleading-character-class': 'error',
254
- 'no-mixed-operators': 'error',
255
- 'no-mixed-spaces-and-tabs': 'error',
256
- 'no-multi-assign': 'error',
257
- 'no-multi-spaces': 'error',
258
- 'no-multi-str': 'error',
259
- 'no-multiple-empty-lines': ['error', { max: 1 }],
260
- 'no-negated-condition': 'off',
261
- 'no-nested-ternary': 'error',
262
- 'no-new-func': 'error',
263
- 'no-new-native-nonconstructor': 'error',
264
- 'no-new-symbol': 'error',
265
- 'no-new-wrappers': 'error',
266
- 'no-new': 'error',
267
- 'no-nonoctal-decimal-escape': 'error',
268
- 'no-obj-calls': 'error',
269
- 'no-object-constructor': 'error',
270
- 'no-octal-escape': 'error',
271
- 'no-octal': 'error',
272
- 'no-param-reassign': 'off', // Parameter reassignment used wisely makes the code more readable
273
- 'no-plusplus': 'off',
274
- 'no-promise-executor-return': 'error',
275
- 'no-proto': 'error',
276
- 'no-prototype-builtins': 'error',
277
- 'no-redeclare': 'off', // Covered by @typescript-eslint/no-redeclare
278
- 'no-regex-spaces': 'error',
279
- 'no-restricted-exports': 'error',
280
- 'no-restricted-globals': [
281
- 'error',
282
- {
283
- name: 'isNaN',
284
- message: 'Use Number.isNaN() instead, and ensure that the input value is of type number. isNaN(undefined) !== Number.isNaN(undefined)'
285
- },
286
- ...ensureType.array(linterBundleConfig.ts?.overrides?.general?.['no-restricted-globals']?.additionalRestrictions)
287
- ],
288
- 'no-restricted-imports': 'off', // Covered by @typescript-eslint/no-restricted-imports
289
- 'no-restricted-properties': [
290
- 'error',
291
- ...ensureType.array(linterBundleConfig.ts?.overrides?.general?.['no-restricted-properties']?.additionalRestrictions)
292
- ],
293
- 'no-restricted-syntax': [
294
- 'error',
295
- ...ensureType.array(linterBundleConfig.ts?.overrides?.general?.['no-restricted-syntax']?.additionalRestrictions)
296
- ],
297
- 'no-return-assign': 'error',
298
- 'no-script-url': 'error',
299
- 'no-self-assign': 'error',
300
- 'no-self-compare': 'error',
301
- 'no-sequences': 'error',
302
- 'no-setter-return': 'error',
303
- 'no-shadow-restricted-names': 'error',
304
- 'no-shadow': 'off', // Covered by @typescript-eslint/no-shadow
305
- 'no-sparse-arrays': 'error',
306
- 'no-tabs': ['error', { allowIndentationTabs: true }],
307
- 'no-template-curly-in-string': 'error',
308
- 'no-ternary': 'off',
309
- 'no-this-before-super': 'error',
310
- 'no-throw-literal': 'off', // Covered by @typescript-eslint/no-throw-literal
311
- 'no-trailing-spaces': 'error',
312
- 'no-undef-init': 'error',
313
- 'no-undef': 'off', // Covered by TypeScript
314
- 'no-undefined': 'off', // @todo "Using the void operator to generate the value of undefined if necessary." should be disableable
315
- 'no-underscore-dangle': ['error', { allow: ['__DEV__'], allowAfterThis: true }],
316
- 'no-unexpected-multiline': 'error',
317
- 'no-unmodified-loop-condition': 'error',
318
- 'no-unneeded-ternary': 'error',
319
- 'no-unreachable-loop': 'error',
320
- 'no-unreachable': 'error',
321
- 'no-unsafe-finally': 'error',
322
- 'no-unsafe-negation': 'error',
323
- 'no-unsafe-optional-chaining': 'error',
324
- 'no-unused-expressions': 'off', // Covered by @typescript-eslint/no-unused-expressions
325
- 'no-unused-labels': 'error',
326
- 'no-unused-private-class-members': 'error',
327
- 'no-unused-vars': 'off', // Covered by @typescript-eslint/no-unused-vars
328
- 'no-use-before-define': 'off', // Covered by @typescript-eslint/no-use-before-define
329
- 'no-useless-backreference': 'error',
330
- 'no-useless-call': 'off', // @todo Produces into false-positives for CharsetConverter → `internalMap.encoder.call(encoding, str.toLowerCase())`
331
- 'no-useless-catch': 'error',
332
- 'no-useless-computed-key': 'error',
333
- 'no-useless-concat': 'error',
334
- 'no-useless-constructor': 'off', // Covered by @typescript-eslint/no-useless-constructor
335
- 'no-useless-escape': 'error',
336
- 'no-useless-rename': 'error',
337
- 'no-useless-return': 'off', // @todo Option to ignore switch-case blocks: In switch-case blocks it makes sense to keep all cases equal, instead of removing the 'return' from the last case, because this could produce bugs in later adjustments.
338
- 'no-var': 'error',
339
- 'no-void': 'off', // This is in conflict with @typescript-eslint/no-floating-promises which expects either `await` or `void`
340
- 'no-warning-comments': 'error',
341
- 'no-whitespace-before-property': 'error',
342
- 'no-with': 'error',
343
- 'nonblock-statement-body-position': 'error',
344
- 'object-curly-newline': 'error',
345
- 'object-curly-spacing': 'off', // Covered by @typescript-eslint/object-curly-spacing
346
- 'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
347
- 'object-shorthand': 'error',
348
- 'one-var-declaration-per-line': 'error',
349
- 'one-var': ['error', { initialized: 'never', uninitialized: 'never' }],
350
- 'operator-assignment': 'error',
351
- 'operator-linebreak': ['error', 'after', { overrides: { ':': 'ignore' } }],
352
- 'padded-blocks': ['error', 'never'],
353
- 'padding-line-between-statements': 'error',
354
- 'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
355
- 'prefer-const': 'error',
356
- 'prefer-destructuring': 'off', // We don't prefer destructuring if a type is specified ['error', { VariableDeclarator: { array: true, object: true }, AssignmentExpression: { array: false, object: false } }],
357
- 'prefer-exponentiation-operator': 'error',
358
- 'prefer-named-capture-group': 'off', // ES2018+, not supported in most browsers yet
359
- 'prefer-numeric-literals': 'error',
360
- 'prefer-object-spread': 'error',
361
- 'prefer-promise-reject-errors': 'error',
362
- 'prefer-regex-literals': 'error',
363
- 'prefer-rest-params': 'error',
364
- 'prefer-spread': 'error',
365
- 'prefer-template': 'error',
366
- 'quote-props': ['error', 'consistent-as-needed'],
367
- 'quotes': 'off', // Covered by @typescript-eslint/quotes
368
- 'radix': 'error',
369
- 'require-atomic-updates': 'error',
370
- 'require-await': 'off', // Covered by @typescript-eslint/require-await
371
- 'require-unicode-regexp': 'error',
372
- 'require-yield': 'error',
373
- 'rest-spread-spacing': 'error',
374
- 'semi-spacing': 'error',
375
- 'semi-style': 'error',
376
- 'semi': 'off', // Covered by @typescript-eslint/semi
377
- 'sort-imports': 'off', // import/order
378
- 'sort-keys': 'off', // Keys should be grouped by their scope/category, not by their name
379
- 'sort-vars': 'off', // Something like `for (let pos = 4 + addressLength, dataPos = 0; pos < length - 2; pos += 2, dataPos++) {` should be sorted by importance
380
- 'space-before-blocks': 'error',
381
- 'space-before-function-paren': 'off', // Covered by @typescript-eslint/space-before-function-paren
382
- 'space-in-parens': 'error',
383
- 'space-infix-ops': 'off', // Covered by @typescript-eslint/space-infix-ops
384
- 'space-unary-ops': 'error',
385
- 'spaced-comment': ['error', 'always', { markers: ['/'], block: { markers: ['!'], balanced: true } }],
386
- 'strict': 'error',
387
- 'switch-colon-spacing': 'error',
388
- 'symbol-description': 'error',
389
- 'template-curly-spacing': 'error',
390
- 'template-tag-spacing': 'error',
391
- 'unicode-bom': 'error',
392
- 'use-isnan': 'error',
393
- 'valid-typeof': ['error', { requireStringLiterals: true }],
394
- 'vars-on-top': 'error',
395
- 'wrap-iife': 'error',
396
- 'wrap-regex': 'error',
397
- 'yield-star-spacing': ['error', { before: true, after: false }],
398
- 'yoda': 'error',
399
-
400
- /**
401
- * typescript-eslint
402
- * @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules
403
- */
404
- '@typescript-eslint/adjacent-overload-signatures': 'error',
405
- '@typescript-eslint/array-type': 'error',
406
- '@typescript-eslint/await-thenable': 'error',
407
- '@typescript-eslint/ban-ts-comment': ['error', {
408
- 'ts-expect-error': 'allow-with-description'
409
- }],
410
- '@typescript-eslint/ban-tslint-comment': 'error',
411
- '@typescript-eslint/ban-types': ['error', {
412
- types: {
413
- 'Function': null,
414
- 'JSX.ELement': {
415
- message: 'Use React.ReactNode instead.',
416
- fixWith: 'React.ReactNode'
417
- },
418
- 'Object': {
419
- message: 'Use {} instead.',
420
- fixWith: '{}'
421
- }
422
- }
423
- }],
424
- '@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
425
- '@typescript-eslint/class-literal-property-style': 'error',
426
- '@typescript-eslint/class-methods-use-this': ['error', { exceptMethods: ['componentDidMount', 'componentDidUpdate', 'componentWillUnmount', 'shouldComponentUpdate'], ignoreOverrideMethods: true, ignoreClassesThatImplementAnInterface: true }],
427
- '@typescript-eslint/comma-dangle': ['error', { generics: 'ignore' }],
428
- '@typescript-eslint/comma-spacing': 'error',
429
- '@typescript-eslint/consistent-generic-constructors': 'error',
430
- '@typescript-eslint/consistent-indexed-object-style': 'error',
431
- '@typescript-eslint/consistent-type-assertions': 'error',
432
- '@typescript-eslint/consistent-type-definitions': 'error',
433
- '@typescript-eslint/consistent-type-exports': 'error',
434
- '@typescript-eslint/consistent-type-imports': ['error', { disallowTypeAnnotations: false }],
435
- '@typescript-eslint/dot-notation': 'error',
436
- '@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
437
- '@typescript-eslint/explicit-member-accessibility': ['error', {
438
- ignoredMethodNames: [
439
- 'constructor',
440
- 'getDerivedStateFromProps',
441
- 'componentDidMount',
442
- 'shouldComponentUpdate',
443
- 'render',
444
- 'getSnapshotBeforeUpdate',
445
- 'componentDidUpdate',
446
- 'componentWillUnmount',
447
- 'getDerivedStateFromError',
448
- 'componentDidCatch'
449
- ]
450
- }],
451
- '@typescript-eslint/explicit-module-boundary-types': ['off', { // @todo There must be an option to specify argument names which shall be ignored (arguments starting with "_", "props")
452
- allowedNames: [
453
- 'getDerivedStateFromProps',
454
- 'componentDidMount',
455
- 'shouldComponentUpdate',
456
- 'render',
457
- 'getSnapshotBeforeUpdate',
458
- 'componentDidUpdate',
459
- 'componentWillUnmount',
460
- 'getDerivedStateFromError',
461
- 'componentDidCatch'
462
- ]
463
- }],
464
- '@typescript-eslint/func-call-spacing': 'error',
465
- '@typescript-eslint/indent': [
466
- 'error',
467
- 'tab',
468
- {
469
- SwitchCase: 1,
470
- VariableDeclarator: 1,
471
- MemberExpression: 1,
472
- flatTernaryExpressions: true,
473
- ignoredNodes: ['ConditionalExpression']
474
- }
475
- ],
476
- '@typescript-eslint/key-spacing': 'error',
477
- '@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'semi', requireLast: true }, singleline: { delimiter: 'semi', requireLast: true } }],
478
- '@typescript-eslint/member-ordering': ['error', {
479
- default: [
480
- // Index signature
481
- 'signature',
482
-
483
- // Fields
484
- 'public-static-field',
485
- 'protected-static-field',
486
- '#private-static-field',
487
- 'private-static-field',
488
-
489
- 'public-decorated-field',
490
- 'protected-decorated-field',
491
- 'private-decorated-field',
492
-
493
- 'public-instance-field',
494
- 'protected-instance-field',
495
- '#private-instance-field',
496
- 'private-instance-field',
497
-
498
- 'public-abstract-field',
499
- 'protected-abstract-field',
500
-
501
- // Constructors
502
- 'public-constructor',
503
- 'protected-constructor',
504
- 'private-constructor',
505
-
506
- // Methods / Getters / Setters
507
- 'public-decorated-set',
508
- 'public-decorated-get',
509
- 'public-decorated-method',
510
- 'public-instance-set',
511
- 'public-instance-get',
512
- 'public-instance-method',
513
- 'public-static-set',
514
- 'public-static-get',
515
- 'public-static-method',
516
- 'public-abstract-get',
517
- 'public-abstract-set',
518
- 'public-abstract-method',
519
-
520
- 'protected-decorated-set',
521
- 'protected-decorated-get',
522
- 'protected-decorated-method',
523
- 'protected-instance-set',
524
- 'protected-instance-get',
525
- 'protected-instance-method',
526
- 'protected-static-set',
527
- 'protected-static-get',
528
- 'protected-static-method',
529
- 'protected-abstract-get',
530
- 'protected-abstract-set',
531
- 'protected-abstract-method',
532
-
533
- 'private-decorated-set',
534
- 'private-decorated-get',
535
- 'private-decorated-method',
536
- '#private-instance-set',
537
- '#private-instance-get',
538
- '#private-instance-method',
539
- 'private-instance-set',
540
- 'private-instance-get',
541
- 'private-instance-method',
542
- '#private-static-set',
543
- '#private-static-get',
544
- '#private-static-method',
545
- 'private-static-set',
546
- 'private-static-get',
547
- 'private-static-method'
548
- ]
549
- }],
550
- '@typescript-eslint/method-signature-style': ['error', 'property'],
551
- '@typescript-eslint/naming-convention': [
552
- 'error',
553
-
554
- { selector: 'default', format: ['camelCase'] },
555
-
556
- // Variable
557
- { selector: 'variable', format: ['camelCase', 'PascalCase'] }, // @todo PascalCase only for objects
558
- {
559
- selector: 'variable',
560
- filter: '^(is|should|has|can|did|will)[A-Z]',
561
- types: ['boolean'],
562
- format: ['camelCase']
563
- },
564
- {
565
- selector: 'variable',
566
- modifiers: ['const'],
567
- format: ['camelCase', 'PascalCase', 'UPPER_CASE']
568
- },
569
- {
570
- selector: 'variable',
571
- types: ['number', 'string', 'array'],
572
- format: ['camelCase', 'UPPER_CASE']
573
- },
574
- {
575
- selector: 'variable',
576
- types: ['function'],
577
- format: ['camelCase', 'PascalCase']
578
- },
579
-
580
- // Function
581
- { selector: 'function', format: ['camelCase', 'PascalCase'] },
582
-
583
- // Parameter
584
- { selector: 'parameter', format: ['camelCase', 'PascalCase'], leadingUnderscore: 'allow' },
585
-
586
- // Property
587
- { selector: 'property', format: ['camelCase', 'PascalCase'] },
588
- {
589
- selector: 'property',
590
- types: ['number', 'string', 'array'],
591
- format: ['camelCase', 'PascalCase', 'UPPER_CASE']
592
- },
593
- {
594
- selector: 'property',
595
- modifiers: ['readonly'],
596
- format: ['camelCase', 'PascalCase', 'UPPER_CASE']
597
- },
598
- {
599
- selector: 'objectLiteralProperty',
600
- // `__html` is a property of React's `dangerouslySetInnerHTML` object
601
- filter: '^__html$',
602
- types: ['string'],
603
- format: null
604
- },
605
- {
606
- // Allow properties which only contain digits
607
- selector: 'objectLiteralProperty',
608
- filter: '^\\d+$',
609
- format: null
610
- },
611
- {
612
- // Allow empty or one-character properties
613
- selector: 'objectLiteralProperty',
614
- filter: '^.?$',
615
- format: null
616
- },
617
- {
618
- // Allow properties which which don't contain an underscore (to prevent usage of "UPPER_CASE") and contain at least 4 characters
619
- selector: 'objectLiteralProperty',
620
- filter: '^[^_]{4,}$',
621
- format: null
622
- },
623
- { selector: 'typeProperty', format: ['camelCase', 'PascalCase'] },
624
- {
625
- selector: 'typeProperty',
626
- types: ['number', 'string', 'array'],
627
- format: ['camelCase', 'PascalCase', 'UPPER_CASE']
628
- },
629
- {
630
- selector: 'typeProperty',
631
- modifiers: ['readonly'],
632
- format: ['camelCase', 'PascalCase', 'UPPER_CASE']
633
- },
634
-
635
- // Parameter property
636
- { selector: 'parameterProperty', format: ['camelCase'] },
637
-
638
- // Method
639
- { selector: 'method', format: ['camelCase'] },
640
-
641
- // Accessor
642
- { selector: 'accessor', format: ['camelCase'] },
643
-
644
- // Enum member
645
- { selector: 'enumMember', format: ['UPPER_CASE'] },
646
-
647
- // Class
648
- { selector: 'class', format: ['PascalCase'] },
649
-
650
- // Interface
651
- { selector: 'interface', format: ['PascalCase'] },
652
-
653
- // Import
654
- { selector: 'import', format: ['camelCase', 'PascalCase'] },
655
-
656
- // Type alias
657
- { selector: 'typeAlias', format: ['PascalCase'] },
658
-
659
- // Enum
660
- { selector: 'enum', format: ['PascalCase'] },
661
-
662
- // Type parameter
663
- { selector: 'typeParameter', format: ['PascalCase'] }
664
- ],
665
- '@typescript-eslint/no-array-constructor': 'error',
666
- '@typescript-eslint/no-base-to-string': 'error',
667
- '@typescript-eslint/no-confusing-non-null-assertion': 'error',
668
- '@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
669
- '@typescript-eslint/no-dupe-class-members': 'error',
670
- '@typescript-eslint/no-duplicate-enum-values': 'error',
671
- '@typescript-eslint/no-duplicate-type-constituents': 'error',
672
- '@typescript-eslint/no-dynamic-delete': 'error',
673
- '@typescript-eslint/no-empty-function': 'error',
674
- '@typescript-eslint/no-empty-interface': 'off',
675
- '@typescript-eslint/no-explicit-any': 'off',
676
- '@typescript-eslint/no-extra-non-null-assertion': 'error',
677
- '@typescript-eslint/no-extra-parens': ['off', 'all', { nestedBinaryExpressions: true, enforceForArrowConditionals: true }], // @todo There should be a option to enforce parens for IIFs + This has to be activated if all other linting errors are resolved
678
- '@typescript-eslint/no-extra-semi': 'error',
679
- '@typescript-eslint/no-extraneous-class': 'error',
680
- '@typescript-eslint/no-floating-promises': 'error',
681
- '@typescript-eslint/no-for-in-array': 'error',
682
- '@typescript-eslint/no-implicit-any-catch': 'off', // Results into false-positive with the TS4.4 option "useUnknownInCatchVariables"
683
- '@typescript-eslint/no-import-type-side-effects': 'error',
684
- '@typescript-eslint/no-inferrable-types': 'off', // Sometimes an explicit type helps to understand the code better
685
- '@typescript-eslint/no-invalid-this': 'error',
686
- '@typescript-eslint/no-invalid-void-type': ['error', { allowInGenericTypeArguments: true }],
687
- '@typescript-eslint/no-loop-func': 'error',
688
- '@typescript-eslint/no-loss-of-precision': 'error',
689
- '@typescript-eslint/no-magic-numbers': 'off', // @todo There should be an option that numbers in arrays are ok like `const MaxSizes = [4, 8, 16, 32, 64];`
690
- /* ['error', {
691
- 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],
692
- ignoreArrayIndexes: true,
693
- ignoreClassFieldInitialValues: true,
694
- enforceConst: true,
695
- detectObjects: true
696
- }], */
697
- '@typescript-eslint/no-meaningless-void-operator': 'error',
698
- '@typescript-eslint/no-misused-new': 'error',
699
- '@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
700
- '@typescript-eslint/no-mixed-enums': 'error',
701
- '@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
702
- '@typescript-eslint/no-non-null-assertion': 'error',
703
- '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
704
- '@typescript-eslint/no-redeclare': ['error', { ignoreDeclarationMerge: true }],
705
- '@typescript-eslint/no-redundant-type-constituents': 'off', // False positive with Promise<... | never>
706
- '@typescript-eslint/no-require-imports': 'error',
707
- '@typescript-eslint/no-restricted-imports': 'error',
708
- '@typescript-eslint/no-shadow': 'error',
709
- '@typescript-eslint/no-this-alias': 'error',
710
- '@typescript-eslint/no-throw-literal': ['error', {
711
- allowThrowingAny: false,
712
- allowThrowingUnknown: true
713
- }],
714
- '@typescript-eslint/no-type-alias': ['off', { // @todo There should be an option like 'sub-in-unions-and-intersections', which allows `type A = (string | number)[];`
715
- allowAliases: 'always',
716
- allowCallbacks: 'always',
717
- allowConditionalTypes: 'always',
718
- allowConstructors: 'always',
719
- allowLiterals: 'in-unions-and-intersections',
720
- allowMappedTypes: 'always',
721
- allowTupleTypes: 'in-unions-and-intersections'
722
- }],
723
- '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
724
- '@typescript-eslint/no-unnecessary-condition': ['error', { allowConstantLoopConditions: true }],
725
- '@typescript-eslint/no-unnecessary-qualifier': 'error',
726
- '@typescript-eslint/no-unnecessary-type-arguments': 'error',
727
- '@typescript-eslint/no-unnecessary-type-assertion': 'error',
728
- '@typescript-eslint/no-unnecessary-type-constraint': 'error',
729
- '@typescript-eslint/no-unsafe-argument': 'error',
730
- '@typescript-eslint/no-unsafe-assignment': 'error',
731
- '@typescript-eslint/no-unsafe-call': 'error',
732
- '@typescript-eslint/no-unsafe-declaration-merging': 'error',
733
- '@typescript-eslint/no-unsafe-enum-comparison': 'error',
734
- '@typescript-eslint/no-unsafe-member-access': 'error',
735
- '@typescript-eslint/no-unsafe-return': 'error',
736
- '@typescript-eslint/no-unsafe-unary-minus': 'error',
737
- '@typescript-eslint/no-unused-expressions': 'error',
738
- '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }],
739
- '@typescript-eslint/no-use-before-define': ['error', { functions: false }],
740
- '@typescript-eslint/no-useless-constructor': 'error',
741
- '@typescript-eslint/no-useless-empty-export': 'error',
742
- '@typescript-eslint/no-var-requires': 'error',
743
- '@typescript-eslint/non-nullable-type-assertion-style': 'off', // Conflicts with `no-non-null-assertion`, which we prefer
744
- '@typescript-eslint/object-curly-spacing': ['error', 'always'],
745
- '@typescript-eslint/prefer-as-const': 'error',
746
- '@typescript-eslint/prefer-enum-initializers': 'off',
747
- '@typescript-eslint/prefer-for-of': 'error',
748
- '@typescript-eslint/prefer-function-type': 'error',
749
- '@typescript-eslint/prefer-includes': 'error',
750
- '@typescript-eslint/prefer-literal-enum-member': 'error',
751
- '@typescript-eslint/prefer-namespace-keyword': 'error',
752
- '@typescript-eslint/prefer-nullish-coalescing': ['error', { ignoreConditionalTests: true, ignoreMixedLogicalExpressions: true }],
753
- '@typescript-eslint/prefer-optional-chain': 'error',
754
- '@typescript-eslint/prefer-readonly': 'error',
755
- '@typescript-eslint/prefer-readonly-parameter-types': ['off', { ignoreInferredTypes: true }], // @todo An interface should ensure that it's properties are readonly, not every usage of it
756
- '@typescript-eslint/prefer-reduce-type-parameter': 'error',
757
- '@typescript-eslint/prefer-regexp-exec': 'error',
758
- '@typescript-eslint/prefer-return-this-type': 'error',
759
- '@typescript-eslint/prefer-string-starts-ends-with': 'error',
760
- '@typescript-eslint/prefer-ts-expect-error': 'error',
761
- '@typescript-eslint/promise-function-async': 'error',
762
- '@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
763
- '@typescript-eslint/require-array-sort-compare': ['error', { ignoreStringArrays: true }],
764
- '@typescript-eslint/require-await': 'off', // Sometimes a function is marked as async to have a consistent interface with other functions in a class, even if this specific function does not contain async code (yet)
765
- '@typescript-eslint/restrict-plus-operands': 'error',
766
- '@typescript-eslint/restrict-template-expressions': ['off', { // @todo Activate later. Doesn't work well yet, see https://github.com/typescript-eslint/typescript-eslint/issues/1797 or https://github.com/typescript-eslint/typescript-eslint/issues/1660
767
- allowAny: true,
768
- allowBoolean: true,
769
- allowNullish: true,
770
- allowNumber: true
771
- }],
772
- '@typescript-eslint/return-await': 'error',
773
- '@typescript-eslint/semi': 'error',
774
- '@typescript-eslint/sort-type-constituents': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
775
- '@typescript-eslint/sort-type-union-intersection-members': 'off', // Types should be sorted and grouped by priority and their meaning, not alphabetically
776
- '@typescript-eslint/space-before-function-paren': 'error',
777
- '@typescript-eslint/space-infix-ops': 'error',
778
- '@typescript-eslint/strict-boolean-expressions': ['off', { allowNullable: true, allowSafe: true, ignoreRhs: true }], // @todo Doesn't work for specific code, check later after all linter warnings are fixed, maybe at some positions we can use '??'
779
- '@typescript-eslint/switch-exhaustiveness-check': 'error',
780
- '@typescript-eslint/triple-slash-reference': 'error',
781
- '@typescript-eslint/type-annotation-spacing': 'error',
782
- '@typescript-eslint/typedef': 'off', // We are using "noImplicitAny" in tsconfig.json instead
783
- '@typescript-eslint/unbound-method': 'off', // @todo This doesn't work with the Utils.bind decorator. Is it possible to work around that?
784
- '@typescript-eslint/unified-signatures': 'error',
785
-
786
- /**
787
- * eslint-plugin-functional
788
- * @see https://github.com/jonaskello/eslint-plugin-functional#supported-rules
789
- */
790
- 'functional/functional-parameters': 'off',
791
- 'functional/immutable-data': 'off', // This rule would require a lot of additional code and workarounds, which would make the result much more illegible // @todo is that resolved in v6.0.0?
792
- 'functional/no-classes': 'off',
793
- 'functional/no-conditional-statements': 'off',
794
- 'functional/no-expression-statements': ['off', { ignoreVoid: true }], // Creates too much false-positives // @todo is that resolved in v6.0.0?
795
- 'functional/no-let': 'off', // This is better covered by the `prefer-const` rule
796
- 'functional/no-loop-statements': 'off',
797
- 'functional/no-mixed-types': ['error', {
798
- checkInterfaces: false,
799
- checkTypeLiterals: true
800
- }],
801
- 'functional/no-promise-reject': 'off',
802
- 'functional/no-return-void': 'off',
803
- 'functional/no-this-expressions': 'off',
804
- 'functional/no-throw-statements': 'off',
805
- 'functional/no-try-statements': 'off',
806
- 'functional/prefer-immutable-types': 'off',
807
- 'functional/prefer-property-signatures': 'off', // Covered by @typescript-eslint/method-signature-style
808
- 'functional/prefer-tacit': 'off', // @see https://github.com/jonaskello/eslint-plugin-functional/issues/263
809
- 'functional/readonly-type': ['error', 'keyword'],
810
- 'functional/type-declaration-immutability': 'off',
811
-
812
- /**
813
- * eslint-plugin-import
814
- * @see https://github.com/import-js/eslint-plugin-import
815
- */
816
- 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
817
- 'import/default': 'error',
818
- 'import/dynamic-import-chunkname': ['error', {
819
- webpackChunknameFormat: '[0-9a-zA-Z-_/.+]+'
820
- }],
821
- 'import/export': 'error',
822
- 'import/exports-last': 'off', // Exports should be declared first; helper functions last
823
- '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
824
- 'import/first': 'error',
825
- 'import/group-exports': 'off',
826
- 'import/max-dependencies': ['error', { max: 20, ignoreTypeImports: true }],
827
- 'import/named': 'error',
828
- 'import/namespace': ['error', { allowComputed: true }],
829
- 'import/newline-after-import': ['error', { considerComments: false }],
830
- 'import/no-absolute-path': 'error',
831
- 'import/no-amd': 'error',
832
- 'import/no-anonymous-default-export': 'error',
833
- 'import/no-commonjs': 'error',
834
- 'import/no-cycle': 'error',
835
- 'import/no-default-export': 'error',
836
- 'import/no-deprecated': 'error',
837
- 'import/no-duplicates': 'error',
838
- 'import/no-dynamic-require': 'error',
839
- 'import/no-empty-named-blocks': 'error',
840
- 'import/no-extraneous-dependencies': ['error', { includeTypes: true }],
841
- '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!
842
- allow: [
843
- 'workbox-window/utils/WorkboxEvent'
844
- ]
845
- }],
846
- 'import/no-import-module-exports': 'off', // Activated only for JavaScript files
847
- 'import/no-mutable-exports': 'error',
848
- 'import/no-named-as-default-member': 'error',
849
- 'import/no-named-as-default': 'error',
850
- 'import/no-named-default': 'error',
851
- 'import/no-named-export': 'off',
852
- 'import/no-namespace': 'off', // @todo Enabling this produces a JavaScript error in the rule; anyhow - could that reduce the package size, because of improved tree-shaking/dead-code-elimination?
853
- 'import/no-nodejs-modules': 'error',
854
- 'import/no-relative-packages': 'error',
855
- 'import/no-relative-parent-imports': 'off', // @todo Disabled because of a bug on Windows, re-enable as soon as it's resolved: https://github.com/import-js/eslint-plugin-import/issues/1644
856
- 'import/no-restricted-paths': 'error',
857
- 'import/no-self-import': 'error',
858
- 'import/no-unassigned-import': ['error', {
859
- allow: [
860
- '**/*.scss',
861
- 'jest-extended'
862
- ]
863
- }],
864
- 'import/no-unresolved': ['error', { caseSensitiveStrict: true }],
865
- 'import/no-unused-modules': ['off', { unusedExports: true }], // Disabled because of false-positive with `export type { ... }` + `import type { ... }`
866
- 'import/no-useless-path-segments': 'error',
867
- 'import/no-webpack-loader-syntax': 'off', // Indeed, you should avoid that, but if we do it, we have a reason for it
868
- 'import/order': ['error', {
869
- 'alphabetize': { order: 'asc', orderImportKind: 'asc', caseInsensitive: true },
870
- 'groups': ['builtin', 'unknown', 'external', 'internal', 'parent', 'sibling', 'index'],
871
- 'newlines-between': 'always',
872
- 'pathGroupsExcludedImportTypes': [],
873
- 'pathGroups': [
874
- ...ensureType.array(linterBundleConfig.ts?.overrides?.general?.['import/order']?.additionalExternalPatterns).map(
875
- /**
876
- * Creates an "external" group using the additional external pattern configuration.
877
- * @param {string} pattern - A given pattern
878
- * @returns {{ pattern: string; group: 'external'; }} An "external" path configuration object
879
- */
880
- (pattern) => ({ pattern, group: 'external' })
881
- ),
882
- { pattern: '@*', group: 'internal' },
883
- { pattern: '@*/**', group: 'internal' },
884
- { pattern: '*!*/**', group: 'internal', position: 'after' } // Webpack loaders, e.g. 'worker-ref-loader!@app/components/FileFormatIdentificationDialog/TypeDetection.worker'
885
- ],
886
- 'distinctGroup': false
887
- }],
888
- 'import/prefer-default-export': 'off',
889
- 'import/unambiguous': 'off',
890
-
891
- /**
892
- * eslint-plugin-eslint-comments
893
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/
894
- */
895
- 'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
896
- 'eslint-comments/no-aggregating-enable': 'error',
897
- 'eslint-comments/no-duplicate-disable': 'error',
898
- 'eslint-comments/no-unlimited-disable': 'off', // Covered by `unicorn/no-abusive-eslint-disable`
899
- 'eslint-comments/no-unused-disable': 'error', // @todo What's the benefit over the `reportUnusedDisableDirectives` option?
900
- 'eslint-comments/no-unused-enable': 'error',
901
- 'eslint-comments/no-restricted-disable': 'off',
902
- 'eslint-comments/no-use': 'off',
903
- 'eslint-comments/require-description': ['error', { ignore: ['eslint-enable'] }],
904
-
905
- /**
906
- * eslint-plugin-promise
907
- * @see https://github.com/xjamundx/eslint-plugin-promise
908
- */
909
- 'promise/always-return': 'off', // If the result of an `.then()` is not used, there is no need to return something.
910
- 'promise/avoid-new': 'off',
911
- 'promise/catch-or-return': 'error',
912
- 'promise/no-callback-in-promise': 'off',
913
- 'promise/no-multiple-resolved': 'error',
914
- 'promise/no-native': 'off',
915
- 'promise/no-nesting': 'off',
916
- 'promise/no-new-statics': 'error',
917
- 'promise/no-promise-in-callback': 'off',
918
- 'promise/no-return-in-finally': 'error',
919
- 'promise/no-return-wrap': 'error',
920
- 'promise/param-names': 'off', // @todo Disabled until this issue is fixed: https://github.com/xjamundx/eslint-plugin-promise/issues/206
921
- 'promise/prefer-await-to-callbacks': 'off', // It's not always possible to use avoid callbacks.
922
- 'promise/prefer-await-to-then': 'off', // Depending on the use-case `.then()`/`.catch()` might be easier to understand
923
- 'promise/valid-params': 'off', // TypeScript ensures that
924
-
925
- /**
926
- * eslint-plugin-unicorn
927
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn
928
- */
929
- 'unicorn/better-regex': 'error',
930
- 'unicorn/catch-error-name': 'error',
931
- 'unicorn/consistent-destructuring': 'off', // Depending on the usage, it makes sense to destructure e.g. `props` only partial.
932
- 'unicorn/consistent-function-scoping': 'error',
933
- 'unicorn/custom-error-definition': 'off',
934
- 'unicorn/empty-brace-spaces': 'error',
935
- 'unicorn/error-message': 'error',
936
- 'unicorn/escape-case': 'error',
937
- 'unicorn/expiring-todo-comments': 'error',
938
- 'unicorn/explicit-length-check': 'error',
939
- 'unicorn/filename-case': ['off', { // Disabled in favour of the linter-bundle `files` task
940
- cases: {
941
- camelCase: true,
942
- pascalCase: true
943
- },
944
- ignore: [
945
- /([A-Za-z0-9]?[a-z0-9]+)*[A-Z]{2,4}([A-Za-z0-9]?[a-z0-9]+)*/u // Up to 4 Characters can be upper-case in a row (e.g. in `prepareDOM` or `SVGIcon`)
946
- ]
947
- }],
948
- 'unicorn/import-style': ['error', {
949
- styles: {
950
- path: {
951
- unassigned: false,
952
- default: false,
953
- namespace: true,
954
- named: true
955
- }
956
- }
957
- }],
958
- 'unicorn/new-for-builtins': 'error',
959
- 'unicorn/no-abusive-eslint-disable': 'error',
960
- 'unicorn/no-array-callback-reference': 'off', // If I use functions, they are the best option for this use-case
961
- 'unicorn/no-array-for-each': 'error',
962
- 'unicorn/no-array-method-this-argument': 'error',
963
- 'unicorn/no-array-push-push': 'error',
964
- 'unicorn/no-array-reduce': ['error', { allowSimpleOperations: true }],
965
- 'unicorn/no-await-expression-member': 'error',
966
- 'unicorn/no-console-spaces': 'error',
967
- 'unicorn/no-document-cookie': 'error',
968
- 'unicorn/no-empty-file': 'error',
969
- 'unicorn/no-for-loop': 'off', // @typescript-eslint/prefer-for-of
970
- 'unicorn/no-hex-escape': 'error',
971
- 'unicorn/no-instanceof-array': 'error',
972
- 'unicorn/no-keyword-prefix': 'off',
973
- 'unicorn/no-lonely-if': 'off', // Sometimes the code is clearer if-conditions are not combined
974
- 'unicorn/no-negated-condition': 'off',
975
- 'unicorn/no-nested-ternary': 'off', // We prefer no-nested-ternary of ESlint
976
- '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
977
- 'unicorn/no-new-buffer': 'error',
978
- 'unicorn/no-null': 'off', // @todo Too much old native JavaScript functions are based on `null`. Maybe we can replace them later.
979
- 'unicorn/no-object-as-default-parameter': 'error',
980
- 'unicorn/no-process-exit': 'error',
981
- 'unicorn/no-static-only-class': 'error',
982
- 'unicorn/no-thenable': 'error',
983
- 'unicorn/no-this-assignment': 'error',
984
- 'unicorn/no-typeof-undefined': 'error',
985
- 'unicorn/no-unnecessary-await': 'error',
986
- 'unicorn/no-unnecessary-polyfills': 'error',
987
- 'unicorn/no-unreadable-array-destructuring': 'error',
988
- 'unicorn/no-unreadable-iife': 'error',
989
- 'unicorn/no-unused-properties': 'error',
990
- 'unicorn/no-useless-fallback-in-spread': 'error',
991
- 'unicorn/no-useless-promise-resolve-reject': 'error',
992
- 'unicorn/no-invalid-remove-event-listener': 'error',
993
- 'unicorn/no-useless-length-check': 'error',
994
- 'unicorn/no-useless-spread': 'error',
995
- 'unicorn/no-useless-switch-case': 'error',
996
- 'unicorn/no-useless-undefined': ['error', { checkArguments: false }],
997
- 'unicorn/no-zero-fractions': 'error',
998
- 'unicorn/number-literal-case': 'error',
999
- 'unicorn/numeric-separators-style': 'error',
1000
- 'unicorn/prefer-add-event-listener': 'error',
1001
- 'unicorn/prefer-array-find': 'error',
1002
- 'unicorn/prefer-array-flat': 'error',
1003
- 'unicorn/prefer-array-flat-map': 'error',
1004
- 'unicorn/prefer-array-index-of': 'error',
1005
- 'unicorn/prefer-array-some': 'error',
1006
- 'unicorn/prefer-at': 'off', // @todo Disabled for now, since `at` is not supported by TypeScript type definitions yet.
1007
- 'unicorn/prefer-blob-reading-methods': 'off', // @todo Disabled for now, since it's only supported in Safari 14+. Activate in 2025
1008
- 'unicorn/prefer-code-point': 'error',
1009
- 'unicorn/prefer-date-now': 'error',
1010
- 'unicorn/prefer-default-parameters': 'error',
1011
- 'unicorn/prefer-dom-node-append': 'error',
1012
- 'unicorn/prefer-dom-node-dataset': 'off', // `setAttribute` is faster than `dataset`. See https://www.measurethat.net/Benchmarks/Show/7740/0/classname-vs-setattribute-vs-classlist-vs-dataset
1013
- 'unicorn/prefer-dom-node-remove': 'error',
1014
- 'unicorn/prefer-dom-node-text-content': 'error',
1015
- 'unicorn/prefer-event-target': 'off', // @todo Disabled for now, since `EventTarget` requires Node.js 16. Activate in 2025
1016
- 'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }],
1017
- 'unicorn/prefer-includes': 'error',
1018
- 'unicorn/prefer-json-parse-buffer': 'off', // TypeScript states that string needs to be used as of the ES specification. @see https://github.com/microsoft/TypeScript/issues/11842
1019
- 'unicorn/prefer-keyboard-event-key': 'error',
1020
- 'unicorn/prefer-logical-operator-over-ternary': 'error',
1021
- 'unicorn/prefer-math-trunc': 'error',
1022
- 'unicorn/prefer-modern-dom-apis': 'error',
1023
- 'unicorn/prefer-modern-math-apis': 'error',
1024
- 'unicorn/prefer-module': 'off',
1025
- 'unicorn/prefer-native-coercion-functions': 'off',
1026
- 'unicorn/prefer-negative-index': 'error',
1027
- 'unicorn/prefer-number-properties': 'error',
1028
- 'unicorn/prefer-object-has-own': 'off', // Not widely supported yet. Can be activated in 2024
1029
- 'unicorn/prefer-object-from-entries': 'error',
1030
- 'unicorn/prefer-optional-catch-binding': 'error',
1031
- 'unicorn/prefer-prototype-methods': 'error',
1032
- 'unicorn/prefer-query-selector': 'off', // document.getElementById() is much faster
1033
- 'unicorn/prefer-reflect-apply': 'error',
1034
- 'unicorn/prefer-set-has': 'error',
1035
- 'unicorn/prefer-set-size': 'error',
1036
- '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
1037
- 'unicorn/prefer-string-replace-all': 'off', // @todo Available since 2020 in browsers. Should this be preferred?
1038
- '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.
1039
- 'unicorn/prefer-string-starts-ends-with': 'error',
1040
- 'unicorn/prefer-string-trim-start-end': 'error',
1041
- 'unicorn/prefer-switch': 'error',
1042
- 'unicorn/prefer-ternary': 'off', // We prefer readability over saving a few chars
1043
- 'unicorn/prefer-top-level-await': 'off', // @todo Available since 2021. Activate in 2024
1044
- 'unicorn/prefer-regexp-test': 'error',
1045
- 'unicorn/prefer-type-error': 'error',
1046
- 'unicorn/prevent-abbreviations': ['error', { ignore: ['args', 'i', 'j', 'i18n', 'ref', 'Ref', 'params', 'props', 'Props'] }],
1047
- 'unicorn/relative-url-style': 'error',
1048
- 'unicorn/require-array-join-separator': 'error',
1049
- 'unicorn/require-number-to-fixed-digits-argument': 'error',
1050
- 'unicorn/require-post-message-target-origin': 'off', // False-positive with Workers which don't support a `targetOrigin`
1051
- 'unicorn/string-content': ['error', {
1052
- patterns: {
1053
- '\\.\\.\\.': '…',
1054
- // eslint-disable-next-line unicorn/string-content -- If not disabled, the rule would report it's own disable-patterns.
1055
- '->': '→'
1056
- }
1057
- }],
1058
- 'unicorn/switch-case-braces': ['error', 'avoid'],
1059
- 'unicorn/template-indent': 'error',
1060
- 'unicorn/text-encoding-identifier-case': 'off',
1061
- 'unicorn/throw-new-error': 'error'
1062
- }
1063
- }
1064
- ]
1065
- };