@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,33 +1,56 @@
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 _vue_js_1 = require("../config-helpers/+vue.js");
26
+ const module_js_1 = require("../utils/module.js");
27
+ const fallback_js_1 = require("./fallback.js");
28
+ const base = __importStar(require("./ts/base-config.js"));
29
+ module.exports = (0, module_js_1.requireOf)([
6
30
  "@typescript-eslint/parser",
7
31
  "typescript",
8
32
  "@typescript-eslint/eslint-plugin",
33
+ "eslint-plugin-vue",
9
34
  "vue-eslint-parser",
10
- ],
11
- () => ({
35
+ ], () => ({
12
36
  overrides: [
13
- {
14
- files: ["*.vue"],
15
- extends: [require.resolve("./+vue2"), ...base.extends],
16
- ...base,
17
- parser: require.resolve("vue-eslint-parser"),
18
- parserOptions: {
19
- ...base.parserOptions,
20
- parser: require.resolve("@typescript-eslint/parser"),
21
- extraFileExtensions: [".vue"],
37
+ {
38
+ files: _vue_js_1.vueFiles,
39
+ ...base,
40
+ extends: [require.resolve("./+vue2"), ...base.extends],
41
+ parser: require.resolve("vue-eslint-parser"),
42
+ parserOptions: {
43
+ ...base.parserOptions,
44
+ parser: require.resolve("@typescript-eslint/parser"),
45
+ },
22
46
  },
23
- },
24
47
  ],
25
- }),
26
- {
27
- files: ["*.vue"],
28
- fallback: () => ({
29
- processor: "@ota-meshi/missing-parser",
30
- parser: require.resolve("espree"),
31
- }),
32
- },
33
- );
48
+ }), (missingList) => ({
49
+ overrides: [
50
+ {
51
+ files: _vue_js_1.vueFiles,
52
+ parser: require.resolve("../parsers/any-parser"),
53
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
54
+ },
55
+ ],
56
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,30 +1,29 @@
1
1
  "use strict";
2
-
3
- const { getProject } = require("./ts");
4
- module.exports = require("../utils/module").requireOf(
5
- ["eslint-plugin-vue", "vue-eslint-parser"],
6
- () => ({
2
+ const _vue_js_1 = require("../config-helpers/+vue.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-vue", "vue-eslint-parser"], () => ({
7
6
  extends: ["plugin:vue/recommended"],
8
7
  overrides: [
9
- {
10
- files: ["*.vue"],
11
- parser: require.resolve("vue-eslint-parser"),
12
- parserOptions: {
13
- parser: {
14
- ts: "@typescript-eslint/parser",
15
- },
16
- sourceType: "module",
17
- project: getProject(),
18
- extraFileExtensions: [".vue", ".svelte"],
8
+ {
9
+ files: _vue_js_1.vueFiles,
10
+ parser: require.resolve("vue-eslint-parser"),
11
+ parserOptions: {
12
+ parser: {
13
+ ts: "@typescript-eslint/parser",
14
+ },
15
+ },
16
+ rules: {
17
+ ..._vue_js_1.vueExtendRules,
18
+ },
19
19
  },
20
- },
21
20
  ],
22
- }),
23
- {
24
- files: ["*.vue"],
25
- fallback: () => ({
26
- processor: "@ota-meshi/missing-parser",
27
- parser: require.resolve("espree"),
28
- }),
29
- },
30
- );
21
+ }), (missingList) => ({
22
+ overrides: [
23
+ {
24
+ files: _vue_js_1.vueFiles,
25
+ parser: require.resolve("../parsers/any-parser"),
26
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
27
+ },
28
+ ],
29
+ }));
@@ -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,56 @@
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 _vue_js_1 = require("../config-helpers/+vue.js");
26
+ const module_js_1 = require("../utils/module.js");
27
+ const fallback_js_1 = require("./fallback.js");
28
+ const base = __importStar(require("./ts/base-config.js"));
29
+ module.exports = (0, module_js_1.requireOf)([
6
30
  "@typescript-eslint/parser",
7
31
  "typescript",
8
32
  "@typescript-eslint/eslint-plugin",
33
+ "eslint-plugin-vue",
9
34
  "vue-eslint-parser",
10
- ],
11
- () => ({
35
+ ], () => ({
12
36
  overrides: [
13
- {
14
- files: ["*.vue"],
15
- extends: [require.resolve("./+vue3"), ...base.extends],
16
- ...base,
17
- parser: require.resolve("vue-eslint-parser"),
18
- parserOptions: {
19
- ...base.parserOptions,
20
- parser: require.resolve("@typescript-eslint/parser"),
21
- extraFileExtensions: [".vue"],
37
+ {
38
+ files: _vue_js_1.vueFiles,
39
+ ...base,
40
+ extends: [require.resolve("./+vue3"), ...base.extends],
41
+ parser: require.resolve("vue-eslint-parser"),
42
+ parserOptions: {
43
+ ...base.parserOptions,
44
+ parser: require.resolve("@typescript-eslint/parser"),
45
+ },
22
46
  },
23
- },
24
47
  ],
25
- }),
26
- {
27
- files: ["*.vue"],
28
- fallback: () => ({
29
- processor: "@ota-meshi/missing-parser",
30
- parser: require.resolve("espree"),
31
- }),
32
- },
33
- );
48
+ }), (missingList) => ({
49
+ overrides: [
50
+ {
51
+ files: _vue_js_1.vueFiles,
52
+ parser: require.resolve("../parsers/any-parser"),
53
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
54
+ },
55
+ ],
56
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,30 +1,29 @@
1
1
  "use strict";
2
-
3
- const { getProject } = require("./ts");
4
- module.exports = require("../utils/module").requireOf(
5
- ["eslint-plugin-vue", "vue-eslint-parser"],
6
- () => ({
2
+ const _vue_js_1 = require("../config-helpers/+vue.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-vue", "vue-eslint-parser"], () => ({
7
6
  extends: ["plugin:vue/vue3-recommended"],
8
7
  overrides: [
9
- {
10
- files: ["*.vue"],
11
- parser: require.resolve("vue-eslint-parser"),
12
- parserOptions: {
13
- parser: {
14
- ts: "@typescript-eslint/parser",
15
- },
16
- sourceType: "module",
17
- project: getProject(),
18
- extraFileExtensions: [".vue", ".svelte"],
8
+ {
9
+ files: _vue_js_1.vueFiles,
10
+ parser: require.resolve("vue-eslint-parser"),
11
+ parserOptions: {
12
+ parser: {
13
+ ts: "@typescript-eslint/parser",
14
+ },
15
+ },
16
+ rules: {
17
+ ..._vue_js_1.vueExtendRules,
18
+ },
19
19
  },
20
- },
21
20
  ],
22
- }),
23
- {
24
- files: ["*.vue"],
25
- fallback: () => ({
26
- processor: "@ota-meshi/missing-parser",
27
- parser: require.resolve("espree"),
28
- }),
29
- },
30
- );
21
+ }), (missingList) => ({
22
+ overrides: [
23
+ {
24
+ files: _vue_js_1.vueFiles,
25
+ parser: require.resolve("../parsers/any-parser"),
26
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
27
+ },
28
+ ],
29
+ }));
@@ -0,0 +1,3 @@
1
+ import type { Linter } from "eslint";
2
+ declare const _default: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
3
+ export = _default;
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../utils/module").requireOf(
4
- ["eslint-plugin-yml"],
5
- () => ({
2
+ const _yaml_js_1 = require("../config-helpers/+yaml.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-yml"], () => ({
6
6
  overrides: [
7
- {
8
- files: ["*.yaml", "*.yml"],
9
- extends: [
10
- "plugin:yml/standard",
11
- require.resolve("./json-schema/config"),
12
- ],
13
- rules: {
14
- "yml/require-string-key": "error",
7
+ {
8
+ files: _yaml_js_1.yamlFiles,
9
+ extends: [
10
+ "plugin:yml/standard",
11
+ require.resolve("./json-schema/config"),
12
+ ],
13
+ rules: {
14
+ ..._yaml_js_1.yamlExtendRules,
15
+ },
15
16
  },
16
- },
17
17
  ],
18
- }),
19
- {
20
- files: ["*.yaml", "*.yml"],
21
- fallback: () => ({
22
- processor: "@ota-meshi/missing-parser",
23
- parser: require.resolve("espree"),
24
- }),
25
- },
26
- );
18
+ }), (missingList) => ({
19
+ overrides: [
20
+ {
21
+ files: _yaml_js_1.yamlFiles,
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,12 +1,10 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../../utils/module").requireOf(
4
- ["eslint-plugin-eslint-comments@3.2.0"],
5
- () => ({
6
- extends: ["plugin:eslint-comments/recommended"],
2
+ const module_js_1 = require("../../utils/module.js");
3
+ const eslint_comments_js_1 = require("../../config-helpers/base-plugins/eslint-comments.js");
4
+ const fallback_js_1 = require("../fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["@eslint-community/eslint-plugin-eslint-comments"], () => ({
6
+ extends: ["plugin:@eslint-community/eslint-comments/recommended"],
7
7
  rules: {
8
- "eslint-comments/require-description": "error",
9
- "eslint-comments/no-unused-disable": "error",
8
+ ...eslint_comments_js_1.eslintCommentsExtendRules,
10
9
  },
11
- }),
12
- );
10
+ }), 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;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ const module_js_1 = require("../../utils/module.js");
3
+ const fallback_js_1 = require("../fallback.js");
4
+ const jsdoc_js_1 = require("../../config-helpers/base-plugins/jsdoc.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-jsdoc"], () => ({
6
+ plugins: ["jsdoc"],
7
+ rules: {
8
+ ...jsdoc_js_1.jsdocRules,
9
+ },
10
+ }), 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,15 +1,10 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../../utils/module").requireOf(
4
- ["eslint-plugin-regexp@1.0.0"],
5
- () => ({
2
+ const module_js_1 = require("../../utils/module.js");
3
+ const regexp_js_1 = require("../../config-helpers/base-plugins/regexp.js");
4
+ const fallback_js_1 = require("../fallback.js");
5
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-regexp@1.0.0"], () => ({
6
6
  extends: ["plugin:regexp/recommended"],
7
7
  rules: {
8
- "regexp/letter-case": ["error"],
9
- "regexp/prefer-quantifier": "error",
10
- "regexp/prefer-regexp-exec": "error",
11
- "regexp/prefer-regexp-test": "error",
12
- "regexp/sort-character-class-elements": ["error"],
8
+ ...regexp_js_1.regexpExtendRules,
13
9
  },
14
- }),
15
- );
10
+ }), fallback_js_1.buildFallbackForLegacy);
@@ -0,0 +1,5 @@
1
+ import type { Linter } from "eslint";
2
+ /**
3
+ * Fallback Legacy config builder
4
+ */
5
+ export declare function buildFallbackForLegacy(missingList: string[]): Linter.Config;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildFallbackForLegacy = void 0;
4
+ /**
5
+ * Fallback Legacy config builder
6
+ */
7
+ function buildFallbackForLegacy(missingList) {
8
+ return {
9
+ plugins: ["@ota-meshi"],
10
+ rules: {
11
+ "@ota-meshi/missing-module-for-config": ["error", missingList],
12
+ },
13
+ };
14
+ }
15
+ exports.buildFallbackForLegacy = 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,36 +1,19 @@
1
1
  "use strict";
2
-
3
- module.exports = require("../../utils/module").requireOf(
4
- ["eslint-plugin-json-schema-validator"],
5
- () => ({
2
+ const module_js_1 = require("../../utils/module.js");
3
+ const json_schema_js_1 = require("../../config-helpers/plugins/json-schema.js");
4
+ const _json_js_1 = require("../../config-helpers/+json.js");
5
+ const fallback_js_1 = require("../fallback.js");
6
+ module.exports = (0, module_js_1.requireOf)(["eslint-plugin-json-schema-validator"], () => ({
6
7
  extends: ["plugin:json-schema-validator/recommended"],
7
8
  rules: {
8
- "json-schema-validator/no-invalid": [
9
- "error",
9
+ ...json_schema_js_1.jsonSchemaExtendRules,
10
+ },
11
+ }), (missingList) => ({
12
+ overrides: [
10
13
  {
11
- schemas: [
12
- {
13
- fileMatch: [".eslintrc.js"],
14
- schema: "https://json.schemastore.org/eslintrc",
15
- },
16
- {
17
- fileMatch: [".prettierrc.toml"],
18
- schema: "https://json.schemastore.org/prettierrc",
19
- },
20
- {
21
- fileMatch: [
22
- "stylelint.config.js",
23
- "stylelint.config.cjs",
24
- ".stylelintrc.js",
25
- ".stylelintrc.yaml",
26
- ".stylelintrc.yml",
27
- ],
28
- schema: "https://json.schemastore.org/stylelintrc",
29
- },
30
- ],
31
- useSchemastoreCatalog: true,
14
+ files: _json_js_1.jsonFiles,
15
+ parser: require.resolve("../../parsers/any-parser"),
16
+ ...(0, fallback_js_1.buildFallbackForLegacy)(missingList),
32
17
  },
33
- ],
34
- },
35
- }),
36
- );
18
+ ],
19
+ }));
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ extends: string[];
3
+ parserOptions: {
4
+ sourceType: string;
5
+ ecmaVersion: number;
6
+ };
7
+ rules: {
8
+ [x: string]: import("eslint").Linter.RuleEntry<any[]>;
9
+ };
10
+ overrides: ({
11
+ files: string[];
12
+ extends: string[];
13
+ globals?: undefined;
14
+ rules?: undefined;
15
+ } | {
16
+ files: string[];
17
+ globals: {
18
+ [x: string]: boolean | "off" | "writable" | "readonly";
19
+ };
20
+ rules: {
21
+ [x: string]: import("eslint").Linter.RuleEntry<any[]>;
22
+ };
23
+ extends?: undefined;
24
+ })[];
25
+ };
26
+ export = _default;