linter-bundle 6.3.0 → 7.1.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 (156) hide show
  1. package/.linter-bundle.js +27 -17
  2. package/.linter-bundle.schema.json +45 -0
  3. package/CHANGELOG.md +146 -3
  4. package/README.md +56 -63
  5. package/TODO.md +0 -58
  6. package/eslint/gatsby.mjs +95 -0
  7. package/eslint/index.mjs +1146 -0
  8. package/eslint/javascript-lazy.mjs +24 -0
  9. package/eslint/javascript.mjs +126 -0
  10. package/eslint/jest.mjs +175 -0
  11. package/eslint/jsdoc.mjs +103 -0
  12. package/eslint/react.mjs +244 -0
  13. package/eslint/rules/enforce-logical-expression-parens.md +31 -0
  14. package/eslint/rules/enforce-logical-expression-parens.mjs +39 -0
  15. package/eslint/rules/enforce-ternary-parens.md +29 -0
  16. package/eslint/rules/enforce-ternary-parens.mjs +39 -0
  17. package/eslint/rules/ensure-lucide-import-consistency.md +38 -0
  18. package/eslint/rules/ensure-lucide-import-consistency.mjs +112 -0
  19. package/eslint/rules/helper/is-parenthesized.mjs +40 -0
  20. package/eslint/rules/no-extra-spaces-in-generics.md +25 -0
  21. package/eslint/rules/no-extra-spaces-in-generics.mjs +55 -0
  22. package/eslint/rules/no-ternary-return.md +29 -0
  23. package/eslint/rules/no-ternary-return.mjs +50 -0
  24. package/eslint/rules/no-unnecessary-typeof.md +1 -1
  25. package/eslint/rules/{no-unnecessary-typeof.js → no-unnecessary-typeof.mjs} +14 -21
  26. package/eslint/rules/restricted-filenames.md +4 -4
  27. package/eslint/rules/{restricted-filenames.js → restricted-filenames.mjs} +7 -7
  28. package/eslint/storybook.mjs +42 -0
  29. package/eslint/type-declarations.mjs +49 -0
  30. package/eslint/{overrides-worker.cjs → worker.mjs} +12 -14
  31. package/eslint.mjs +5 -0
  32. package/files/index.js +3 -3
  33. package/helper/{ensure-type.cjs → ensure-type.mjs} +7 -6
  34. package/helper/get-git-files.js +1 -1
  35. package/helper/get-outdated-dependencies.js +4 -4
  36. package/helper/get-outdated-overrides.js +2 -2
  37. package/helper/get-stylelint-path.js +4 -3
  38. package/helper/is-npm-or-yarn.js +2 -2
  39. package/helper/linter-bundle-config.js +9 -14
  40. package/helper/run-process.js +6 -4
  41. package/lint.js +33 -24
  42. package/package.json +32 -29
  43. package/stylelint/index.mjs +1111 -0
  44. package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/{index.cjs → index.mjs} +1 -1
  45. package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/{selectors.cjs → selectors.mjs} +15 -31
  46. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/{index.cjs → index.mjs} +6 -12
  47. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/{index.cjs → index.mjs} +11 -13
  48. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/{index.cjs → index.mjs} +18 -22
  49. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/{index.cjs → index.mjs} +10 -9
  50. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{atRuleNameSpaceChecker.cjs → atRuleNameSpaceChecker.mjs} +4 -3
  51. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/{index.cjs → index.mjs} +16 -30
  52. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/{index.cjs → index.mjs} +13 -35
  53. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/{index.cjs → index.mjs} +11 -40
  54. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/{index.cjs → index.mjs} +10 -27
  55. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/{index.cjs → index.mjs} +14 -65
  56. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/{index.cjs → index.mjs} +13 -30
  57. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/{index.cjs → index.mjs} +14 -27
  58. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/{index.cjs → index.mjs} +10 -16
  59. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.mjs +93 -0
  60. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/{index.cjs → index.mjs} +11 -12
  61. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/{index.cjs → index.mjs} +11 -29
  62. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/{index.cjs → index.mjs} +9 -8
  63. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/{index.cjs → index.mjs} +10 -23
  64. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/{index.cjs → index.mjs} +11 -36
  65. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/{index.cjs → index.mjs} +9 -27
  66. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/{index.cjs → index.mjs} +9 -25
  67. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/{index.cjs → index.mjs} +8 -9
  68. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/{index.cjs → index.mjs} +8 -9
  69. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{declarationBangSpaceChecker.cjs → declarationBangSpaceChecker.mjs} +5 -4
  70. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{declarationColonSpaceChecker.cjs → declarationColonSpaceChecker.mjs} +5 -4
  71. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{findMediaOperator.cjs → findMediaOperator.mjs} +2 -2
  72. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/{index.cjs → index.mjs} +8 -9
  73. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/{index.cjs → index.mjs} +8 -9
  74. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/{index.cjs → index.mjs} +8 -9
  75. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/{index.cjs → index.mjs} +8 -9
  76. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/{index.cjs → index.mjs} +19 -39
  77. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/{index.cjs → index.mjs} +19 -54
  78. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/{index.cjs → index.mjs} +21 -68
  79. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/{index.cjs → index.mjs} +16 -31
  80. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{functionCommaSpaceChecker.cjs → functionCommaSpaceChecker.mjs} +8 -7
  81. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{functionCommaSpaceFix.cjs → functionCommaSpaceFix.mjs} +1 -1
  82. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/{index.cjs → index.mjs} +39 -64
  83. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/{index.cjs → index.mjs} +15 -44
  84. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/{index.cjs → index.mjs} +10 -49
  85. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/{index.cjs → index.mjs} +10 -9
  86. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/{index.cjs → index.mjs} +8 -9
  87. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/{index.cjs → index.mjs} +8 -9
  88. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/{index.cjs → index.mjs} +9 -16
  89. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/{index.cjs → index.mjs} +8 -21
  90. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/{index.cjs → index.mjs} +10 -11
  91. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/{index.cjs → index.mjs} +10 -11
  92. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/{index.cjs → index.mjs} +8 -9
  93. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/{index.cjs → index.mjs} +6 -6
  94. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/{index.cjs → index.mjs} +8 -9
  95. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/{index.cjs → index.mjs} +8 -9
  96. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{mediaFeatureColonSpaceChecker.cjs → mediaFeatureColonSpaceChecker.mjs} +5 -4
  97. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{mediaQueryListCommaWhitespaceChecker.cjs → mediaQueryListCommaWhitespaceChecker.mjs} +6 -5
  98. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/{index.cjs → index.mjs} +6 -20
  99. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/{index.cjs → index.mjs} +13 -16
  100. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/{index.cjs → index.mjs} +10 -33
  101. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/{index.cjs → index.mjs} +7 -13
  102. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/{index.cjs → index.mjs} +13 -31
  103. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/{index.cjs → index.mjs} +9 -18
  104. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/{index.cjs → index.mjs} +10 -16
  105. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/{index.cjs → index.mjs} +9 -36
  106. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/{index.cjs → index.mjs} +7 -8
  107. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/{index.cjs → index.mjs} +7 -8
  108. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/{index.cjs → index.mjs} +7 -8
  109. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/{index.cjs → index.mjs} +7 -8
  110. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/{index.cjs → index.mjs} +9 -20
  111. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/{index.cjs → index.mjs} +9 -14
  112. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/{index.cjs → index.mjs} +7 -8
  113. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/{index.cjs → index.mjs} +7 -8
  114. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/{index.cjs → index.mjs} +7 -8
  115. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/{index.cjs → index.mjs} +10 -21
  116. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/{index.cjs → index.mjs} +10 -24
  117. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/{index.cjs → index.mjs} +12 -35
  118. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/{index.cjs → index.mjs} +10 -15
  119. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorAttributeOperatorSpaceChecker.cjs → selectorAttributeOperatorSpaceChecker.mjs} +6 -5
  120. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorCombinatorSpaceChecker.cjs → selectorCombinatorSpaceChecker.mjs} +12 -11
  121. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{selectorListCommaWhitespaceChecker.cjs → selectorListCommaWhitespaceChecker.mjs} +5 -4
  122. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/{index.cjs → index.mjs} +43 -65
  123. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/{index.cjs → index.mjs} +5 -5
  124. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/{index.cjs → index.mjs} +17 -34
  125. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/{index.cjs → index.mjs} +11 -12
  126. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/{index.cjs → index.mjs} +6 -6
  127. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/{index.cjs → index.mjs} +10 -11
  128. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/{index.cjs → index.mjs} +10 -11
  129. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/{index.cjs → index.mjs} +12 -18
  130. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/{valueListCommaWhitespaceChecker.cjs → valueListCommaWhitespaceChecker.mjs} +6 -5
  131. package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/{index.cjs → index.mjs} +1 -1
  132. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{addEmptyLineAfter.cjs → addEmptyLineAfter.mjs} +1 -1
  133. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{hasEmptyBlock.cjs → hasEmptyBlock.mjs} +2 -2
  134. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{nextNonCommentNode.cjs → nextNonCommentNode.mjs} +1 -1
  135. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{removeEmptyLinesAfter.cjs → removeEmptyLinesAfter.mjs} +1 -1
  136. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/transformSelector.mjs +19 -0
  137. package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/{whitespaceChecker.cjs → whitespaceChecker.mjs} +5 -5
  138. package/stylelint/plugins/stylelint-selector-no-empty.js +2 -0
  139. package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +2 -2
  140. package/stylelint.mjs +6 -0
  141. package/eslint/index.cjs +0 -1071
  142. package/eslint/overrides-gatsby.cjs +0 -108
  143. package/eslint/overrides-javascript-lazy.cjs +0 -27
  144. package/eslint/overrides-javascript.cjs +0 -121
  145. package/eslint/overrides-jest.cjs +0 -144
  146. package/eslint/overrides-jsdoc.cjs +0 -94
  147. package/eslint/overrides-react.cjs +0 -220
  148. package/eslint/overrides-storybook.cjs +0 -44
  149. package/eslint/overrides-type-declarations.cjs +0 -51
  150. package/eslint/rules/no-global-undefined-check.js +0 -85
  151. package/eslint/rules/no-global-undefined-check.md +0 -34
  152. package/eslint/rules/package.json +0 -8
  153. package/eslint.cjs +0 -5
  154. package/stylelint/index.cjs +0 -1104
  155. package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.cjs +0 -95
  156. package/stylelint.cjs +0 -5
package/.linter-bundle.js CHANGED
@@ -1,11 +1,10 @@
1
+ /**
2
+ * @file Configuration used for linting the linter-bundle.
3
+ */
4
+
1
5
  const snippets = {
2
- lowerCase: '[a-z]*([a-z0-9])',
3
- upperCase: '[A-Z]*([A-Z0-9])',
4
- snakeCase: '[a-z]*(*([a-z0-9]_)+([a-z0-9]))',
5
- screamingSnakeCase: '[A-Z]*(*([A-Z0-9]_)+([A-Z0-9]))',
6
6
  kebabCase: '[a-z]*(*([a-z0-9]-)+([a-z0-9]))',
7
- camelCase: '[a-z]*([a-zA-Z0-9])',
8
- pascalCase: '[A-Z]*([a-zA-Z0-9])'
7
+ camelCase: '[a-z]*([a-zA-Z0-9])'
9
8
  };
10
9
 
11
10
  export default {
@@ -19,18 +18,18 @@ export default {
19
18
  '.git/**',
20
19
  '.github/FUNDING.yml',
21
20
  '.vscode/settings.json',
22
- `eslint/rules/package.json`,
23
- `eslint/rules/${snippets.kebabCase}.{js,md}`,
24
- `eslint/{index.cjs,overrides-${snippets.kebabCase}.cjs}`,
21
+ `eslint/rules/${snippets.kebabCase}.{js,mjs,md}`,
22
+ `eslint/rules/helper/${snippets.kebabCase}.{js,mjs,md}`,
23
+ `eslint/${snippets.kebabCase}.mjs`,
25
24
  'files/index.js',
26
- `helper/${snippets.kebabCase}.{js,cjs,d.ts}`,
25
+ `helper/${snippets.kebabCase}.{js,mjs,cjs,d.ts}`,
27
26
  'markdownlint/base.json',
28
27
  'node_modules/**',
29
- 'stylelint/index.cjs',
28
+ 'stylelint/index.mjs',
30
29
  `stylelint/plugins/stylelint-${snippets.kebabCase}.js`,
31
- `stylelint/plugins/stylelint-15.11.0-stylistic/**/{${snippets.camelCase}.cjs,README.md,LICENSE}`,
30
+ `stylelint/plugins/stylelint-15.11.0-stylistic/**/{${snippets.camelCase}.mjs,README.md,LICENSE}`,
32
31
  '.editorconfig',
33
- '.eslintrc.cjs',
32
+ 'eslint.config.mjs',
34
33
  '.gitattributes',
35
34
  '.gitignore',
36
35
  '.linter-bundle.js',
@@ -38,13 +37,13 @@ export default {
38
37
  '.markdownlint.json',
39
38
  '.npmignore',
40
39
  '*.md',
41
- 'eslint.cjs',
40
+ 'eslint.mjs',
42
41
  'LICENSE',
43
42
  'lint.js',
44
43
  'package-lock.json',
45
44
  'package.json',
46
- 'stylelint.cjs',
47
- 'stylelint.config.cjs',
45
+ 'stylelint.mjs',
46
+ 'stylelint.config.js',
48
47
  'test-stylelint.js',
49
48
  'tsconfig.json',
50
49
  'vscode-eslint-1.png',
@@ -52,5 +51,16 @@ export default {
52
51
  ]
53
52
  }
54
53
  ]
54
+ },
55
+ ts: {
56
+ overrides: {
57
+ general: {
58
+ 'import/order': {
59
+ additionalExternalPatterns: [
60
+ '@stylistic/**'
61
+ ]
62
+ }
63
+ }
64
+ }
55
65
  }
56
- }
66
+ };
@@ -14,6 +14,15 @@
14
14
  "files": {
15
15
  "type": "object",
16
16
  "properties": {
17
+ "git": {
18
+ "type": "boolean"
19
+ },
20
+ "include": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string"
24
+ }
25
+ },
17
26
  "restrictions": {
18
27
  "type": "array",
19
28
  "items": {
@@ -59,6 +68,12 @@
59
68
  "ts": {
60
69
  "type": "object",
61
70
  "properties": {
71
+ "timing": {
72
+ "type": "boolean"
73
+ },
74
+ "git": {
75
+ "type": "boolean"
76
+ },
62
77
  "tsconfig": {
63
78
  "type": "string"
64
79
  },
@@ -92,12 +107,42 @@
92
107
  "sass": {
93
108
  "type": "object",
94
109
  "properties": {
110
+ "verbose": {
111
+ "type": "boolean"
112
+ },
113
+ "timing": {
114
+ "type": "boolean"
115
+ },
116
+ "git": {
117
+ "type": "boolean"
118
+ },
119
+ "include": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ }
124
+ },
95
125
  "patternPrefix": {
96
126
  "type": "string"
97
127
  }
98
128
  },
99
129
  "additionalProperties": false
100
130
  },
131
+ "md": {
132
+ "type": "object",
133
+ "properties": {
134
+ "git": {
135
+ "type": "boolean"
136
+ },
137
+ "include": {
138
+ "type": "array",
139
+ "items": {
140
+ "type": "string"
141
+ }
142
+ }
143
+ },
144
+ "additionalProperties": false
145
+ },
101
146
  "audit": {
102
147
  "type": "object",
103
148
  "properties": {
package/CHANGELOG.md CHANGED
@@ -6,7 +6,149 @@ 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/v6.3.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.1.0...HEAD)
10
+
11
+ ## [7.1.0] - 2025-03-15
12
+
13
+ ### Fixed
14
+
15
+ - [eslint/jest] Fix code for Jest Version detection
16
+
17
+ ### Changed
18
+
19
+ - [general] Suppress Node.js warnings, such as 'ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time' (which is triggered by ESLint)
20
+ - [eslint] Added custom linter rule [`linter-bundle/enforce-logical-expression-parens`](./eslint/rules/enforce-logical-expression-parens.md) which enforces parentheses around logical operations
21
+ - [eslint] Added custom linter rule [`linter-bundle/enforce-ternary-parens`](./eslint/rules/enforce-ternary-parens.md) which ensures ternary expressions are wrapped in parentheses
22
+ - [eslint] Added custom linter rule [`linter-bundle/no-extra-spaces-in-generics`](./eslint/rules/no-extra-spaces-in-generics.md) to disallows spaces after the `<` and before the `>` in TypeScript generics
23
+ - [eslint] Added custom linter rule [`linter-bundle/no-ternary-return`](./eslint/rules/no-ternary-return.md) which disallows ternary expressions as return values for better readability
24
+ - [eslint] Configure [`padding-line-between-statements`](https://eslint.org/docs/latest/rules/padding-line-between-statements) to enforce line-breaks before `return`, `throw`, `break`, `continue`, around multi-line block statements and around `const`, `let`, `var` groups
25
+ - [eslint/react] Added custom linter rule [`linter-bundle/ensure-lucide-import-consistency`](./eslint/rules/ensure-lucide-import-consistency.md) to enforces using [Lucide](https://lucide.dev/guide/packages/lucide-react) prefix for lucide-react imports and their usage
26
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.8.4` to `3.9.0`
27
+ - [stylelint] Updated `stylelint` from `16.15.0` to `16.16.0`
28
+
29
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v7.0.0...v7.1.0)
30
+
31
+ ## [7.0.0] - 2025-03-11
32
+
33
+ ### Breaking Changes
34
+
35
+ - [general] All configuration files have been migrated from CommonJS to ESModules
36
+ - [general] The global configuration variable `global.linterBundleSettings` has been replaced by a `.linter-bundle.json` / `.linter-bundle.mjs` / `.linter-bundle.cjs` / `.linter-bundle.js` configuration file in the projects root directory
37
+ - [eslint] It's now using the ESLint Flat Config format
38
+ - [eslint] `.eslintrc.js` needs to be renamed to `eslint.config.mjs`, `module.exports =` needs to be replaced by `export default [`. See [eslint.org](https://eslint.org/docs/latest/use/configure/migration-guide#key-differences-between-configuration-formats) website additional required changes
39
+ - [eslint] The VSCode configuration needs to be adapted. See [README.md](./README.md)
40
+ - [eslint] The prefixes "override-" has been removed from the specialized rule files and the suffix `.cjs` has been replaced by `.mjs`
41
+ - [stylelint] The stylelint configuration has been renamed from `linter-bundle/stylelint.cjs` to `linter-bundle/stylelint.mjs`
42
+ - [stylelint] As the interface for rules changed slightly, I had to remove some auto-fixes for the previously forked stylistic rules.
43
+ - [general] Drop support for Node.js version less than v20.9.0 and v21.1.0 as a lot of ESLint plugins are not supporting them
44
+
45
+ ### Fixed
46
+
47
+ - [eslint] Fixed "Error reading .linter-bundle.js" in VSCode in some conditions
48
+
49
+ Beside these changes:
50
+
51
+ ### Changed
52
+
53
+ - [general] `"extends"` in the .eslintrc.js needs to be suffixed with the ".mjs" file extension (e.g. `require.resolve('linter-bundle/eslint.mjs')`)
54
+ - [general] `"extends"` in the stylelint.config.js needs to be suffixed with the ".mjs" file extension (e.g. `require.resolve('linter-bundle/stylelint.mjs')`)
55
+ - [eslint] Updated `@typescript-eslint` from `6.21.0` to `8.26.1`
56
+ - [eslint] Updated `eslint` from `8.56.0` to `9.22.0`
57
+ - [eslint] Updated `eslint-import-resolver-typescript` from `3.6.1` to `3.8.4`
58
+ - [eslint] Updated `eslint-import-resolver-webpack` from `0.13.8` to `0.13.10`
59
+ - [eslint] Updated `eslint-plugin-functional` from `6.0.0` to `9.0.1`
60
+ - [eslint] Updated `eslint-plugin-jest` from `27.6.3` to `28.11.0`
61
+ - [eslint] Updated `eslint-plugin-jsdoc` from `48.0.5` to `50.6.6`
62
+ - [eslint] Updated `eslint-plugin-jsx-a11y` from `6.8.0` to `6.10.2`
63
+ - [eslint] Updated `eslint-plugin-n` from `16.6.2` to `17.16.2`
64
+ - [eslint] Updated `eslint-plugin-promise` from `6.1.1` to `7.2.1`
65
+ - [eslint] Updated `eslint-plugin-react` from `7.33.2` to `7.37.4`
66
+ - [eslint] Updated `eslint-plugin-react-hooks` from `4.6.0` to `5.2.0`
67
+ - [eslint] Updated `eslint-plugin-unicorn` from `51.0.0` to `57.0.0`
68
+ - [eslint] Updated `@stylistic/eslint-plugin` from `2.11.0` to `4.2.0`
69
+ - [markdownlint] Updated `markdownlint-cli` from `0.39.0` to `0.44.0`
70
+ - [stylelint] Updated `stylelint` from `16.2.1` to `16.15.0`
71
+ - [stylelint] Updated `stylelint-scss` from `6.1.0` to `6.11.1`
72
+ - [stylelint] Updated `stylelint-high-performance-animation` from `1.10.0` to `1.11.0`
73
+ - [audit] Updated `better-npm-audit` from `3.7.3` to `3.11.0`
74
+ - [eslint] Activate `checkTypePredicates` of [`@typescript-eslint/no-unnecessary-condition`](https://typescript-eslint.io/rules/no-unnecessary-condition/) rule
75
+ - [eslint] Adjusted `@typescript-eslint/naming-convention` rule configuration to allow constant names starting with "_" if they are unused
76
+ - [eslint] Renamed the rule `no-unnecessary-typeof` to `linter-bundle/no-unnecessary-typeof`
77
+ - [eslint] Renamed the rule `restricted-filenames` to `linter-bundle/restricted-filenames`
78
+ - [eslint] Increase `max` of `import/max-dependencies` rule from 20 to 25
79
+ - [eslint] Disabled `unicorn/string-content` as it sometimes breaks code (e.g. imports with `...` in Next.js or GraphQL template strings)
80
+
81
+ ### Added
82
+
83
+ - [eslint] Added "_" and "c" to allowed id names in [`id-length`] rule
84
+ - [eslint] Added [`@typescript-eslint/no-unnecessary-template-expression`](https://typescript-eslint.io/rules/no-unnecessary-template-expression/) rule (replaces `@typescript-eslint/no-useless-template-literals`)
85
+ - [eslint] Added but disabled new [`functional/no-class-inheritance`](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/docs/rules/no-class-inheritance.md) rule
86
+ - [eslint] Added new [`@typescript-eslint/consistent-return`](https://typescript-eslint.io/rules/consistent-return/) rule
87
+ - [eslint] Added new [`@typescript-eslint/no-unnecessary-parameter-property-assignment`](https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment/) rule
88
+ - [eslint] Added new [`@typescript-eslint/no-unnecessary-type-parameters`](https://typescript-eslint.io/rules/no-unnecessary-type-parameters/) rule
89
+ - [eslint] Added new [`@typescript-eslint/no-unsafe-type-assertion`](https://typescript-eslint.io/rules/no-unsafe-type-assertion/) rule
90
+ - [eslint] Added new [`@typescript-eslint/no-useless-assignment`](https://eslint.org/docs/latest/rules/no-useless-assignment) rule
91
+ - [eslint] Added new [`@typescript-eslint/only-throw-error`](https://typescript-eslint.io/rules/only-throw-error/) rule
92
+ - [eslint] Added new [`@typescript-eslint/use-unknown-in-catch-callback-variable`](https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable/) rule
93
+ - [eslint] Added new [`no-empty-object-type`](https://typescript-eslint.io/rules/no-empty-object-type/) rule
94
+ - [eslint] Added new [`promise/spec-only`](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md) rule
95
+ - [eslint] Added new [`unicorn/consistent-empty-array-spread`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md) rule
96
+ - [eslint] Added new [`unicorn/consistent-existence-index-check`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md) rule
97
+ - [eslint] Added new [`unicorn/no-invalid-fetch-options`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md) rule
98
+ - [eslint] Added new [`unicorn/no-length-as-slice-end`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-length-as-slice-end.md) rule
99
+ - [eslint] Added new [`unicorn/no-magic-array-flat-depth`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md) rule
100
+ - [eslint] Added new [`unicorn/no-negation-in-equality-check`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md) rule
101
+ - [eslint] Added new [`unicorn/prefer-global-this`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md) rule
102
+ - [eslint] Added new [`unicorn/prefer-math-min-max`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md) rule
103
+ - [eslint] Added new [`unicorn/prefer-string-raw`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md) rule
104
+ - [eslint] Added new [`unicorn/prefer-structured-clone`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md) rule
105
+ - [eslint] Added new [`unicorn/consistent-date-clone`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md) rule
106
+ - [eslint] Added new [`unicorn/consistent-assert`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md) rule
107
+ - [eslint] Added new [`unicorn/no-accessor-recursion`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md) rule
108
+ - [eslint] Added new [`unicorn/no-instanceof-builtins`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md) rule
109
+ - [eslint] Added new [`unicorn/no-named-default`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md) rule
110
+ - [eslint] Replaced deprecated `unicorn/no-instanceof-array` by new [`unicorn/no-instanceof-builtins`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md) rule
111
+ - [eslint] Activate `linterOptions.reportUnusedInlineConfigs` setting
112
+ - [eslint/jsdoc] Added [`jsdoc/require-template`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md) rule
113
+ - [eslint/jsdoc] Added but disabled new [jsdoc/convert-to-jsdoc-comments`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md) rule
114
+ - [eslint/jsdoc] Added new [`jsdoc/check-template-names`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md) rule
115
+ - [eslint/jsdoc] Added new [`jsdoc/lines-before-block`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md) rule with disabled `ignoreSameLine`
116
+ - [eslint/react] Added new [`react/forward-ref-uses-ref`](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.36.0/docs/rules/forward-ref-uses-ref.md) rule
117
+ - [eslint/react] Activate `ignoreTranspilerName` for [`react/display-name`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md)
118
+ - [eslint/react] Activate `unicorn/prefer-node-protocol` rule
119
+ - [eslint/react] Added new [`react/checked-requires-onchange-or-readonly`](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.0/docs/rules/checked-requires-onchange-or-readonly.md) rule
120
+ - [eslint/react] Added new [`react/jsx-props-no-spread-multi`](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.35.0/docs/rules/jsx-props-no-spread-multi.md) rule
121
+ - [eslint/jest] Added but disabled new[`jest/prefer-importing-jest-globals`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-importing-jest-globals.md) rule
122
+ - [eslint/jest] Added new [`jest/prefer-jest-mocked`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-jest-mocked.md) rule
123
+ - [eslint/promise] Added new [`promise/prefer-catch`](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-catch.md) rule
124
+ - [markdownlint] Added new [`MD058/blanks-around-tables`](https://github.com/DavidAnson/markdownlint/blob/main/doc/md058.md) rule
125
+ - [stylelint] Added and disabled new [`scss/at-import-partial-extension-allowed-list`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension-allowed-list/README.md) rule, and removed deprecated `at-import-partial-extension-whitelist` rule
126
+ - [stylelint] Added and disabled new [`scss/at-import-partial-extension-disallowed-list`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension-disallowed-list/README.md) rule, and removed deprecated `at-import-partial-extension-blacklist rule` rule
127
+ - [stylelint] Added new [`no-unknown-custom-media`](https://stylelint.io/user-guide/rules/no-unknown-custom-media/) rule
128
+ - [stylelint] Added new [`scss/at-mixin-no-risky-nesting-selector`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-mixin-no-risky-nesting-selector/README.md) rule
129
+ - [stylelint] Added new [`scss/declaration-property-value-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/declaration-property-value-no-unknown/README.md) rule, which disabled `declaration-property-value-no-unknown`
130
+ - [stylelint] Added new [`scss/function-color-channel`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/function-color-channel/README.md) rule
131
+ - [stylelint] Added new [`scss/load-partial-extension`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/load-partial-extension/README.md) rule, and removed deprecated `at-import-partial-extension` rule
132
+ - [stylelint] Added new [`scss/no-duplicate-load-rules`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-duplicate-load-rules) rule
133
+ - [stylelint] Added new [`at-rule-descriptor-no-unknown`](https://stylelint.io/user-guide/rules/at-rule-descriptor-no-unknown/) rule
134
+ - [stylelint] Added new [`at-rule-descriptor-value-no-unknown`](https://stylelint.io/user-guide/rules/at-rule-descriptor-value-no-unknown/) rule
135
+ - [stylelint] Added new [`at-rule-no-deprecated`](https://stylelint.io/user-guide/rules/at-rule-no-deprecated/) rule
136
+ - [stylelint] Added new [`at-rule-prelude-no-invalid`](https://stylelint.io/user-guide/rules/at-rule-prelude-no-invalid/) rule
137
+ - [stylelint] Added new [`declaration-property-value-keyword-no-deprecated`](https://stylelint.io/user-guide/rules/declaration-property-value-keyword-no-deprecated/) rule
138
+ - [stylelint] Added new [`syntax-string-no-invalid`](https://stylelint.io/user-guide/rules/syntax-string-no-invalid/) rule
139
+ - [stylelint] Show rule performance information
140
+ - [stylelint] Activated [`reportUnscopedDisables`] setting
141
+
142
+ ### Removed
143
+
144
+ - [eslint] Removed deprecated `@typescript-eslint/ban-types` rule
145
+ - [eslint] Removed deprecated `@typescript-eslint/no-throw-literal` rule
146
+ - [eslint] Removed deprecated `no-new-symbol` rule
147
+ - [eslint] Removed deprecated `prefer-ts-expect-error` rule
148
+ - [eslint] Replaced deprecated `@typescript-eslint/no-loss-of-precision` rule by ESLint `no-loss-of-precision`
149
+ - [eslint/gatsby] Removed `no-global-undefined-check` rule
150
+
151
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v6.3.0...v7.0.0)
10
152
 
11
153
  ## [6.3.0] - 2024-02-06
12
154
 
@@ -23,6 +165,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
23
165
  - [eslint] Make use of [`@typescript-eslint/prefer-promise-reject-errors`](https://typescript-eslint.io/rules/prefer-promise-reject-errors/) rule
24
166
  - [markdownlint] Make use of new [`MD054`/link-image-style](https://github.com/DavidAnson/markdownlint/blob/main/doc/md054.md) rule
25
167
  - [markdownlint] Make use of new [`MD056`/table-column-count](https://github.com/DavidAnson/markdownlint/blob/main/doc/md056.md) rule
168
+ - [audit] Updated `improved-yarn-audit` from `3.0.0` to `3.0.3`
26
169
 
27
170
  ### Added
28
171
 
@@ -716,7 +859,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
716
859
  ### Added
717
860
 
718
861
  - [eslint] Make use of [`@typescript-eslint/no-restricted-imports`](https://typescript-eslint.io/rules/no-restricted-imports/) rule
719
- - [eslint] Make use of [`@typescript-eslint/space-infix-ops`](https://typescript-eslint.io/rules/space-infix-ops/) rule
862
+ - [eslint] Make use of [`@stylistic/space-infix-ops`](https://typescript-eslint.io/rules/space-infix-ops/) rule
720
863
  - [eslint] Make use of [`@typescript-eslint/consistent-generic-constructors`](https://typescript-eslint.io/rules/consistent-generic-constructors/) rule
721
864
  - [eslint/overrides-jest] Make use of [`jest/prefer-hooks-in-order`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-in-order.md) rule
722
865
  - [eslint/overrides-jest] Make use of [`jest/max-expects`](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-expects.md) rule
@@ -1497,7 +1640,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1497
1640
  - [eslint] Updated `eslint-plugin-jest` from v24.3.2 to v24.3.5
1498
1641
  - [eslint] Updated `eslint-plugin-react` from v7.22.0 to v7.23.2
1499
1642
  - [eslint] Make use of new [`react/no-unstable-nested-components`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md) rule
1500
- - [sass] Updated `stylelint-selector-no-empty` from v1.0.7 to v1.0.8
1643
+ - [stylelint] Updated `stylelint-selector-no-empty` from v1.0.7 to v1.0.8
1501
1644
  - [audit] Updated `better-npm-audit` from v1.0.7 to v1.0.8
1502
1645
 
1503
1646
  [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v1.9.0...v1.10.0)
package/README.md CHANGED
@@ -22,6 +22,9 @@ This setup is using the following additional plugins:
22
22
 
23
23
  ### ESLint
24
24
 
25
+ The `linter-bundle` is using the Flat Configuration Format which was introduced in ESLint v8.
26
+
27
+ - [@stylistic/eslint-plugin](https://eslint.style/)
25
28
  - [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin)
26
29
  - [eslint-plugin-eslint-comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments)
27
30
  - [eslint-plugin-functional](https://www.npmjs.com/package/eslint-plugin-functional)
@@ -37,9 +40,13 @@ This setup is using the following additional plugins:
37
40
 
38
41
  Beside that, the following additional rules are part of this bundle:
39
42
 
40
- - [no-global-undefined-check](./eslint/rules/no-global-undefined-check.md)
41
- - [no-unnecessary-typeof](./eslint/rules/no-unnecessary-typeof.md)
42
- - [restricted-filenames](./eslint/rules/restricted-filenames.md)
43
+ - [`linter-bundle/enforce-logical-expression-parens`](./eslint/rules/enforce-logical-expression-parens.md)
44
+ - [`linter-bundle/enforce-ternary-parens`](./eslint/rules/enforce-ternary-parens.md)
45
+ - [`linter-bundle/ensure-lucide-import-consistency`](./eslint/rules/ensure-lucide-import-consistency.md)
46
+ - [`linter-bundle/no-extra-spaces-in-generics`](./eslint/rules/no-extra-spaces-in-generics.md)
47
+ - [`linter-bundle/no-ternary-return`](./eslint/rules/no-ternary-return.md)
48
+ - [`linter-bundle/no-unnecessary-typeof`](./eslint/rules/no-unnecessary-typeof.md)
49
+ - [`linter-bundle/restricted-filenames`](./eslint/rules/restricted-filenames.md)
43
50
 
44
51
  ### stylelint
45
52
 
@@ -64,7 +71,7 @@ If these plugins are maintained again, the plugins will also be used again.
64
71
 
65
72
  ## Install
66
73
 
67
- Ensure you are using atleast Node.js version 18.2.0.
74
+ Ensure you are using atleast Node.js version 20.9.0/21.1.0.
68
75
 
69
76
  ```sh
70
77
  npm install linter-bundle --save-dev
@@ -83,45 +90,43 @@ npm install linter-bundle --save-dev
83
90
  }
84
91
  ```
85
92
 
86
- #### .eslintrc.js
93
+ #### eslint.config.mjs
87
94
 
88
95
  ```js
89
- module.exports = {
90
- extends: [
91
- require.resolve('linter-bundle/eslint.cjs'),
92
- // require.resolve('linter-bundle/eslint/overrides-gatsby.cjs'),
93
- // require.resolve('linter-bundle/eslint/overrides-javascript.cjs'),
94
- require.resolve('linter-bundle/eslint/overrides-javascript-lazy.cjs'),
95
- // require.resolve('linter-bundle/eslint/overrides-jest.cjs'),
96
- require.resolve('linter-bundle/eslint/overrides-jsdoc.cjs'),
97
- // require.resolve('linter-bundle/eslint/overrides-react.cjs'),
98
- // require.resolve('linter-bundle/eslint/overrides-storybook.cjs'),
99
- // require.resolve('linter-bundle/eslint/overrides-type-declarations.cjs'),
100
- // require.resolve('linter-bundle/eslint/overrides-worker.cjs')
101
- ]
102
- };
96
+ export default [
97
+ ...(await import('linter-bundle/eslint.mjs')).default,
98
+ // ...(await import('linter-bundle/eslint/gatsby.mjs')).default,
99
+ // ...(await import('linter-bundle/eslint/javascript.mjs')).default,
100
+ ...(await import('linter-bundle/eslint/javascript-lazy.mjs')).default,
101
+ // ...(await import('linter-bundle/eslint/jest.mjs')).default,
102
+ ...(await import('linter-bundle/eslint/jsdoc.mjs')).default,
103
+ // ...(await import('linter-bundle/eslint/react.mjs')).default,
104
+ // ...(await import('linter-bundle/eslint/storybook.mjs')).default,
105
+ // ...(await import('linter-bundle/eslint/type-declarations.mjs')).default,
106
+ // ...(await import('linter-bundle/eslint/worker.mjs')).default
107
+ ]
103
108
  ```
104
109
 
105
110
  ##### Available `extends`
106
111
 
107
112
  Source | Description | Rules setup
108
113
  -|-|-
109
- `linter-bundle/eslint.cjs` | General rule setup. This is also the base for the following **overrides**. | [View](./eslint/index.cjs)
110
- `linter-bundle/eslint/overrides-gatsby.cjs` | Settings for Gatsby-based projects. | [View](./eslint/overrides-gatsby.js)
111
- `linter-bundle/eslint/overrides-javascript.cjs` | Strict settings for JavaScript files, which enforces correct types everywhere. | [View](./eslint/overrides-javascript.cjs)
112
- `linter-bundle/eslint/overrides-javascript-lazy.cjs` | Can be used instead of `overrides-javascript`. It's less strict and allows the `any` type. | [View](./eslint/overrides-javascript-lazy.cjs)
113
- `linter-bundle/eslint/overrides-jest.cjs` | Settings for projects using Jest. | [View](./eslint/overrides-jest.cjs)
114
- `linter-bundle/eslint/overrides-jsdoc.cjs` | Settings for projects using JSDoc comments. | [View](./eslint/overrides-jsdoc.cjs)
115
- `linter-bundle/eslint/overrides-react.cjs` | Settings for projects using React comments. | [View](./eslint/overrides-react.cjs)
116
- `linter-bundle/eslint/overrides-storybook.cjs` | Settings for projects using Storybook comments. | [View](./eslint/overrides-storybook.cjs)
117
- `linter-bundle/eslint/overrides-type-declarations.cjs` | Settings for type declaration files (.d.ts). | [View](./eslint/overrides-type-declarations.cjs)
118
- `linter-bundle/eslint/overrides-worker.cjs` | Settings for projects using Web Workers. | [View](./eslint/overrides-worker.cjs)
114
+ `linter-bundle/eslint.mjs` | General rule setup. This is also the base for the following specialized rule sets. | [View](./eslint/index.mjs)
115
+ `linter-bundle/eslint/gatsby.mjs` | Settings for Gatsby-based projects. | [View](./eslint/gatsby.mjs)
116
+ `linter-bundle/eslint/javascript.mjs` | Strict settings for JavaScript files, which enforces correct types everywhere. | [View](./eslint/javascript.mjs)
117
+ `linter-bundle/eslint/javascript-lazy.mjs` | Can be used instead of `javascript`. It's less strict and allows the `any` type. | [View](./eslint/javascript-lazy.mjs)
118
+ `linter-bundle/eslint/jest.mjs` | Settings for projects using Jest. | [View](./eslint/jest.mjs)
119
+ `linter-bundle/eslint/jsdoc.mjs` | Settings for projects using JSDoc comments. | [View](./eslint/jsdoc.mjs)
120
+ `linter-bundle/eslint/react.mjs` | Settings for projects using React comments. | [View](./eslint/react.mjs)
121
+ `linter-bundle/eslint/storybook.mjs` | Settings for projects using Storybook comments. | [View](./eslint/storybook.mjs)
122
+ `linter-bundle/eslint/type-declarations.mjs` | Settings for type declaration files (.d.ts). | [View](./eslint/type-declarations.mjs)
123
+ `linter-bundle/eslint/worker.mjs` | Settings for projects using Web Workers. | [View](./eslint/worker.mjs)
119
124
 
120
125
  #### stylelint.config.js
121
126
 
122
127
  ```js
123
- module.exports = {
124
- extends: 'linter-bundle/stylelint.cjs'
128
+ export default {
129
+ extends: 'linter-bundle/stylelint.mjs'
125
130
  };
126
131
 
127
132
  ```
@@ -140,7 +145,7 @@ module.exports = {
140
145
  .eslintcache
141
146
  ```
142
147
 
143
- ### .linter-bundle.json / .linter-bundle.cjs / .linter-bundle.js
148
+ ### .linter-bundle.json / .linter-bundle.mjs / .linter-bundle.js
144
149
 
145
150
  `linter-bundle` supports a couple of additional options, which can be configured in the configuration file, in the root of your project.
146
151
  Some of the options are also available as command line arguments (see below).
@@ -210,7 +215,7 @@ The file itself, and any of the options is optional.
210
215
  },
211
216
  "sass": {
212
217
  "include": ["./included/*.ts"],
213
- "patternPrefix": "--my-prefix"
218
+ "patternPrefix": "(my-prefix|another-prefix)"
214
219
  },
215
220
  "md": {
216
221
  "include": ["./included/*.md"],
@@ -242,7 +247,7 @@ The file itself, and any of the options is optional.
242
247
  <details><summary>Click here to see the example configuration with descriptions</summary>
243
248
 
244
249
  ```js
245
- module.exports = {
250
+ export default {
246
251
  /**
247
252
  * Same as `--verbose` command line argument.
248
253
  *
@@ -268,13 +273,6 @@ module.exports = {
268
273
  * Configuration, specific to the `tsc` command.
269
274
  */
270
275
  tsc: {
271
- /**
272
- * `verbose`, `timing` and `git` are the same as in the root node.
273
- */
274
- verbose: true,
275
- timing: true,
276
- git: true,
277
-
278
276
  /**
279
277
  * Same as `--tsconfig` command line argument.
280
278
  *
@@ -288,9 +286,8 @@ module.exports = {
288
286
  */
289
287
  ts: {
290
288
  /**
291
- * `verbose`, `timing` and `git` are the same as in the root node.
289
+ * `timing` and `git` are the same as in the root node.
292
290
  */
293
- verbose: true,
294
291
  timing: true,
295
292
  git: true,
296
293
 
@@ -320,7 +317,7 @@ module.exports = {
320
317
  */
321
318
  overrides: {
322
319
  /**
323
- * Rules that are applied to `linter-bundle/eslint.cjs`.
320
+ * Rules that are applied to `linter-bundle/eslint.mjs`.
324
321
  */
325
322
  general: {
326
323
  'no-restricted-globals': {
@@ -374,7 +371,7 @@ module.exports = {
374
371
  },
375
372
 
376
373
  /**
377
- * Rules that are applied to `linter-bundle/eslint/overrides-react.cjs`.
374
+ * Rules that are applied to `linter-bundle/eslint/react.mjs`.
378
375
  */
379
376
  react: {
380
377
  'react/forbid-component-props': {
@@ -426,6 +423,11 @@ module.exports = {
426
423
  * Configuration, specific to the `audit` command.
427
424
  */
428
425
  md: {
426
+ /**
427
+ * `git` is the same as in the root node.
428
+ */
429
+ git: true,
430
+
429
431
  /**
430
432
  * Same as `--include` command line argument.
431
433
  *
@@ -438,13 +440,6 @@ module.exports = {
438
440
  * Configuration, specific to the `audit` command.
439
441
  */
440
442
  audit: {
441
- /**
442
- * `verbose`, `timing` and `git` are the same as in the root node.
443
- */
444
- verbose: true,
445
- timing: true,
446
- git: true,
447
-
448
443
  /**
449
444
  * Same as `--min-severity` command line argument.
450
445
  *
@@ -465,12 +460,17 @@ module.exports = {
465
460
  */
466
461
  files: {
467
462
  /**
468
- * `verbose`, `timing` and `git` are the same as in the root node.
463
+ * `git` is the same as in the root node.
469
464
  */
470
- verbose: true,
471
- timing: true,
472
465
  git: true,
473
466
 
467
+ /**
468
+ * Same as `--include` command line argument.
469
+ *
470
+ * @type {string[]}
471
+ */
472
+ include: ['./included/*.ts'],
473
+
474
474
  /**
475
475
  * Array of restrictions for different base paths.
476
476
  *
@@ -633,10 +633,7 @@ This can be done by adding these options to your `.vscode/settings.json`:
633
633
  {
634
634
  "eslint.nodePath": "./node_modules/linter-bundle/node_modules/eslint",
635
635
  "eslint.options": {
636
- "overrideConfigFile": "./.eslintrc.js", // or "./.eslintrc.cjs" or "./eslintrc.json"
637
- "resolvePluginsRelativeTo": "./node_modules/linter-bundle",
638
- "rulePaths": ["./node_modules/linter-bundle/eslint/rules"],
639
- "reportUnusedDisableDirectives": "error",
636
+ "overrideConfigFile": "./eslint.config.mjs"
640
637
  }
641
638
  }
642
639
  ```
@@ -719,7 +716,3 @@ If you get such an error message:
719
716
  the problem is most likely, that your `tsconfig.json` does not cover your JavaScript files and that you don't have a `jsconfig.json` file in your root directory. This is required by the `@typescript-eslint` to use TypeScript for linting of JavaScript files.
720
717
 
721
718
  To solve this problem, either `"include"` your JavaScript files in your `tsconfig.json` (don't forget to set the compiler option `"checkJs"` to `true`) or create a `jsconfig.json` file in your root directory (this can be a copy of your `tsconfig.json` with an `"include"` of your JavaScript files).
722
-
723
- ### In VSCode, in every file, the first line shows the error `Definition for rule "no-unnecessary-typeof" was not found. eslint(no-unnecessary-typeof)`
724
-
725
- Please ensure that you've added the configuration options as described above ("VSCode setup" > "ESLint").
package/TODO.md CHANGED
@@ -1,58 +0,0 @@
1
- # @todo
2
-
3
- - Aktuell sind die Versionen von den Audit-Tools hardcodiert in der lint.js hinterlegt:
4
- 'better-npm-audit@3.7.3',
5
- 'improved-yarn-audit@3.0.0',
6
- Das sollte irgendwo hinterlegt werden, so z.B. check-outdated drauf zugreifen kann. (z.B. die optionalDependencies? Sind diese nach dem regulären Installieren noch vorhanden und lassen sich entsprechend auslesen? Werden diese von check-outdated geprüft?)
7
-
8
- - Timing funktioniert nicht - siehe HexEd.it-core
9
-
10
- - Wie erreichen wir auto-completion in der .linter-bundle.js datei?
11
- .linter-bundle.json vielleicht mit Schema-Datei?
12
-
13
- <!-- markdownlint-disable -->
14
-
15
- - Bereiche in Readme aufklappbar machen:
16
- <details>
17
- summary>yarn</summary>
18
-
19
- ```shell
20
- yarn add click-to-react-component
21
- ```
22
- </details>
23
-
24
- - Make git diff-branch configurable
25
- on GitHub Actions this could be used:
26
- - run: git diff --name-only -z origin/${GITHUB_BASE_REF}
27
- Is there a variable with includes origin/ already?
28
-
29
- Some tools like Gatsby ship deprecated dependencies of eslint and @typescript-eslint.
30
- Since npm installs packages alphabetically, the outdated `gatsby` dependencies are installed in the `node_modules` root, instead of the newer `linter-bundle` dependencies. Since the old versions often do not support new rules or new options, this may cause linting to fail with errors like this:
31
-
32
- ```bash
33
- Error while loading rule 'import/no-unused-modules': .eslintrc.js » ./node_modules/linter-bundle/eslint/index.js:
34
- Configuration for rule "@typescript-eslint/no-throw-literal" is invalid:
35
- Value [{"allowThrowingAny":false,"allowThrowingUnknown":true}] should NOT have more than 0 items.
36
- ```
37
-
38
- To solve such problems, npm supports [`overrides`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) as of version [8.3](https://github.com/npm/cli/releases/tag/v8.3.0), while yarn supports [`resolutions`](https://classic.yarnpkg.com/en/docs/selective-version-resolutions/).
39
-
40
- By using the `enforce-deps` option, linter-bundle will ensure the right versions of the dependencies are installed, and if not it automatically write these options to your package.json and then run an `npm i` or `yarn`, before starting the linting to ensure that the correct dependency versions are installed.
41
-
42
- ```json
43
- "overrides": {
44
- "@typescript-eslint/eslint-plugin": "$linter-bundle",
45
- "@typescript-eslint/parser": "$linter-bundle",
46
- "eslint": "$linter-bundle"
47
- }
48
- ```
49
-
50
- - Option to lint only changed files in Git
51
- - [lint-staged](https://github.com/okonet/lint-staged)
52
- - [affected](https://www.npmjs.com/package/affected)
53
- - [git-affected-files](https://www.npmjs.com/package/git-affected-files)
54
- - [affected-files](https://www.npmjs.com/package/affected-files)
55
- - [is-affected](https://www.npmjs.com/package/is-affected)
56
-
57
- - Find stylelint rule which checks for wrong values like:
58
- `padding-top: 3px 3px 0;`