@ota-meshi/eslint-plugin 0.15.3 → 0.17.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 (149) hide show
  1. package/lib/config-builder/+astro-with-ts.d.ts +2 -0
  2. package/lib/config-builder/+astro-with-ts.js +38 -0
  3. package/lib/config-builder/+astro.d.ts +2 -0
  4. package/lib/config-builder/+astro.js +30 -0
  5. package/lib/config-builder/+eslint-plugin.d.ts +2 -0
  6. package/lib/config-builder/+eslint-plugin.js +26 -0
  7. package/lib/config-builder/+json.d.ts +2 -0
  8. package/lib/config-builder/+json.js +32 -0
  9. package/lib/config-builder/+md.d.ts +2 -0
  10. package/lib/config-builder/+md.js +44 -0
  11. package/lib/config-builder/+node.d.ts +2 -0
  12. package/lib/config-builder/+node.js +29 -0
  13. package/lib/config-builder/+package-json.d.ts +2 -0
  14. package/lib/config-builder/+package-json.js +29 -0
  15. package/lib/config-builder/+prettier.d.ts +2 -0
  16. package/lib/config-builder/+prettier.js +28 -0
  17. package/lib/config-builder/+svelte-with-ts.d.ts +2 -0
  18. package/lib/config-builder/+svelte-with-ts.js +42 -0
  19. package/lib/config-builder/+svelte.d.ts +2 -0
  20. package/lib/config-builder/+svelte.js +30 -0
  21. package/lib/config-builder/+toml.d.ts +2 -0
  22. package/lib/config-builder/+toml.js +32 -0
  23. package/lib/config-builder/+typescript.d.ts +2 -0
  24. package/lib/config-builder/+typescript.js +17 -0
  25. package/lib/config-builder/+vue2-with-ts.d.ts +2 -0
  26. package/lib/config-builder/+vue2-with-ts.js +38 -0
  27. package/lib/config-builder/+vue2.d.ts +2 -0
  28. package/lib/config-builder/+vue2.js +30 -0
  29. package/lib/config-builder/+vue3-with-ts.d.ts +2 -0
  30. package/lib/config-builder/+vue3-with-ts.js +38 -0
  31. package/lib/config-builder/+vue3.d.ts +2 -0
  32. package/lib/config-builder/+vue3.js +30 -0
  33. package/lib/config-builder/+yaml.d.ts +2 -0
  34. package/lib/config-builder/+yaml.js +32 -0
  35. package/lib/config-builder/base-plugins/eslint-comments.d.ts +2 -0
  36. package/lib/config-builder/base-plugins/eslint-comments.js +20 -0
  37. package/lib/config-builder/base-plugins/jsdoc.d.ts +2 -0
  38. package/lib/config-builder/base-plugins/jsdoc.js +20 -0
  39. package/lib/config-builder/base-plugins/regexp.d.ts +2 -0
  40. package/lib/config-builder/base-plugins/regexp.js +20 -0
  41. package/lib/config-builder/fallback.d.ts +5 -0
  42. package/lib/config-builder/fallback.js +22 -0
  43. package/lib/config-builder/index.d.ts +20 -0
  44. package/lib/config-builder/index.js +50 -0
  45. package/lib/config-builder/plugins/json-schema.d.ts +2 -0
  46. package/lib/config-builder/plugins/json-schema.js +30 -0
  47. package/lib/config-builder/plugins/ts/base-config.d.ts +2 -0
  48. package/lib/config-builder/plugins/ts/base-config.js +48 -0
  49. package/lib/config-builder/plugins/ts/index.d.ts +1 -0
  50. package/lib/config-builder/plugins/ts/index.js +5 -0
  51. package/lib/config-builder/recommended.d.ts +5 -0
  52. package/lib/config-builder/recommended.js +40 -0
  53. package/lib/config-helpers/+astro.d.ts +3 -0
  54. package/lib/config-helpers/+astro.js +5 -0
  55. package/lib/config-helpers/+eslint-plugin.d.ts +3 -0
  56. package/lib/config-helpers/+eslint-plugin.js +102 -0
  57. package/lib/config-helpers/+json.d.ts +3 -0
  58. package/lib/config-helpers/+json.js +10 -0
  59. package/lib/config-helpers/+md.d.ts +5 -0
  60. package/lib/config-helpers/+md.js +44 -0
  61. package/lib/config-helpers/+node.d.ts +11 -0
  62. package/lib/config-helpers/+node.js +25 -0
  63. package/lib/config-helpers/+package-json.d.ts +1 -0
  64. package/lib/config-helpers/+package-json.js +4 -0
  65. package/lib/config-helpers/+prettier.d.ts +3 -0
  66. package/lib/config-helpers/+prettier.js +44 -0
  67. package/lib/config-helpers/+svelte.d.ts +3 -0
  68. package/lib/config-helpers/+svelte.js +16 -0
  69. package/lib/config-helpers/+toml.d.ts +3 -0
  70. package/lib/config-helpers/+toml.js +5 -0
  71. package/lib/config-helpers/+typescript.d.ts +4 -0
  72. package/lib/config-helpers/+typescript.js +18 -0
  73. package/lib/config-helpers/+vue.d.ts +3 -0
  74. package/lib/config-helpers/+vue.js +5 -0
  75. package/lib/config-helpers/+yaml.d.ts +3 -0
  76. package/lib/config-helpers/+yaml.js +7 -0
  77. package/lib/config-helpers/base-plugins/eslint-comments.d.ts +2 -0
  78. package/lib/config-helpers/base-plugins/eslint-comments.js +7 -0
  79. package/lib/config-helpers/base-plugins/jsdoc.d.ts +2 -0
  80. package/lib/config-helpers/base-plugins/jsdoc.js +6 -0
  81. package/lib/config-helpers/base-plugins/regexp.d.ts +2 -0
  82. package/lib/config-helpers/base-plugins/regexp.js +10 -0
  83. package/lib/config-helpers/plugins/json-schema.d.ts +2 -0
  84. package/lib/config-helpers/plugins/json-schema.js +31 -0
  85. package/lib/config-helpers/plugins/ts/base-config.d.ts +2 -0
  86. package/lib/config-helpers/plugins/ts/base-config.js +116 -0
  87. package/lib/config-helpers/plugins/ts/index.d.ts +7 -0
  88. package/lib/config-helpers/plugins/ts/index.js +21 -0
  89. package/lib/config-helpers/recommended.d.ts +5 -0
  90. package/lib/config-helpers/recommended.js +240 -0
  91. package/lib/configs/+eslint-plugin.d.ts +3 -0
  92. package/lib/configs/+eslint-plugin.js +22 -95
  93. package/lib/configs/+json.d.ts +3 -0
  94. package/lib/configs/+json.js +22 -22
  95. package/lib/configs/+md.d.ts +3 -0
  96. package/lib/configs/+md.js +30 -29
  97. package/lib/configs/+node.d.ts +3 -0
  98. package/lib/configs/+node.js +23 -29
  99. package/lib/configs/+package-json.d.ts +3 -0
  100. package/lib/configs/+package-json.js +20 -20
  101. package/lib/configs/+prettier.d.ts +3 -0
  102. package/lib/configs/+prettier.js +23 -70
  103. package/lib/configs/+svelte-with-ts.d.ts +3 -0
  104. package/lib/configs/+svelte-with-ts.js +47 -25
  105. package/lib/configs/+svelte.d.ts +3 -0
  106. package/lib/configs/+svelte.js +23 -32
  107. package/lib/configs/+toml.d.ts +3 -0
  108. package/lib/configs/+toml.js +20 -18
  109. package/lib/configs/+typescript.d.ts +3 -0
  110. package/lib/configs/+typescript.js +53 -32
  111. package/lib/configs/+vue2-with-ts.d.ts +3 -0
  112. package/lib/configs/+vue2-with-ts.js +48 -25
  113. package/lib/configs/+vue2.d.ts +3 -0
  114. package/lib/configs/+vue2.js +24 -25
  115. package/lib/configs/+vue3-with-ts.d.ts +3 -0
  116. package/lib/configs/+vue3-with-ts.js +48 -25
  117. package/lib/configs/+vue3.d.ts +3 -0
  118. package/lib/configs/+vue3.js +24 -25
  119. package/lib/configs/+yaml.d.ts +3 -0
  120. package/lib/configs/+yaml.js +22 -22
  121. package/lib/configs/base-plugins/eslint-comments.d.ts +3 -0
  122. package/lib/configs/base-plugins/eslint-comments.js +7 -9
  123. package/lib/configs/base-plugins/jsdoc.d.ts +3 -0
  124. package/lib/configs/base-plugins/jsdoc.js +10 -0
  125. package/lib/configs/base-plugins/regexp.d.ts +3 -0
  126. package/lib/configs/base-plugins/regexp.js +6 -11
  127. package/lib/configs/fallback.d.ts +5 -0
  128. package/lib/configs/fallback.js +15 -0
  129. package/lib/configs/json-schema/config.d.ts +3 -0
  130. package/lib/configs/json-schema/config.js +14 -31
  131. package/lib/configs/recommended.d.ts +26 -0
  132. package/lib/configs/recommended.js +26 -255
  133. package/lib/configs/ts/base-config.d.ts +10 -0
  134. package/lib/configs/ts/base-config.js +10 -118
  135. package/lib/configs/ts/index.d.ts +2 -0
  136. package/lib/configs/ts/index.js +4 -16
  137. package/lib/index.d.ts +48 -0
  138. package/lib/index.js +15 -23
  139. package/lib/parsers/any-parser.d.ts +5 -0
  140. package/lib/parsers/any-parser.js +29 -0
  141. package/lib/rules/missing-module-for-config.d.ts +16 -0
  142. package/lib/rules/missing-module-for-config.js +35 -53
  143. package/lib/utils/find-root-dir.d.ts +1 -0
  144. package/lib/utils/find-root-dir.js +21 -18
  145. package/lib/utils/get-linters.d.ts +1 -0
  146. package/lib/utils/get-linters.js +27 -27
  147. package/lib/utils/module.d.ts +19 -0
  148. package/lib/utils/module.js +81 -59
  149. package/package.json +23 -14
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../utils/module").requireOf(
4
- ["eslint-plugin-jsonc"],
5
- () => ({
2
+ const module_js_1 = require("../utils/module.js");
3
+ const _json_js_1 = require("../config-helpers/+json.js");
4
+ const fallback_js_1 = require("./fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-jsonc"], () => ({
6
6
  overrides: [
7
- {
8
- files: ["*.json", "*.json5"],
9
- extends: [
10
- "plugin:jsonc/recommended-with-jsonc",
11
- require.resolve("./json-schema/config"),
12
- ],
13
- rules: {
14
- "jsonc/auto": "error",
7
+ {
8
+ files: _json_js_1.jsonFiles,
9
+ extends: [
10
+ "plugin:jsonc/recommended-with-jsonc",
11
+ require.resolve("./json-schema/config"),
12
+ ],
13
+ rules: {
14
+ ..._json_js_1.jsonExtendRules,
15
+ },
15
16
  },
16
- },
17
17
  ],
18
- }),
19
- {
20
- files: ["*.json", "*.json5"],
21
- fallback: () => ({
22
- processor: "@ota-meshi/missing-parser",
23
- parser: require.resolve("espree"),
24
- }),
25
- },
26
- );
18
+ }), (missingList) => ({
19
+ overrides: [
20
+ {
21
+ files: _json_js_1.jsonFiles,
22
+ parser: require.resolve("../parsers/any-parser"),
23
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
24
+ },
25
+ ],
26
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,33 +1,34 @@
1
1
  "use strict";
2
-
3
- const semver = require("semver");
4
-
5
- module.exports = require("../utils/module").requireOf(
6
- ["eslint-plugin-markdown"],
7
- () => {
8
- const version = require("eslint-plugin-markdown/package.json").version;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const module_js_1 = require("../utils/module.js");
6
+ const semver_1 = __importDefault(require("semver"));
7
+ const _md_js_1 = require("../config-helpers/+md.js");
8
+ const fallback_js_1 = require("./fallback.js");
9
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-markdown"], () => {
10
+ const version = (0, module_js_1.requireFromCwd)("eslint-plugin-markdown/package.json").version;
9
11
  return {
10
- extends: [
11
- semver.satisfies(version, ">=4.0.0")
12
- ? "plugin:markdown/recommended-legacy"
13
- : "plugin:markdown/recommended",
14
- ],
15
- rules: {},
16
- overrides: [
12
+ extends: [
13
+ semver_1.default.satisfies(version, ">=4.0.0")
14
+ ? "plugin:markdown/recommended-legacy"
15
+ : "plugin:markdown/recommended",
16
+ ],
17
+ overrides: [
18
+ {
19
+ files: _md_js_1.jsInMdFiles,
20
+ rules: {
21
+ ..._md_js_1.jsInMdRules,
22
+ },
23
+ },
24
+ ],
25
+ };
26
+ }, (missingList) => ({
27
+ overrides: [
17
28
  {
18
- files: ["**/*.md/*.js"],
19
- rules: {
20
- strict: "off",
21
- },
29
+ files: _md_js_1.mdFiles,
30
+ parser: require.resolve("../parsers/any-parser"),
31
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
22
32
  },
23
- ],
24
- };
25
- },
26
- {
27
- files: ["*.md"],
28
- fallback: () => ({
29
- processor: "@ota-meshi/missing-parser",
30
- parser: require.resolve("espree"),
31
- }),
32
- },
33
- );
33
+ ],
34
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,33 +1,27 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../utils/module").requireOf(
4
- ["eslint-plugin-n"],
5
- () => ({
2
+ const _node_js_1 = require("../config-helpers/+node.js");
3
+ const module_js_1 = require("../utils/module.js");
4
+ const fallback_js_1 = require("./fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-n@17.2.0"], () => ({
6
+ extends: ["plugin:n/recommended"],
6
7
  overrides: [
7
- {
8
- files: ["*.js", "*.mjs", "*.cjs"],
9
- extends: ["plugin:n/recommended"],
10
- parserOptions: {
11
- ecmaFeatures: { globalReturn: true },
12
- ecmaVersion: 2020,
13
- sourceType: "script",
8
+ {
9
+ files: _node_js_1.nodeFiles,
10
+ rules: {
11
+ ..._node_js_1.nodeExtendRules,
12
+ },
14
13
  },
15
- rules: {
16
- "n/exports-style": ["error", "module.exports"],
17
- "n/file-extension-in-import": [
18
- "error",
19
- "always",
20
- { ".js": "always", ".ts": "never", ".tsx": "never" },
21
- ],
22
- "n/prefer-global/buffer": "error",
23
- "n/prefer-global/console": "error",
24
- "n/prefer-global/process": "error",
25
- },
26
- globals: {
27
- URL: "readonly",
28
- },
29
- },
30
14
  ],
31
- }),
32
- { files: ["*.js", "*.mjs", "*.cjs"] },
33
- );
15
+ settings: {
16
+ ..._node_js_1.nodeSettings,
17
+ },
18
+ }), (missingList) => {
19
+ return {
20
+ overrides: [
21
+ {
22
+ files: _node_js_1.nodeFiles,
23
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
24
+ },
25
+ ],
26
+ };
27
+ });
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../utils/module").requireOf(
4
- ["eslint-plugin-node-dependencies"],
5
- () => ({
2
+ const module_js_1 = require("../utils/module.js");
3
+ const _package_json_js_1 = require("../config-helpers/+package-json.js");
4
+ const fallback_js_1 = require("./fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-node-dependencies"], () => ({
6
6
  overrides: [
7
- {
8
- files: ["package.json"],
9
- extends: [
10
- "plugin:node-dependencies/recommended",
11
- require.resolve("./+json"),
12
- ],
13
- },
7
+ {
8
+ files: _package_json_js_1.packageJsonFiles,
9
+ extends: [
10
+ "plugin:node-dependencies/recommended",
11
+ require.resolve("./+json"),
12
+ ],
13
+ },
14
14
  ],
15
- }),
16
- {
17
- files: ["package.json"],
18
- fallback: () => ({
19
- processor: "@ota-meshi/missing-parser",
20
- parser: require.resolve("espree"),
21
- }),
22
- },
23
- );
15
+ }), (missingList) => ({
16
+ overrides: [
17
+ {
18
+ files: _package_json_js_1.packageJsonFiles,
19
+ parser: require.resolve("../parsers/any-parser"),
20
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
21
+ },
22
+ ],
23
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,81 +1,34 @@
1
1
  "use strict";
2
-
3
- /** @param {string} config */
2
+ const _prettier_js_1 = require("../config-helpers/+prettier.js");
3
+ const module_js_1 = require("../utils/module.js");
4
+ const fallback_js_1 = require("./fallback.js");
4
5
  function getConfigArrayIfHasConfig(config) {
5
- try {
6
- const configPath = require.resolve(`eslint-config-${config}`);
7
- require(configPath);
8
- } catch (_e) {
9
- return [];
10
- }
11
- return [config];
6
+ try {
7
+ const configPath = (0, module_js_1.resolveFromCwd)(`eslint-config-${config}`);
8
+ (0, module_js_1.requireFromCwd)(configPath);
9
+ }
10
+ catch (_e) {
11
+ return [];
12
+ }
13
+ return [config];
12
14
  }
13
-
14
- module.exports = require("../utils/module").requireOf(
15
- ["eslint-plugin-prettier", "eslint-config-prettier", "prettier"],
16
- () => ({
15
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-prettier", "eslint-config-prettier", "prettier"], () => ({
17
16
  plugins: ["prettier"],
18
17
  extends: [
19
- "prettier",
20
- ...getConfigArrayIfHasConfig("prettier/@typescript-eslint"),
21
- ...getConfigArrayIfHasConfig("prettier/react"),
22
- ...getConfigArrayIfHasConfig("prettier/vue"),
18
+ "prettier",
19
+ ...getConfigArrayIfHasConfig("prettier/@typescript-eslint"),
20
+ ...getConfigArrayIfHasConfig("prettier/react"),
21
+ ...getConfigArrayIfHasConfig("prettier/vue"),
23
22
  ],
24
23
  rules: {
25
- "prettier/prettier": "error",
26
-
27
- "jsonc/array-bracket-newline": "off",
28
- "jsonc/array-bracket-spacing": "off",
29
- "jsonc/array-element-newline": "off",
30
- "jsonc/comma-dangle": "off",
31
- "jsonc/comma-style": "off",
32
- "jsonc/indent": "off",
33
- "jsonc/key-spacing": "off",
34
- "jsonc/no-floating-decimal": "off",
35
- "jsonc/object-curly-newline": "off",
36
- "jsonc/object-curly-spacing": "off",
37
- "jsonc/object-property-newline": "off",
38
- "jsonc/quote-props": "off",
39
- "jsonc/quotes": "off",
40
- "jsonc/space-unary-ops": "off",
41
-
42
- "yml/block-mapping-colon-indicator-newline": "off",
43
- "yml/block-mapping-question-indicator-newline": "off",
44
- "yml/block-sequence-hyphen-indicator-newline": "off",
45
- "yml/flow-mapping-curly-newline": "off",
46
- "yml/flow-mapping-curly-spacing": "off",
47
- "yml/flow-sequence-bracket-newline": "off",
48
- "yml/flow-sequence-bracket-spacing": "off",
49
- "yml/indent": "off",
50
- "yml/key-spacing": "off",
51
- "yml/no-multiple-empty-lines": "off",
52
- "yml/quotes": "off",
53
-
54
- "svelte/first-attribute-linebreak": "off",
55
- "svelte/html-closing-bracket-spacing": "off",
56
- "svelte/html-quotes": "off",
57
- "svelte/html-self-closing": "off",
58
- "svelte/indent": "off",
59
- "svelte/max-attributes-per-line": "off",
60
- "svelte/mustache-spacing": "off",
61
- "svelte/no-spaces-around-equal-signs-in-attribute": "off",
62
- "svelte/no-trailing-spaces": "off",
63
- "svelte/shorthand-attribute": "off",
64
- "svelte/shorthand-directive": "off",
24
+ ..._prettier_js_1.prettierExtendRules,
65
25
  },
66
26
  overrides: [
67
- {
68
- files: ["**/*.md/*.*"],
69
- rules: {
70
- "prettier/prettier": "off",
27
+ {
28
+ files: _prettier_js_1.prettierOffFiles,
29
+ rules: {
30
+ "prettier/prettier": "off",
31
+ },
71
32
  },
72
- },
73
- {
74
- files: ["**/*.toml"],
75
- rules: {
76
- "prettier/prettier": "off",
77
- },
78
- },
79
33
  ],
80
- }),
81
- );
34
+ }), fallback_js_1.buildFallbackForLegacy);
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,33 +1,55 @@
1
1
  "use strict";
2
-
3
- const base = require("./ts/base-config");
4
- module.exports = require("../utils/module").requireOf(
5
- [
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ const module_js_1 = require("../utils/module.js");
26
+ const base = __importStar(require("./ts/base-config.js"));
27
+ const _svelte_js_1 = require("../config-helpers/+svelte.js");
28
+ const fallback_js_1 = require("./fallback.js");
29
+ module.exports = (0, module_js_1.requireOf)([
6
30
  "@typescript-eslint/parser",
7
31
  "typescript",
8
32
  "@typescript-eslint/eslint-plugin",
9
33
  "svelte-eslint-parser",
10
- ],
11
- () => ({
34
+ ], () => ({
12
35
  overrides: [
13
- {
14
- files: ["*.svelte"],
15
- extends: [require.resolve("./+svelte"), ...base.extends],
16
- ...base,
17
- parser: require.resolve("svelte-eslint-parser"),
18
- parserOptions: {
19
- ...base.parserOptions,
20
- parser: require.resolve("@typescript-eslint/parser"),
21
- extraFileExtensions: [".svelte"],
36
+ {
37
+ files: _svelte_js_1.svelteFiles,
38
+ ...base,
39
+ extends: [require.resolve("./+svelte"), ...base.extends],
40
+ parser: require.resolve("svelte-eslint-parser"),
41
+ parserOptions: {
42
+ ...base.parserOptions,
43
+ parser: require.resolve("@typescript-eslint/parser"),
44
+ },
22
45
  },
23
- },
24
46
  ],
25
- }),
26
- {
27
- files: ["*.svelte"],
28
- fallback: () => ({
29
- processor: "@ota-meshi/missing-parser",
30
- parser: require.resolve("espree"),
31
- }),
32
- },
33
- );
47
+ }), (missingList) => ({
48
+ overrides: [
49
+ {
50
+ files: _svelte_js_1.svelteFiles,
51
+ parser: require.resolve("../parsers/any-parser"),
52
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
53
+ },
54
+ ],
55
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,37 +1,28 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../utils/module").requireOf(
4
- ["eslint-plugin-svelte@2.9.0"],
5
- () => ({
2
+ const _svelte_js_1 = require("../config-helpers/+svelte.js");
3
+ const module_js_1 = require("../utils/module.js");
4
+ const fallback_js_1 = require("./fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-svelte@2.9.0"], () => ({
6
6
  overrides: [
7
- {
8
- files: ["*.svelte"],
9
- extends: ["plugin:svelte/recommended"],
10
- parserOptions: {
11
- parser: {
12
- ts: require.resolve("@typescript-eslint/parser"),
13
- },
7
+ {
8
+ files: _svelte_js_1.svelteFiles,
9
+ extends: ["plugin:svelte/recommended"],
10
+ parserOptions: {
11
+ parser: {
12
+ ts: "@typescript-eslint/parser",
13
+ },
14
+ },
15
+ rules: {
16
+ ..._svelte_js_1.svelteExtendRules,
17
+ },
14
18
  },
15
- rules: {
16
- "svelte/no-store-async": "error",
17
- "svelte/no-reactive-functions": "error",
18
- "svelte/no-reactive-literals": "error",
19
- "svelte/no-useless-mustaches": "error",
20
- "svelte/require-optimized-style-attribute": "error",
21
- "svelte/require-stores-init": "error",
22
- "svelte/derived-has-same-inputs-outputs": "error",
23
- "svelte/prefer-class-directive": "warn",
24
- "svelte/prefer-style-directive": "warn",
25
- "svelte/spaced-html-comment": "warn",
19
+ ],
20
+ }), (missingList) => ({
21
+ overrides: [
22
+ {
23
+ files: _svelte_js_1.svelteFiles,
24
+ parser: require.resolve("../parsers/any-parser"),
25
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
26
26
  },
27
- },
28
27
  ],
29
- }),
30
- {
31
- files: ["*.svelte"],
32
- fallback: () => ({
33
- processor: "@ota-meshi/missing-parser",
34
- parser: require.resolve("espree"),
35
- }),
36
- },
37
- );
28
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,22 +1,24 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../utils/module").requireOf(
4
- [],
5
- () => ({
2
+ const _toml_js_1 = require("../config-helpers/+toml.js");
3
+ const module_js_1 = require("../utils/module.js");
4
+ const fallback_js_1 = require("./fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-toml"], () => ({
6
6
  extends: ["plugin:toml/standard"],
7
- rules: {},
8
7
  overrides: [
9
- {
10
- files: ["*.toml"],
11
- extends: [require.resolve("./json-schema/config")],
12
- },
8
+ {
9
+ files: _toml_js_1.tomlFiles,
10
+ extends: [require.resolve("./json-schema/config")],
11
+ rules: {
12
+ ..._toml_js_1.tomlExtendRules,
13
+ },
14
+ },
13
15
  ],
14
- }),
15
- {
16
- files: ["*.toml"],
17
- fallback: () => ({
18
- processor: "@ota-meshi/missing-parser",
19
- parser: require.resolve("espree"),
20
- }),
21
- },
22
- );
16
+ }), (missingList) => ({
17
+ overrides: [
18
+ {
19
+ files: _toml_js_1.tomlFiles,
20
+ parser: require.resolve("../parsers/any-parser"),
21
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
22
+ },
23
+ ],
24
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,39 +1,60 @@
1
1
  "use strict";
2
-
3
- const base = require("./ts/base-config");
4
- module.exports = require("../utils/module").requireOf(
5
- [
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ const _typescript_js_1 = require("../config-helpers/+typescript.js");
26
+ const module_js_1 = require("../utils/module.js");
27
+ const base = __importStar(require("./ts/base-config.js"));
28
+ const fallback_js_1 = require("./fallback.js");
29
+ const _md_js_1 = require("../config-helpers/+md.js");
30
+ module.exports = (0, module_js_1.requireOf)([
6
31
  "@typescript-eslint/parser",
7
32
  "typescript",
8
33
  "@typescript-eslint/eslint-plugin",
9
- ],
10
- () => ({
34
+ ], () => ({
11
35
  overrides: [
12
- {
13
- files: ["*.ts", "*.mts", "*.cts"],
14
- parser: require.resolve("@typescript-eslint/parser"),
15
- ...base,
16
- },
17
- {
18
- files: [
19
- "test/**/*.ts",
20
- "tests/**/*.ts",
21
- "test/**/*.mts",
22
- "tests/**/*.mts",
23
- "test/**/*.cts",
24
- "tests/**/*.cts",
25
- ],
26
- rules: {
27
- "@typescript-eslint/no-explicit-any": "off",
36
+ {
37
+ files: _typescript_js_1.tsFiles,
38
+ parser: require.resolve("@typescript-eslint/parser"),
39
+ ...base,
40
+ },
41
+ {
42
+ files: _typescript_js_1.tsTestFiles,
43
+ rules: {
44
+ ..._typescript_js_1.tsTestExtendRules,
45
+ },
46
+ },
47
+ {
48
+ files: _md_js_1.extInMdFiles,
49
+ extends: ["plugin:@typescript-eslint/disable-type-checked"],
50
+ },
51
+ ],
52
+ }), (missingList) => ({
53
+ overrides: [
54
+ {
55
+ files: _typescript_js_1.tsFiles,
56
+ parser: require.resolve("../parsers/any-parser"),
57
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
28
58
  },
29
- },
30
59
  ],
31
- }),
32
- {
33
- files: ["*.ts", "*.mts", "*.cts"],
34
- fallback: () => ({
35
- processor: "@ota-meshi/missing-parser",
36
- parser: require.resolve("espree"),
37
- }),
38
- },
39
- );
60
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;