eslint-config-webpack 4.14.0 → 5.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 (35) hide show
  1. package/README.md +94 -4
  2. package/configs/browser.js +70 -7
  3. package/configs/index.js +7 -6
  4. package/configs/javascript.js +746 -151
  5. package/configs/json.js +72 -0
  6. package/configs/markdown.js +111 -6
  7. package/configs/node.js +78 -23
  8. package/configs/performance.js +8 -0
  9. package/configs/react.js +7 -19
  10. package/configs/stylistic.js +31 -4
  11. package/configs/{jest.js → test.js} +65 -5
  12. package/configs/typescript.js +77 -55
  13. package/configs/utils/code-files.js +20 -0
  14. package/configs/utils/get-es-version-from-node.js +9 -4
  15. package/configs/utils/get-json-file.js +1 -5
  16. package/configs/utils/is-jest-installed.js +20 -0
  17. package/configs/utils/is-typescript-installed.js +3 -3
  18. package/configs.js +47 -31
  19. package/package.json +34 -27
  20. package/plugins/package-json/index.js +0 -5
  21. package/plugins/package-json/rules/order-properties.js +8 -18
  22. package/plugins/performance/index.js +60 -0
  23. package/plugins/performance/rules/no-case-insensitive-unicode-range.js +214 -0
  24. package/plugins/performance/rules/require-precompiled-schema.js +414 -0
  25. package/plugins/webpack/index.js +0 -1
  26. package/plugins/webpack/rules/comment-length.js +1 -3
  27. package/plugins/webpack/rules/format-schema.js +18 -16
  28. package/plugins/webpack/rules/inherit-jsdoc.js +2 -3
  29. package/plugins/webpack/rules/no-duplicate-import-tag.js +3 -4
  30. package/plugins/webpack/rules/no-unused-import-tag.js +8 -11
  31. package/plugins/webpack/rules/prefer-import-tag.js +1 -2
  32. package/plugins/webpack/rules/require-license-comment.js +3 -5
  33. package/plugins/webpack/rules/valid-schema.js +9 -13
  34. package/plugins/webpack/utils/import-tags.js +4 -3
  35. package/configs/package-json.js +0 -8
@@ -1,5 +1,5 @@
1
- /** @typedef {import("eslint").SourceCode} SourceCode */
2
- /** @typedef {import("estree").Comment} Comment */
1
+ /** @import { SourceCode } from "eslint" */
2
+ /** @import { Comment } from "estree" */
3
3
 
4
4
  /**
5
5
  * @typedef {object} ImportBinding
@@ -39,7 +39,8 @@ export const stripLineMarkers = (text) =>
39
39
  */
40
40
  export const localNameOf = (binding) => {
41
41
  const parts = binding.split(/[ \t\n]+as[ \t\n]+/);
42
- return parts[parts.length - 1].trim();
42
+ // `split()` always returns at least one part
43
+ return /** @type {string} */ (parts.at(-1)).trim();
43
44
  };
44
45
 
45
46
  /**
@@ -1,8 +0,0 @@
1
- import { configs } from "../plugins/package-json/index.js";
2
-
3
- /** @type {import("eslint").Linter.Config} */
4
- const recommendedBrowserConfig = configs.recommended;
5
-
6
- export default {
7
- "package-json/recommended": recommendedBrowserConfig,
8
- };