@useinsider/eslint-config 3.0.2 → 4.0.0-beta.2

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 (60) hide show
  1. package/README.md +376 -64
  2. package/dist/builders/configFiles.d.ts +13 -0
  3. package/dist/builders/oxlint.d.ts +51 -0
  4. package/dist/builders/oxlintOwnership.d.ts +43 -0
  5. package/dist/builders/scopeBlocks.d.ts +6 -0
  6. package/dist/cli.cjs +1028 -86
  7. package/dist/cli.cjs.map +1 -1
  8. package/dist/configs/dependencies.d.ts +3 -0
  9. package/dist/{javascript-VBXqjVi8.cjs → javascript-DH8-N38w.cjs} +5 -5
  10. package/dist/{javascript-VBXqjVi8.cjs.map → javascript-DH8-N38w.cjs.map} +1 -1
  11. package/dist/{javascript-dom-5jRL_yKP.cjs → javascript-dom-CvtQ6_9W.cjs} +4 -4
  12. package/dist/{javascript-dom-5jRL_yKP.cjs.map → javascript-dom-CvtQ6_9W.cjs.map} +1 -1
  13. package/dist/{javascript-node-C1AU_4X2.cjs → javascript-node-BNsy3loY.cjs} +4 -4
  14. package/dist/{javascript-node-C1AU_4X2.cjs.map → javascript-node-BNsy3loY.cjs.map} +1 -1
  15. package/dist/{jest-CHzjzBtf.cjs → jest-4Es9Ggaa.cjs} +3 -3
  16. package/dist/{jest-CHzjzBtf.cjs.map → jest-4Es9Ggaa.cjs.map} +1 -1
  17. package/dist/main.cjs +763 -78
  18. package/dist/main.cjs.map +1 -1
  19. package/dist/main.d.ts +9 -2
  20. package/dist/main.js +746 -61
  21. package/dist/main.js.map +1 -1
  22. package/dist/oxlintOwnership-7hpdB3d1.cjs +199 -0
  23. package/dist/oxlintOwnership-7hpdB3d1.cjs.map +1 -0
  24. package/dist/oxlintOwnership-Cx0hgA_J.js +127 -0
  25. package/dist/oxlintOwnership-Cx0hgA_J.js.map +1 -0
  26. package/dist/removePluginsFromConfigs-D0oSUj2C.cjs.map +1 -1
  27. package/dist/removePluginsFromConfigs-DzqX2Ju2.js.map +1 -1
  28. package/dist/{stylistic-Dio0AM2E.cjs → stylistic-CoP3MT1Y.cjs} +4 -4
  29. package/dist/{stylistic-Dio0AM2E.cjs.map → stylistic-CoP3MT1Y.cjs.map} +1 -1
  30. package/dist/{typescript-C1icmOxY.cjs → typescript-D3VeLnpn.cjs} +7 -7
  31. package/dist/{typescript-C1icmOxY.cjs.map → typescript-D3VeLnpn.cjs.map} +1 -1
  32. package/dist/{typescript-dom-RUJn2WCZ.cjs → typescript-dom-iB_xBTAD.cjs} +4 -4
  33. package/dist/{typescript-dom-RUJn2WCZ.cjs.map → typescript-dom-iB_xBTAD.cjs.map} +1 -1
  34. package/dist/{typescript-node-CBEzcc56.cjs → typescript-node-Cq6qhj53.cjs} +4 -4
  35. package/dist/{typescript-node-CBEzcc56.cjs.map → typescript-node-Cq6qhj53.cjs.map} +1 -1
  36. package/dist/utils/ensureConfigStructure.d.ts +15 -6
  37. package/dist/utils/ensureOxlintConfig.d.ts +10 -0
  38. package/dist/utils/layoutDiagnosis.d.ts +63 -0
  39. package/dist/utils/offerMigration.d.ts +42 -0
  40. package/dist/utils/silenceRules.d.ts +9 -0
  41. package/dist/{vitest-BomI8gtu.cjs → vitest-BlGQswK2.cjs} +3 -3
  42. package/dist/{vitest-BomI8gtu.cjs.map → vitest-BlGQswK2.cjs.map} +1 -1
  43. package/dist/{vue2-azKwRgaJ.cjs → vue2-Da1i_oVn.cjs} +8 -8
  44. package/dist/{vue2-azKwRgaJ.cjs.map → vue2-Da1i_oVn.cjs.map} +1 -1
  45. package/dist/{vue2-options-api-ma3J-bvM.cjs → vue2-options-api-BSdrUm8H.cjs} +8 -8
  46. package/dist/{vue2-options-api-ma3J-bvM.cjs.map → vue2-options-api-BSdrUm8H.cjs.map} +1 -1
  47. package/dist/{vue2-typescript-CZSHzp7I.cjs → vue2-typescript-dXLRSGNP.cjs} +10 -10
  48. package/dist/{vue2-typescript-CZSHzp7I.cjs.map → vue2-typescript-dXLRSGNP.cjs.map} +1 -1
  49. package/dist/{vue2-typescript-options-api-B8OzZlje.cjs → vue2-typescript-options-api-LM7U5dWq.cjs} +10 -10
  50. package/dist/{vue2-typescript-options-api-B8OzZlje.cjs.map → vue2-typescript-options-api-LM7U5dWq.cjs.map} +1 -1
  51. package/dist/{vue3-Df5UQ1Ys.cjs → vue3-621EM2Ii.cjs} +8 -8
  52. package/dist/{vue3-Df5UQ1Ys.cjs.map → vue3-621EM2Ii.cjs.map} +1 -1
  53. package/dist/{vue3-options-api-Bx7yYHza.cjs → vue3-options-api-CC9_fAiq.cjs} +8 -8
  54. package/dist/{vue3-options-api-Bx7yYHza.cjs.map → vue3-options-api-CC9_fAiq.cjs.map} +1 -1
  55. package/dist/{vue3-typescript-C0O1JZlk.cjs → vue3-typescript-DONe-IKz.cjs} +10 -10
  56. package/dist/{vue3-typescript-C0O1JZlk.cjs.map → vue3-typescript-DONe-IKz.cjs.map} +1 -1
  57. package/dist/{vue3-typescript-options-api-cPal4O-K.cjs → vue3-typescript-options-api-D4pqpDFs.cjs} +10 -10
  58. package/dist/{vue3-typescript-options-api-cPal4O-K.cjs.map → vue3-typescript-options-api-D4pqpDFs.cjs.map} +1 -1
  59. package/package.json +8 -5
  60. package/dist/rolldown-runtime-VH7oDXx4.cjs +0 -28
@@ -0,0 +1,199 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ let eslint_plugin_oxlint = require("eslint-plugin-oxlint");
24
+ eslint_plugin_oxlint = __toESM(eslint_plugin_oxlint, 1);
25
+ let eslint_plugin_oxlint_rules_by_category = require("eslint-plugin-oxlint/rules-by-category");
26
+ eslint_plugin_oxlint_rules_by_category = __toESM(eslint_plugin_oxlint_rules_by_category, 1);
27
+ let eslint_plugin_oxlint_rules_by_scope = require("eslint-plugin-oxlint/rules-by-scope");
28
+ eslint_plugin_oxlint_rules_by_scope = __toESM(eslint_plugin_oxlint_rules_by_scope, 1);
29
+ //#region src/builders/oxlintOwnership.ts
30
+ var ESLINT_IMPORT_PREFIX = "import-x/";
31
+ var OXLINT_IMPORT_PREFIX = "import/";
32
+ var ESLINT_TYPESCRIPT_PREFIX = "@typescript-eslint/";
33
+ var OXLINT_TYPESCRIPT_PREFIX = "typescript/";
34
+ var VUE_LIKE_GLOBS = [
35
+ "**/*.vue",
36
+ "**/*.svelte",
37
+ "**/*.astro"
38
+ ];
39
+ var OXLINT_CATEGORIES = [
40
+ "correctness",
41
+ "suspicious",
42
+ "pedantic",
43
+ "perf",
44
+ "style",
45
+ "restriction",
46
+ "nursery"
47
+ ];
48
+ var SETTINGS_DEPENDENT_RULES = ["jsdoc/check-tag-names"];
49
+ var DEFAULT_DIVERGENT_RULES = ["no-inner-declarations"];
50
+ var VUE_UNSAFE_FALLBACK = [
51
+ "no-unused-vars",
52
+ "@typescript-eslint/no-unused-vars",
53
+ "@typescript-eslint/consistent-type-imports",
54
+ "react-hooks/rules-of-hooks"
55
+ ];
56
+ var eslintPrefixToOxlintPlugin = {
57
+ "import-x": "import",
58
+ import: "import",
59
+ "@typescript-eslint": "typescript",
60
+ n: "node",
61
+ "@next/next": "nextjs",
62
+ "react-hooks": "react",
63
+ "react-perf": "react-perf",
64
+ "jsx-a11y": "jsx-a11y"
65
+ };
66
+ function collectRuleNames(namespace) {
67
+ return Object.values(namespace).flatMap((value) => {
68
+ if (typeof value !== "object" || value === null) return [];
69
+ const entries = Object.entries(value);
70
+ return entries.length > 0 && entries.every(([, severity]) => severity === "off") ? entries.map(([rule]) => rule) : [];
71
+ });
72
+ }
73
+ function pickNamespace(namespace, matches) {
74
+ return Object.fromEntries(Object.entries(namespace).filter(([key]) => matches(key)));
75
+ }
76
+ var categoryNamespace = eslint_plugin_oxlint_rules_by_category;
77
+ var scopeNamespace = eslint_plugin_oxlint_rules_by_scope;
78
+ var implementedRules = new Set(collectRuleNames(scopeNamespace));
79
+ var excludedRules = /* @__PURE__ */ new Set([
80
+ ...collectRuleNames(pickNamespace(categoryNamespace, (key) => key.endsWith("TypeAwareRules"))),
81
+ ...collectRuleNames(pickNamespace(scopeNamespace, (key) => key.endsWith("TypeAwareRules"))),
82
+ ...collectRuleNames(pickNamespace(categoryNamespace, (key) => key.startsWith("nursery"))),
83
+ ...SETTINGS_DEPENDENT_RULES,
84
+ ...DEFAULT_DIVERGENT_RULES
85
+ ]);
86
+ /**
87
+ * The rules `eslint-plugin-oxlint` re-enables for `.vue`/`.svelte`/`.astro`, read from the plugin's
88
+ * own `flat/all` split so the list tracks upstream instead of being hand-maintained.
89
+ * @example
90
+ * readVueUnsafeRules().includes('@typescript-eslint/no-unused-vars'); // true
91
+ */
92
+ function readVueUnsafeRules() {
93
+ const [, exceptions] = eslint_plugin_oxlint.default.configs["flat/all"];
94
+ const derived = exceptions?.rules ? Object.keys(exceptions.rules) : [];
95
+ return [.../* @__PURE__ */ new Set([...derived, ...VUE_UNSAFE_FALLBACK])];
96
+ }
97
+ var vueUnsafeRules = new Set(readVueUnsafeRules());
98
+ function normalizeToOxlintNamespace(eslintRuleName) {
99
+ return eslintRuleName.startsWith(ESLINT_IMPORT_PREFIX) ? `${OXLINT_IMPORT_PREFIX}${eslintRuleName.slice(9)}` : eslintRuleName;
100
+ }
101
+ /**
102
+ * Whether oxlint owns this ESLint rule in the current split — implemented natively, not type-aware,
103
+ * not nursery, and not driven by a flat-config `settings` key oxlint cannot read.
104
+ * @example
105
+ * isOxlintOwned('import-x/no-duplicates'); // true — oxlint implements it as `import/no-duplicates`
106
+ * isOxlintOwned('sonarjs/no-identical-functions'); // false
107
+ */
108
+ function isOxlintOwned(eslintRuleName) {
109
+ const normalized = normalizeToOxlintNamespace(eslintRuleName);
110
+ return implementedRules.has(normalized) && !excludedRules.has(normalized);
111
+ }
112
+ /**
113
+ * Whether ESLint must keep running this rule on SFC-like files because oxlint cannot parse their
114
+ * templates. Callers must exclude `**\/*.vue`, `**\/*.svelte` and `**\/*.astro` from its suppression.
115
+ * @example
116
+ * isVueUnsafeRule('@typescript-eslint/no-unused-vars'); // true
117
+ */
118
+ function isVueUnsafeRule(eslintRuleName) {
119
+ return vueUnsafeRules.has(normalizeToOxlintNamespace(eslintRuleName));
120
+ }
121
+ /**
122
+ * Translates an ESLint rule name into the name oxlint accepts in its config.
123
+ * @example
124
+ * toOxlintRuleName('no-var'); // 'eslint/no-var'
125
+ * toOxlintRuleName('import-x/first'); // 'import/first'
126
+ * toOxlintRuleName('@typescript-eslint/array-type'); // 'typescript/array-type'
127
+ */
128
+ function toOxlintRuleName(eslintRuleName) {
129
+ if (!eslintRuleName.includes("/")) return `eslint/${eslintRuleName}`;
130
+ if (eslintRuleName.startsWith(ESLINT_TYPESCRIPT_PREFIX)) return `${OXLINT_TYPESCRIPT_PREFIX}${eslintRuleName.slice(19)}`;
131
+ return normalizeToOxlintNamespace(eslintRuleName);
132
+ }
133
+ /**
134
+ * The oxlint plugin id that must appear in the config's `plugins` array for a rule to be loaded.
135
+ * @example
136
+ * toOxlintPluginName('import-x/first'); // 'import'
137
+ * toOxlintPluginName('no-var'); // 'eslint'
138
+ */
139
+ function toOxlintPluginName(eslintRuleName) {
140
+ if (!eslintRuleName.includes("/")) return "eslint";
141
+ const prefix = eslintRuleName.slice(0, eslintRuleName.lastIndexOf("/"));
142
+ return eslintPrefixToOxlintPlugin[prefix] ?? prefix;
143
+ }
144
+ function isRuleDisabled(entry) {
145
+ if (entry === void 0) return true;
146
+ const [severity] = Array.isArray(entry) ? entry : [entry];
147
+ return severity === "off" || severity === 0;
148
+ }
149
+ //#endregion
150
+ Object.defineProperty(exports, "OXLINT_CATEGORIES", {
151
+ enumerable: true,
152
+ get: function() {
153
+ return OXLINT_CATEGORIES;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "VUE_LIKE_GLOBS", {
157
+ enumerable: true,
158
+ get: function() {
159
+ return VUE_LIKE_GLOBS;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "__toESM", {
163
+ enumerable: true,
164
+ get: function() {
165
+ return __toESM;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "isOxlintOwned", {
169
+ enumerable: true,
170
+ get: function() {
171
+ return isOxlintOwned;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "isRuleDisabled", {
175
+ enumerable: true,
176
+ get: function() {
177
+ return isRuleDisabled;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "isVueUnsafeRule", {
181
+ enumerable: true,
182
+ get: function() {
183
+ return isVueUnsafeRule;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "toOxlintPluginName", {
187
+ enumerable: true,
188
+ get: function() {
189
+ return toOxlintPluginName;
190
+ }
191
+ });
192
+ Object.defineProperty(exports, "toOxlintRuleName", {
193
+ enumerable: true,
194
+ get: function() {
195
+ return toOxlintRuleName;
196
+ }
197
+ });
198
+
199
+ //# sourceMappingURL=oxlintOwnership-7hpdB3d1.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlintOwnership-7hpdB3d1.cjs","names":[],"sources":["../src/builders/oxlintOwnership.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport oxlintPlugin from 'eslint-plugin-oxlint';\nimport * as rulesByCategory from 'eslint-plugin-oxlint/rules-by-category';\nimport * as rulesByScope from 'eslint-plugin-oxlint/rules-by-scope';\n\nconst ESLINT_IMPORT_PREFIX = 'import-x/';\nconst OXLINT_IMPORT_PREFIX = 'import/';\nconst ESLINT_TYPESCRIPT_PREFIX = '@typescript-eslint/';\nconst OXLINT_TYPESCRIPT_PREFIX = 'typescript/';\n\nexport const VUE_LIKE_GLOBS: readonly string[] = ['**/*.vue', '**/*.svelte', '**/*.astro'];\n\nexport const OXLINT_CATEGORIES: readonly string[] = [\n 'correctness',\n 'suspicious',\n 'pedantic',\n 'perf',\n 'style',\n 'restriction',\n 'nursery',\n];\n\n// oxlint has no equivalent of flat-config `settings`, so any rule whose ESLint behavior is driven\n// by a settings key stays on the ESLint side. `jsdoc/check-tag-names` reads\n// `settings.jsdoc.tagNamePreference`, which the TypeScript presets use to remap `@desc`/`@callback`\n// onto `@use`/`@watch`; oxlint rejects both of those tags outright.\nexport const SETTINGS_DEPENDENT_RULES: readonly string[] = ['jsdoc/check-tag-names'];\n\n// Rules both linters implement, but whose omitted options resolve to different defaults — a bare\n// `'error'` therefore means something stricter under oxlint. `no-inner-declarations` defaults\n// `blockScopedFunctions` to `'allow'` in ESLint 9 and to `'disallow'` in oxlint, so handing oxlint\n// the preset's `'error'` would reject every block-scoped function declaration ESLint accepts.\nexport const DEFAULT_DIVERGENT_RULES: readonly string[] = ['no-inner-declarations'];\n\n// `eslint-plugin-oxlint` re-enables these for SFC-like files because oxlint cannot parse their\n// templates. Kept as a floor under the value derived from the plugin at runtime so a shape change\n// upstream can never silently drop the exception.\nconst VUE_UNSAFE_FALLBACK: readonly string[] = [\n 'no-unused-vars',\n '@typescript-eslint/no-unused-vars',\n '@typescript-eslint/consistent-type-imports',\n 'react-hooks/rules-of-hooks',\n];\n\nconst eslintPrefixToOxlintPlugin: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n};\n\nfunction collectRuleNames (namespace: Record<string, unknown>): string[] {\n return Object.values(namespace).flatMap(value => {\n if (typeof value !== 'object' || value === null) {\n return [];\n }\n\n const entries = Object.entries(value as Record<string, unknown>);\n const isRuleRecord = entries.length > 0 && entries.every(([, severity]) => severity === 'off');\n\n return isRuleRecord ? entries.map(([rule]) => rule) : [];\n });\n}\n\nfunction pickNamespace (\n namespace: Record<string, unknown>,\n matches: (key: string) => boolean\n): Record<string, unknown> {\n return Object.fromEntries(Object.entries(namespace).filter(([key]) => matches(key)));\n}\n\nconst categoryNamespace = rulesByCategory as Record<string, unknown>;\nconst scopeNamespace = rulesByScope as Record<string, unknown>;\nconst implementedRules = new Set(collectRuleNames(scopeNamespace));\n\n// Type-aware rules need `oxlint-tsgolint`, which this stage does not wire up, and nursery rules are\n// exempt from oxlint's semver guarantees. Both stay with ESLint.\nconst excludedRules = new Set([\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(scopeNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery'))),\n ...SETTINGS_DEPENDENT_RULES,\n ...DEFAULT_DIVERGENT_RULES,\n]);\n\n/**\n * The rules `eslint-plugin-oxlint` re-enables for `.vue`/`.svelte`/`.astro`, read from the plugin's\n * own `flat/all` split so the list tracks upstream instead of being hand-maintained.\n * @example\n * readVueUnsafeRules().includes('@typescript-eslint/no-unused-vars'); // true\n */\nexport function readVueUnsafeRules (): string[] {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n const derived = exceptions?.rules ? Object.keys(exceptions.rules) : [];\n\n return [...new Set([...derived, ...VUE_UNSAFE_FALLBACK])];\n}\n\nconst vueUnsafeRules = new Set(readVueUnsafeRules());\n\nfunction normalizeToOxlintNamespace (eslintRuleName: string): string {\n return eslintRuleName.startsWith(ESLINT_IMPORT_PREFIX)\n ? `${OXLINT_IMPORT_PREFIX}${eslintRuleName.slice(ESLINT_IMPORT_PREFIX.length)}`\n : eslintRuleName;\n}\n\n/**\n * Whether oxlint owns this ESLint rule in the current split — implemented natively, not type-aware,\n * not nursery, and not driven by a flat-config `settings` key oxlint cannot read.\n * @example\n * isOxlintOwned('import-x/no-duplicates'); // true — oxlint implements it as `import/no-duplicates`\n * isOxlintOwned('sonarjs/no-identical-functions'); // false\n */\nexport function isOxlintOwned (eslintRuleName: string): boolean {\n const normalized = normalizeToOxlintNamespace(eslintRuleName);\n\n return implementedRules.has(normalized) && !excludedRules.has(normalized);\n}\n\n/**\n * Whether ESLint must keep running this rule on SFC-like files because oxlint cannot parse their\n * templates. Callers must exclude `**\\/*.vue`, `**\\/*.svelte` and `**\\/*.astro` from its suppression.\n * @example\n * isVueUnsafeRule('@typescript-eslint/no-unused-vars'); // true\n */\nexport function isVueUnsafeRule (eslintRuleName: string): boolean {\n return vueUnsafeRules.has(normalizeToOxlintNamespace(eslintRuleName));\n}\n\n/**\n * Translates an ESLint rule name into the name oxlint accepts in its config.\n * @example\n * toOxlintRuleName('no-var'); // 'eslint/no-var'\n * toOxlintRuleName('import-x/first'); // 'import/first'\n * toOxlintRuleName('@typescript-eslint/array-type'); // 'typescript/array-type'\n */\nexport function toOxlintRuleName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return `eslint/${eslintRuleName}`;\n }\n\n if (eslintRuleName.startsWith(ESLINT_TYPESCRIPT_PREFIX)) {\n return `${OXLINT_TYPESCRIPT_PREFIX}${eslintRuleName.slice(ESLINT_TYPESCRIPT_PREFIX.length)}`;\n }\n\n return normalizeToOxlintNamespace(eslintRuleName);\n}\n\n/**\n * The oxlint plugin id that must appear in the config's `plugins` array for a rule to be loaded.\n * @example\n * toOxlintPluginName('import-x/first'); // 'import'\n * toOxlintPluginName('no-var'); // 'eslint'\n */\nexport function toOxlintPluginName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return 'eslint';\n }\n\n const prefix = eslintRuleName.slice(0, eslintRuleName.lastIndexOf('/'));\n\n return eslintPrefixToOxlintPlugin[prefix] ?? prefix;\n}\n\nexport function isRuleDisabled (entry: Linter.RuleEntry | undefined): boolean {\n if (entry === undefined) {\n return true;\n }\n\n const [severity] = Array.isArray(entry) ? entry : [entry];\n\n return severity === 'off' || severity === 0;\n}\n\n/* v8 ignore start */\nif (import.meta.vitest) {\n const { describe, test, expect } = import.meta.vitest;\n\n describe('isOxlintOwned', () => {\n test('claims a natively implemented core rule', () => {\n expect(isOxlintOwned('no-var')).toBe(true);\n });\n\n test('claims an import-x rule through the import-x → import alias', () => {\n expect(isOxlintOwned('import-x/no-duplicates')).toBe(true);\n });\n\n test('leaves type-aware typescript rules with ESLint', () => {\n expect(isOxlintOwned('@typescript-eslint/no-floating-promises')).toBe(false);\n });\n\n test('leaves rules oxlint does not implement with ESLint', () => {\n expect(isOxlintOwned('sonarjs/no-identical-functions')).toBe(false);\n expect(isOxlintOwned('@stylistic/indent')).toBe(false);\n expect(isOxlintOwned('@cspell/spellchecker')).toBe(false);\n });\n\n test('leaves settings-dependent rules with ESLint', () => {\n expect(isOxlintOwned('jsdoc/check-tag-names')).toBe(false);\n });\n\n test('leaves rules whose omitted options resolve to different defaults with ESLint', () => {\n expect(DEFAULT_DIVERGENT_RULES.every(rule => !isOxlintOwned(rule))).toBe(true);\n expect(isOxlintOwned('no-inner-declarations')).toBe(false);\n });\n\n const nurseryRules = collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery')));\n\n test('reads a non-empty nursery namespace, so the exclusion below is not vacuous', () => {\n expect(nurseryRules.length).toBeGreaterThan(0);\n });\n\n test('leaves every nursery rule with ESLint, since nursery is exempt from oxlint semver', () => {\n expect(nurseryRules.filter(rule => isOxlintOwned(rule))).toStrictEqual([]);\n });\n });\n\n describe('isVueUnsafeRule', () => {\n test.each([...VUE_UNSAFE_FALLBACK])('keeps %s with ESLint inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(true);\n });\n\n test.each([\n 'no-var',\n 'no-console',\n 'sonarjs/no-identical-functions',\n ])('lets oxlint keep %s inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(false);\n });\n\n test('does not read an import-x rule as the bare ESLint rule of the same suffix', () => {\n expect(isVueUnsafeRule('import-x/no-unused-vars')).toBe(false);\n });\n });\n\n describe('toOxlintRuleName', () => {\n test.each([\n ['no-var', 'eslint/no-var'],\n ['import-x/first', 'import/first'],\n ['@typescript-eslint/array-type', 'typescript/array-type'],\n ['jsdoc/empty-tags', 'jsdoc/empty-tags'],\n ['vue/no-dupe-keys', 'vue/no-dupe-keys'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintRuleName(eslintName)).toBe(expected);\n });\n });\n\n describe('toOxlintPluginName', () => {\n const expectedPluginByPrefix: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n };\n\n const byName = (left: string, right: string): number => left.localeCompare(right);\n\n test('names every prefix the remap table carries, so no entry goes unexercised', () => {\n expect(Object.keys(expectedPluginByPrefix).sort(byName))\n .toStrictEqual(Object.keys(eslintPrefixToOxlintPlugin).sort(byName));\n });\n\n test.each(Object.entries(expectedPluginByPrefix))(\n 'a %s rule loads the %s plugin',\n (prefix, plugin) => {\n expect(toOxlintPluginName(`${prefix}/some-rule`)).toBe(plugin);\n }\n );\n\n test.each([\n ['no-var', 'eslint'],\n ['jsdoc/empty-tags', 'jsdoc'],\n ['vitest/no-focused-tests', 'vitest'],\n ['vue/no-dupe-keys', 'vue'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintPluginName(eslintName)).toBe(expected);\n });\n });\n\n describe('readVueUnsafeRules', () => {\n test('derives the upstream exception list rather than only the pinned fallback', () => {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n\n expect(exceptions?.rules).toBeDefined();\n expect(Object.keys(exceptions?.rules ?? {}).length).toBeGreaterThan(0);\n });\n\n test('covers every rule oxlint cannot check inside an SFC', () => {\n expect(readVueUnsafeRules()).toEqual(expect.arrayContaining([...VUE_UNSAFE_FALLBACK]));\n });\n });\n\n describe('isRuleDisabled', () => {\n test.each([\n [undefined, true],\n ['off' as Linter.RuleEntry, true],\n [0 as Linter.RuleEntry, true],\n [['off'] as Linter.RuleEntry, true],\n ['error' as Linter.RuleEntry, false],\n [['error', { allow: [] }] as Linter.RuleEntry, false],\n [2 as Linter.RuleEntry, false],\n ])('%s → %s', (entry, expected) => {\n expect(isRuleDisabled(entry)).toBe(expected);\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,uBAAuB;AAC7B,IAAM,uBAAuB;AAC7B,IAAM,2BAA2B;AACjC,IAAM,2BAA2B;AAEjC,IAAa,iBAAoC;CAAC;CAAY;CAAe;AAAY;AAEzF,IAAa,oBAAuC;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;AACH;AAMD,IAAa,2BAA8C,CAAC,uBAAuB;AAMnF,IAAa,0BAA6C,CAAC,uBAAuB;AAKlF,IAAM,sBAAyC;CAC3C;CACA;CACA;CACA;AACH;AAED,IAAM,6BAA+D;CACjE,YAAY;CACZ,QAAQ;CACR,sBAAsB;CACtB,GAAG;CACH,cAAc;CACd,eAAe;CACf,cAAc;CACd,YAAY;AACf;AAED,SAAS,iBAAkB,WAAkC;CACzD,OAAO,OAAO,OAAO,SAAS,CAAC,CAAC,SAAQ,UAAQ;EAC5C,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,OAAO,CAAA;EAGX,MAAM,UAAU,OAAO,QAAQ,KAAgC;EAG/D,OAFqB,QAAQ,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2BAA2B,cAAc,CAAC;AACxE;;;;;;;;AASA,SAAgB,iBAAkB,gBAAsB;CACpD,IAAI,CAAC,eAAe,SAAS,GAAG,GAC5B,OAAO,UAAU;CAGrB,IAAI,eAAe,WAAW,wBAAwB,GAClD,OAAO,GAAG,2BAA2B,eAAe,MAAM,EAA+B;CAG7F,OAAO,2BAA2B,cAAc;AACpD;;;;;;;AAQA,SAAgB,mBAAoB,gBAAsB;CACtD,IAAI,CAAC,eAAe,SAAS,GAAG,GAC5B,OAAO;CAGX,MAAM,SAAS,eAAe,MAAM,GAAG,eAAe,YAAY,GAAG,CAAC;CAEtE,OAAO,2BAA2B,WAAW;AACjD;AAEA,SAAgB,eAAgB,OAAmC;CAC/D,IAAI,UAAU,KAAA,GACV,OAAO;CAGX,MAAM,CAAC,YAAY,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CAExD,OAAO,aAAa,SAAS,aAAa;AAC9C"}
@@ -0,0 +1,127 @@
1
+ import oxlintPlugin from "eslint-plugin-oxlint";
2
+ import * as rulesByCategory from "eslint-plugin-oxlint/rules-by-category";
3
+ import * as rulesByScope from "eslint-plugin-oxlint/rules-by-scope";
4
+ //#region src/builders/oxlintOwnership.ts
5
+ var ESLINT_IMPORT_PREFIX = "import-x/";
6
+ var OXLINT_IMPORT_PREFIX = "import/";
7
+ var ESLINT_TYPESCRIPT_PREFIX = "@typescript-eslint/";
8
+ var OXLINT_TYPESCRIPT_PREFIX = "typescript/";
9
+ var VUE_LIKE_GLOBS = [
10
+ "**/*.vue",
11
+ "**/*.svelte",
12
+ "**/*.astro"
13
+ ];
14
+ var OXLINT_CATEGORIES = [
15
+ "correctness",
16
+ "suspicious",
17
+ "pedantic",
18
+ "perf",
19
+ "style",
20
+ "restriction",
21
+ "nursery"
22
+ ];
23
+ var SETTINGS_DEPENDENT_RULES = ["jsdoc/check-tag-names"];
24
+ var DEFAULT_DIVERGENT_RULES = ["no-inner-declarations"];
25
+ var VUE_UNSAFE_FALLBACK = [
26
+ "no-unused-vars",
27
+ "@typescript-eslint/no-unused-vars",
28
+ "@typescript-eslint/consistent-type-imports",
29
+ "react-hooks/rules-of-hooks"
30
+ ];
31
+ var eslintPrefixToOxlintPlugin = {
32
+ "import-x": "import",
33
+ import: "import",
34
+ "@typescript-eslint": "typescript",
35
+ n: "node",
36
+ "@next/next": "nextjs",
37
+ "react-hooks": "react",
38
+ "react-perf": "react-perf",
39
+ "jsx-a11y": "jsx-a11y"
40
+ };
41
+ function collectRuleNames(namespace) {
42
+ return Object.values(namespace).flatMap((value) => {
43
+ if (typeof value !== "object" || value === null) return [];
44
+ const entries = Object.entries(value);
45
+ return entries.length > 0 && entries.every(([, severity]) => severity === "off") ? entries.map(([rule]) => rule) : [];
46
+ });
47
+ }
48
+ function pickNamespace(namespace, matches) {
49
+ return Object.fromEntries(Object.entries(namespace).filter(([key]) => matches(key)));
50
+ }
51
+ var categoryNamespace = rulesByCategory;
52
+ var scopeNamespace = rulesByScope;
53
+ var implementedRules = new Set(collectRuleNames(scopeNamespace));
54
+ var excludedRules = /* @__PURE__ */ new Set([
55
+ ...collectRuleNames(pickNamespace(categoryNamespace, (key) => key.endsWith("TypeAwareRules"))),
56
+ ...collectRuleNames(pickNamespace(scopeNamespace, (key) => key.endsWith("TypeAwareRules"))),
57
+ ...collectRuleNames(pickNamespace(categoryNamespace, (key) => key.startsWith("nursery"))),
58
+ ...SETTINGS_DEPENDENT_RULES,
59
+ ...DEFAULT_DIVERGENT_RULES
60
+ ]);
61
+ /**
62
+ * The rules `eslint-plugin-oxlint` re-enables for `.vue`/`.svelte`/`.astro`, read from the plugin's
63
+ * own `flat/all` split so the list tracks upstream instead of being hand-maintained.
64
+ * @example
65
+ * readVueUnsafeRules().includes('@typescript-eslint/no-unused-vars'); // true
66
+ */
67
+ function readVueUnsafeRules() {
68
+ const [, exceptions] = oxlintPlugin.configs["flat/all"];
69
+ const derived = exceptions?.rules ? Object.keys(exceptions.rules) : [];
70
+ return [.../* @__PURE__ */ new Set([...derived, ...VUE_UNSAFE_FALLBACK])];
71
+ }
72
+ var vueUnsafeRules = new Set(readVueUnsafeRules());
73
+ function normalizeToOxlintNamespace(eslintRuleName) {
74
+ return eslintRuleName.startsWith(ESLINT_IMPORT_PREFIX) ? `${OXLINT_IMPORT_PREFIX}${eslintRuleName.slice(9)}` : eslintRuleName;
75
+ }
76
+ /**
77
+ * Whether oxlint owns this ESLint rule in the current split — implemented natively, not type-aware,
78
+ * not nursery, and not driven by a flat-config `settings` key oxlint cannot read.
79
+ * @example
80
+ * isOxlintOwned('import-x/no-duplicates'); // true — oxlint implements it as `import/no-duplicates`
81
+ * isOxlintOwned('sonarjs/no-identical-functions'); // false
82
+ */
83
+ function isOxlintOwned(eslintRuleName) {
84
+ const normalized = normalizeToOxlintNamespace(eslintRuleName);
85
+ return implementedRules.has(normalized) && !excludedRules.has(normalized);
86
+ }
87
+ /**
88
+ * Whether ESLint must keep running this rule on SFC-like files because oxlint cannot parse their
89
+ * templates. Callers must exclude `**\/*.vue`, `**\/*.svelte` and `**\/*.astro` from its suppression.
90
+ * @example
91
+ * isVueUnsafeRule('@typescript-eslint/no-unused-vars'); // true
92
+ */
93
+ function isVueUnsafeRule(eslintRuleName) {
94
+ return vueUnsafeRules.has(normalizeToOxlintNamespace(eslintRuleName));
95
+ }
96
+ /**
97
+ * Translates an ESLint rule name into the name oxlint accepts in its config.
98
+ * @example
99
+ * toOxlintRuleName('no-var'); // 'eslint/no-var'
100
+ * toOxlintRuleName('import-x/first'); // 'import/first'
101
+ * toOxlintRuleName('@typescript-eslint/array-type'); // 'typescript/array-type'
102
+ */
103
+ function toOxlintRuleName(eslintRuleName) {
104
+ if (!eslintRuleName.includes("/")) return `eslint/${eslintRuleName}`;
105
+ if (eslintRuleName.startsWith(ESLINT_TYPESCRIPT_PREFIX)) return `${OXLINT_TYPESCRIPT_PREFIX}${eslintRuleName.slice(19)}`;
106
+ return normalizeToOxlintNamespace(eslintRuleName);
107
+ }
108
+ /**
109
+ * The oxlint plugin id that must appear in the config's `plugins` array for a rule to be loaded.
110
+ * @example
111
+ * toOxlintPluginName('import-x/first'); // 'import'
112
+ * toOxlintPluginName('no-var'); // 'eslint'
113
+ */
114
+ function toOxlintPluginName(eslintRuleName) {
115
+ if (!eslintRuleName.includes("/")) return "eslint";
116
+ const prefix = eslintRuleName.slice(0, eslintRuleName.lastIndexOf("/"));
117
+ return eslintPrefixToOxlintPlugin[prefix] ?? prefix;
118
+ }
119
+ function isRuleDisabled(entry) {
120
+ if (entry === void 0) return true;
121
+ const [severity] = Array.isArray(entry) ? entry : [entry];
122
+ return severity === "off" || severity === 0;
123
+ }
124
+ //#endregion
125
+ export { isVueUnsafeRule as a, isRuleDisabled as i, VUE_LIKE_GLOBS as n, toOxlintPluginName as o, isOxlintOwned as r, toOxlintRuleName as s, OXLINT_CATEGORIES as t };
126
+
127
+ //# sourceMappingURL=oxlintOwnership-Cx0hgA_J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxlintOwnership-Cx0hgA_J.js","names":[],"sources":["../src/builders/oxlintOwnership.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport oxlintPlugin from 'eslint-plugin-oxlint';\nimport * as rulesByCategory from 'eslint-plugin-oxlint/rules-by-category';\nimport * as rulesByScope from 'eslint-plugin-oxlint/rules-by-scope';\n\nconst ESLINT_IMPORT_PREFIX = 'import-x/';\nconst OXLINT_IMPORT_PREFIX = 'import/';\nconst ESLINT_TYPESCRIPT_PREFIX = '@typescript-eslint/';\nconst OXLINT_TYPESCRIPT_PREFIX = 'typescript/';\n\nexport const VUE_LIKE_GLOBS: readonly string[] = ['**/*.vue', '**/*.svelte', '**/*.astro'];\n\nexport const OXLINT_CATEGORIES: readonly string[] = [\n 'correctness',\n 'suspicious',\n 'pedantic',\n 'perf',\n 'style',\n 'restriction',\n 'nursery',\n];\n\n// oxlint has no equivalent of flat-config `settings`, so any rule whose ESLint behavior is driven\n// by a settings key stays on the ESLint side. `jsdoc/check-tag-names` reads\n// `settings.jsdoc.tagNamePreference`, which the TypeScript presets use to remap `@desc`/`@callback`\n// onto `@use`/`@watch`; oxlint rejects both of those tags outright.\nexport const SETTINGS_DEPENDENT_RULES: readonly string[] = ['jsdoc/check-tag-names'];\n\n// Rules both linters implement, but whose omitted options resolve to different defaults — a bare\n// `'error'` therefore means something stricter under oxlint. `no-inner-declarations` defaults\n// `blockScopedFunctions` to `'allow'` in ESLint 9 and to `'disallow'` in oxlint, so handing oxlint\n// the preset's `'error'` would reject every block-scoped function declaration ESLint accepts.\nexport const DEFAULT_DIVERGENT_RULES: readonly string[] = ['no-inner-declarations'];\n\n// `eslint-plugin-oxlint` re-enables these for SFC-like files because oxlint cannot parse their\n// templates. Kept as a floor under the value derived from the plugin at runtime so a shape change\n// upstream can never silently drop the exception.\nconst VUE_UNSAFE_FALLBACK: readonly string[] = [\n 'no-unused-vars',\n '@typescript-eslint/no-unused-vars',\n '@typescript-eslint/consistent-type-imports',\n 'react-hooks/rules-of-hooks',\n];\n\nconst eslintPrefixToOxlintPlugin: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n};\n\nfunction collectRuleNames (namespace: Record<string, unknown>): string[] {\n return Object.values(namespace).flatMap(value => {\n if (typeof value !== 'object' || value === null) {\n return [];\n }\n\n const entries = Object.entries(value as Record<string, unknown>);\n const isRuleRecord = entries.length > 0 && entries.every(([, severity]) => severity === 'off');\n\n return isRuleRecord ? entries.map(([rule]) => rule) : [];\n });\n}\n\nfunction pickNamespace (\n namespace: Record<string, unknown>,\n matches: (key: string) => boolean\n): Record<string, unknown> {\n return Object.fromEntries(Object.entries(namespace).filter(([key]) => matches(key)));\n}\n\nconst categoryNamespace = rulesByCategory as Record<string, unknown>;\nconst scopeNamespace = rulesByScope as Record<string, unknown>;\nconst implementedRules = new Set(collectRuleNames(scopeNamespace));\n\n// Type-aware rules need `oxlint-tsgolint`, which this stage does not wire up, and nursery rules are\n// exempt from oxlint's semver guarantees. Both stay with ESLint.\nconst excludedRules = new Set([\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(scopeNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery'))),\n ...SETTINGS_DEPENDENT_RULES,\n ...DEFAULT_DIVERGENT_RULES,\n]);\n\n/**\n * The rules `eslint-plugin-oxlint` re-enables for `.vue`/`.svelte`/`.astro`, read from the plugin's\n * own `flat/all` split so the list tracks upstream instead of being hand-maintained.\n * @example\n * readVueUnsafeRules().includes('@typescript-eslint/no-unused-vars'); // true\n */\nexport function readVueUnsafeRules (): string[] {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n const derived = exceptions?.rules ? Object.keys(exceptions.rules) : [];\n\n return [...new Set([...derived, ...VUE_UNSAFE_FALLBACK])];\n}\n\nconst vueUnsafeRules = new Set(readVueUnsafeRules());\n\nfunction normalizeToOxlintNamespace (eslintRuleName: string): string {\n return eslintRuleName.startsWith(ESLINT_IMPORT_PREFIX)\n ? `${OXLINT_IMPORT_PREFIX}${eslintRuleName.slice(ESLINT_IMPORT_PREFIX.length)}`\n : eslintRuleName;\n}\n\n/**\n * Whether oxlint owns this ESLint rule in the current split — implemented natively, not type-aware,\n * not nursery, and not driven by a flat-config `settings` key oxlint cannot read.\n * @example\n * isOxlintOwned('import-x/no-duplicates'); // true — oxlint implements it as `import/no-duplicates`\n * isOxlintOwned('sonarjs/no-identical-functions'); // false\n */\nexport function isOxlintOwned (eslintRuleName: string): boolean {\n const normalized = normalizeToOxlintNamespace(eslintRuleName);\n\n return implementedRules.has(normalized) && !excludedRules.has(normalized);\n}\n\n/**\n * Whether ESLint must keep running this rule on SFC-like files because oxlint cannot parse their\n * templates. Callers must exclude `**\\/*.vue`, `**\\/*.svelte` and `**\\/*.astro` from its suppression.\n * @example\n * isVueUnsafeRule('@typescript-eslint/no-unused-vars'); // true\n */\nexport function isVueUnsafeRule (eslintRuleName: string): boolean {\n return vueUnsafeRules.has(normalizeToOxlintNamespace(eslintRuleName));\n}\n\n/**\n * Translates an ESLint rule name into the name oxlint accepts in its config.\n * @example\n * toOxlintRuleName('no-var'); // 'eslint/no-var'\n * toOxlintRuleName('import-x/first'); // 'import/first'\n * toOxlintRuleName('@typescript-eslint/array-type'); // 'typescript/array-type'\n */\nexport function toOxlintRuleName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return `eslint/${eslintRuleName}`;\n }\n\n if (eslintRuleName.startsWith(ESLINT_TYPESCRIPT_PREFIX)) {\n return `${OXLINT_TYPESCRIPT_PREFIX}${eslintRuleName.slice(ESLINT_TYPESCRIPT_PREFIX.length)}`;\n }\n\n return normalizeToOxlintNamespace(eslintRuleName);\n}\n\n/**\n * The oxlint plugin id that must appear in the config's `plugins` array for a rule to be loaded.\n * @example\n * toOxlintPluginName('import-x/first'); // 'import'\n * toOxlintPluginName('no-var'); // 'eslint'\n */\nexport function toOxlintPluginName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return 'eslint';\n }\n\n const prefix = eslintRuleName.slice(0, eslintRuleName.lastIndexOf('/'));\n\n return eslintPrefixToOxlintPlugin[prefix] ?? prefix;\n}\n\nexport function isRuleDisabled (entry: Linter.RuleEntry | undefined): boolean {\n if (entry === undefined) {\n return true;\n }\n\n const [severity] = Array.isArray(entry) ? entry : [entry];\n\n return severity === 'off' || severity === 0;\n}\n\n/* v8 ignore start */\nif (import.meta.vitest) {\n const { describe, test, expect } = import.meta.vitest;\n\n describe('isOxlintOwned', () => {\n test('claims a natively implemented core rule', () => {\n expect(isOxlintOwned('no-var')).toBe(true);\n });\n\n test('claims an import-x rule through the import-x → import alias', () => {\n expect(isOxlintOwned('import-x/no-duplicates')).toBe(true);\n });\n\n test('leaves type-aware typescript rules with ESLint', () => {\n expect(isOxlintOwned('@typescript-eslint/no-floating-promises')).toBe(false);\n });\n\n test('leaves rules oxlint does not implement with ESLint', () => {\n expect(isOxlintOwned('sonarjs/no-identical-functions')).toBe(false);\n expect(isOxlintOwned('@stylistic/indent')).toBe(false);\n expect(isOxlintOwned('@cspell/spellchecker')).toBe(false);\n });\n\n test('leaves settings-dependent rules with ESLint', () => {\n expect(isOxlintOwned('jsdoc/check-tag-names')).toBe(false);\n });\n\n test('leaves rules whose omitted options resolve to different defaults with ESLint', () => {\n expect(DEFAULT_DIVERGENT_RULES.every(rule => !isOxlintOwned(rule))).toBe(true);\n expect(isOxlintOwned('no-inner-declarations')).toBe(false);\n });\n\n const nurseryRules = collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery')));\n\n test('reads a non-empty nursery namespace, so the exclusion below is not vacuous', () => {\n expect(nurseryRules.length).toBeGreaterThan(0);\n });\n\n test('leaves every nursery rule with ESLint, since nursery is exempt from oxlint semver', () => {\n expect(nurseryRules.filter(rule => isOxlintOwned(rule))).toStrictEqual([]);\n });\n });\n\n describe('isVueUnsafeRule', () => {\n test.each([...VUE_UNSAFE_FALLBACK])('keeps %s with ESLint inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(true);\n });\n\n test.each([\n 'no-var',\n 'no-console',\n 'sonarjs/no-identical-functions',\n ])('lets oxlint keep %s inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(false);\n });\n\n test('does not read an import-x rule as the bare ESLint rule of the same suffix', () => {\n expect(isVueUnsafeRule('import-x/no-unused-vars')).toBe(false);\n });\n });\n\n describe('toOxlintRuleName', () => {\n test.each([\n ['no-var', 'eslint/no-var'],\n ['import-x/first', 'import/first'],\n ['@typescript-eslint/array-type', 'typescript/array-type'],\n ['jsdoc/empty-tags', 'jsdoc/empty-tags'],\n ['vue/no-dupe-keys', 'vue/no-dupe-keys'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintRuleName(eslintName)).toBe(expected);\n });\n });\n\n describe('toOxlintPluginName', () => {\n const expectedPluginByPrefix: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n };\n\n const byName = (left: string, right: string): number => left.localeCompare(right);\n\n test('names every prefix the remap table carries, so no entry goes unexercised', () => {\n expect(Object.keys(expectedPluginByPrefix).sort(byName))\n .toStrictEqual(Object.keys(eslintPrefixToOxlintPlugin).sort(byName));\n });\n\n test.each(Object.entries(expectedPluginByPrefix))(\n 'a %s rule loads the %s plugin',\n (prefix, plugin) => {\n expect(toOxlintPluginName(`${prefix}/some-rule`)).toBe(plugin);\n }\n );\n\n test.each([\n ['no-var', 'eslint'],\n ['jsdoc/empty-tags', 'jsdoc'],\n ['vitest/no-focused-tests', 'vitest'],\n ['vue/no-dupe-keys', 'vue'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintPluginName(eslintName)).toBe(expected);\n });\n });\n\n describe('readVueUnsafeRules', () => {\n test('derives the upstream exception list rather than only the pinned fallback', () => {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n\n expect(exceptions?.rules).toBeDefined();\n expect(Object.keys(exceptions?.rules ?? {}).length).toBeGreaterThan(0);\n });\n\n test('covers every rule oxlint cannot check inside an SFC', () => {\n expect(readVueUnsafeRules()).toEqual(expect.arrayContaining([...VUE_UNSAFE_FALLBACK]));\n });\n });\n\n describe('isRuleDisabled', () => {\n test.each([\n [undefined, true],\n ['off' as Linter.RuleEntry, true],\n [0 as Linter.RuleEntry, true],\n [['off'] as Linter.RuleEntry, true],\n ['error' as Linter.RuleEntry, false],\n [['error', { allow: [] }] as Linter.RuleEntry, false],\n [2 as Linter.RuleEntry, false],\n ])('%s → %s', (entry, expected) => {\n expect(isRuleDisabled(entry)).toBe(expected);\n });\n });\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 @@
1
- {"version":3,"file":"removePluginsFromConfigs-D0oSUj2C.cjs","names":[],"sources":["../src/rules/typescript.ts","../src/utils/removePluginsFromConfigs.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\nconst overriddenRules: Linter.RulesRecord = {\n indent: 'off',\n 'no-undef': 'off',\n 'no-shadow': 'off',\n '@typescript-eslint/comma-dangle': 'off',\n 'no-extra-parens': 'off',\n '@typescript-eslint/no-extra-parens': 'off',\n '@typescript-eslint/space-before-function-paren': 'off',\n 'no-unused-vars': 'off',\n 'no-useless-constructor': 'off',\n '@typescript-eslint/indent': 'off',\n semi: 'off',\n '@typescript-eslint/semi': 'off',\n 'react/jsx-filename-extension': 'off',\n 'no-use-before-define': 'off',\n '@typescript-eslint/lines-between-class-members': 'off',\n '@typescript-eslint/comma-spacing': 'off',\n '@typescript-eslint/space-before-blocks': 'off',\n '@typescript-eslint/object-curly-spacing': 'off',\n 'no-redeclare': 'off',\n // https://eslint.style/rules/ts/function-call-spacing\n '@typescript-eslint/func-call-spacing': 'off',\n};\n\nexport default {\n rules: {\n ...overriddenRules,\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-unused-vars': ['error'],\n '@typescript-eslint/no-useless-constructor': ['error'],\n '@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],\n '@typescript-eslint/no-misused-promises': ['error', {\n checksVoidReturn: { arguments: false },\n }],\n '@typescript-eslint/no-use-before-define': ['error'],\n '@typescript-eslint/consistent-type-imports': ['error', {\n fixStyle: 'inline-type-imports',\n disallowTypeAnnotations: false,\n }],\n '@typescript-eslint/naming-convention': ['error', {\n selector: ['typeLike'],\n format: ['PascalCase'],\n custom: {\n regex: '^((I|T|E|G|C)[A-Z][a-z]|[A-Z]{1,2}$)',\n match: false,\n },\n }],\n '@typescript-eslint/await-thenable': 'off',\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport function removePluginsFromConfigs (configs: Linter.Config[]): Linter.Config[] {\n return configs.map(config => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { plugins, ...rest } = config;\n\n return rest;\n });\n}\n"],"mappings":"AA0BA,IAAA,qBAAe,EACX,OAAO;CAxBP,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,mCAAmC;CACnC,mBAAmB;CACnB,sCAAsC;CACtC,kDAAkD;CAClD,kBAAkB;CAClB,0BAA0B;CAC1B,6BAA6B;CAC7B,MAAM;CACN,2BAA2B;CAC3B,gCAAgC;CAChC,wBAAwB;CACxB,kDAAkD;CAClD,oCAAoC;CACpC,0CAA0C;CAC1C,2CAA2C;CAC3C,gBAAgB;CAEhB,wCAAwC;CAMpC,gCAAgC;CAChC,qCAAqC,CAAC,OAAO;CAC7C,6CAA6C,CAAC,OAAO;CACrD,iCAAiC,CAAC,SAAS;EAAE,SAAS;EAAS,UAAU;CAAO,CAAE;CAClF,0CAA0C,CAAC,SAAS,EAChD,kBAAkB,EAAE,WAAW,MAAK,EACvC,CAAA;CACD,2CAA2C,CAAC,OAAO;CACnD,8CAA8C,CAAC,SAAS;EACpD,UAAU;EACV,yBAAyB;CAC5B,CAAA;CACD,wCAAwC,CAAC,SAAS;EAC9C,UAAU,CAAC,UAAU;EACrB,QAAQ,CAAC,YAAY;EACrB,QAAQ;GACJ,OAAO;GACP,OAAO;EACV;CACJ,CAAA;CACD,qCAAqC;AACxC,EACa;;;ACjDlB,SAAgB,yBAA0B,SAAwB;CAC9D,OAAO,QAAQ,KAAI,WAAS;EAExB,MAAM,EAAE,SAAS,GAAG,SAAS;EAE7B,OAAO;CACX,CAAC;AACL"}
1
+ {"version":3,"file":"removePluginsFromConfigs-D0oSUj2C.cjs","names":[],"sources":["../src/rules/typescript.ts","../src/utils/removePluginsFromConfigs.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\nconst overriddenRules: Linter.RulesRecord = {\n indent: 'off',\n 'no-undef': 'off',\n 'no-shadow': 'off',\n '@typescript-eslint/comma-dangle': 'off',\n 'no-extra-parens': 'off',\n '@typescript-eslint/no-extra-parens': 'off',\n '@typescript-eslint/space-before-function-paren': 'off',\n 'no-unused-vars': 'off',\n 'no-useless-constructor': 'off',\n '@typescript-eslint/indent': 'off',\n semi: 'off',\n '@typescript-eslint/semi': 'off',\n 'react/jsx-filename-extension': 'off',\n 'no-use-before-define': 'off',\n '@typescript-eslint/lines-between-class-members': 'off',\n '@typescript-eslint/comma-spacing': 'off',\n '@typescript-eslint/space-before-blocks': 'off',\n '@typescript-eslint/object-curly-spacing': 'off',\n 'no-redeclare': 'off',\n // https://eslint.style/rules/ts/function-call-spacing\n '@typescript-eslint/func-call-spacing': 'off',\n};\n\nexport default {\n rules: {\n ...overriddenRules,\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-unused-vars': ['error'],\n '@typescript-eslint/no-useless-constructor': ['error'],\n '@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],\n '@typescript-eslint/no-misused-promises': ['error', {\n checksVoidReturn: { arguments: false },\n }],\n '@typescript-eslint/no-use-before-define': ['error'],\n '@typescript-eslint/consistent-type-imports': ['error', {\n fixStyle: 'inline-type-imports',\n disallowTypeAnnotations: false,\n }],\n '@typescript-eslint/naming-convention': ['error', {\n selector: ['typeLike'],\n format: ['PascalCase'],\n custom: {\n regex: '^((I|T|E|G|C)[A-Z][a-z]|[A-Z]{1,2}$)',\n match: false,\n },\n }],\n '@typescript-eslint/await-thenable': 'off',\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport function removePluginsFromConfigs (configs: Linter.Config[]): Linter.Config[] {\n return configs.map(config => {\n // oxlint-disable-next-line @typescript-eslint/no-unused-vars\n const { plugins, ...rest } = config;\n\n return rest;\n });\n}\n"],"mappings":"AA0BA,IAAA,qBAAe,EACX,OAAO;CAxBP,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,mCAAmC;CACnC,mBAAmB;CACnB,sCAAsC;CACtC,kDAAkD;CAClD,kBAAkB;CAClB,0BAA0B;CAC1B,6BAA6B;CAC7B,MAAM;CACN,2BAA2B;CAC3B,gCAAgC;CAChC,wBAAwB;CACxB,kDAAkD;CAClD,oCAAoC;CACpC,0CAA0C;CAC1C,2CAA2C;CAC3C,gBAAgB;CAEhB,wCAAwC;CAMpC,gCAAgC;CAChC,qCAAqC,CAAC,OAAO;CAC7C,6CAA6C,CAAC,OAAO;CACrD,iCAAiC,CAAC,SAAS;EAAE,SAAS;EAAS,UAAU;CAAO,CAAE;CAClF,0CAA0C,CAAC,SAAS,EAChD,kBAAkB,EAAE,WAAW,MAAK,EACvC,CAAA;CACD,2CAA2C,CAAC,OAAO;CACnD,8CAA8C,CAAC,SAAS;EACpD,UAAU;EACV,yBAAyB;CAC5B,CAAA;CACD,wCAAwC,CAAC,SAAS;EAC9C,UAAU,CAAC,UAAU;EACrB,QAAQ,CAAC,YAAY;EACrB,QAAQ;GACJ,OAAO;GACP,OAAO;EACV;CACJ,CAAA;CACD,qCAAqC;AACxC,EACa;;;ACjDlB,SAAgB,yBAA0B,SAAwB;CAC9D,OAAO,QAAQ,KAAI,WAAS;EAExB,MAAM,EAAE,SAAS,GAAG,SAAS;EAE7B,OAAO;CACX,CAAC;AACL"}
@@ -1 +1 @@
1
- {"version":3,"file":"removePluginsFromConfigs-DzqX2Ju2.js","names":[],"sources":["../src/rules/typescript.ts","../src/utils/removePluginsFromConfigs.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\nconst overriddenRules: Linter.RulesRecord = {\n indent: 'off',\n 'no-undef': 'off',\n 'no-shadow': 'off',\n '@typescript-eslint/comma-dangle': 'off',\n 'no-extra-parens': 'off',\n '@typescript-eslint/no-extra-parens': 'off',\n '@typescript-eslint/space-before-function-paren': 'off',\n 'no-unused-vars': 'off',\n 'no-useless-constructor': 'off',\n '@typescript-eslint/indent': 'off',\n semi: 'off',\n '@typescript-eslint/semi': 'off',\n 'react/jsx-filename-extension': 'off',\n 'no-use-before-define': 'off',\n '@typescript-eslint/lines-between-class-members': 'off',\n '@typescript-eslint/comma-spacing': 'off',\n '@typescript-eslint/space-before-blocks': 'off',\n '@typescript-eslint/object-curly-spacing': 'off',\n 'no-redeclare': 'off',\n // https://eslint.style/rules/ts/function-call-spacing\n '@typescript-eslint/func-call-spacing': 'off',\n};\n\nexport default {\n rules: {\n ...overriddenRules,\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-unused-vars': ['error'],\n '@typescript-eslint/no-useless-constructor': ['error'],\n '@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],\n '@typescript-eslint/no-misused-promises': ['error', {\n checksVoidReturn: { arguments: false },\n }],\n '@typescript-eslint/no-use-before-define': ['error'],\n '@typescript-eslint/consistent-type-imports': ['error', {\n fixStyle: 'inline-type-imports',\n disallowTypeAnnotations: false,\n }],\n '@typescript-eslint/naming-convention': ['error', {\n selector: ['typeLike'],\n format: ['PascalCase'],\n custom: {\n regex: '^((I|T|E|G|C)[A-Z][a-z]|[A-Z]{1,2}$)',\n match: false,\n },\n }],\n '@typescript-eslint/await-thenable': 'off',\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport function removePluginsFromConfigs (configs: Linter.Config[]): Linter.Config[] {\n return configs.map(config => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { plugins, ...rest } = config;\n\n return rest;\n });\n}\n"],"mappings":"AA0BA,IAAA,qBAAe,EACX,OAAO;CAxBP,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,mCAAmC;CACnC,mBAAmB;CACnB,sCAAsC;CACtC,kDAAkD;CAClD,kBAAkB;CAClB,0BAA0B;CAC1B,6BAA6B;CAC7B,MAAM;CACN,2BAA2B;CAC3B,gCAAgC;CAChC,wBAAwB;CACxB,kDAAkD;CAClD,oCAAoC;CACpC,0CAA0C;CAC1C,2CAA2C;CAC3C,gBAAgB;CAEhB,wCAAwC;CAMpC,gCAAgC;CAChC,qCAAqC,CAAC,OAAO;CAC7C,6CAA6C,CAAC,OAAO;CACrD,iCAAiC,CAAC,SAAS;EAAE,SAAS;EAAS,UAAU;CAAO,CAAE;CAClF,0CAA0C,CAAC,SAAS,EAChD,kBAAkB,EAAE,WAAW,MAAK,EACvC,CAAA;CACD,2CAA2C,CAAC,OAAO;CACnD,8CAA8C,CAAC,SAAS;EACpD,UAAU;EACV,yBAAyB;CAC5B,CAAA;CACD,wCAAwC,CAAC,SAAS;EAC9C,UAAU,CAAC,UAAU;EACrB,QAAQ,CAAC,YAAY;EACrB,QAAQ;GACJ,OAAO;GACP,OAAO;EACV;CACJ,CAAA;CACD,qCAAqC;AACxC,EACa;;;ACjDlB,SAAgB,yBAA0B,SAAwB;CAC9D,OAAO,QAAQ,KAAI,WAAS;EAExB,MAAM,EAAE,SAAS,GAAG,SAAS;EAE7B,OAAO;CACX,CAAC;AACL"}
1
+ {"version":3,"file":"removePluginsFromConfigs-DzqX2Ju2.js","names":[],"sources":["../src/rules/typescript.ts","../src/utils/removePluginsFromConfigs.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\nconst overriddenRules: Linter.RulesRecord = {\n indent: 'off',\n 'no-undef': 'off',\n 'no-shadow': 'off',\n '@typescript-eslint/comma-dangle': 'off',\n 'no-extra-parens': 'off',\n '@typescript-eslint/no-extra-parens': 'off',\n '@typescript-eslint/space-before-function-paren': 'off',\n 'no-unused-vars': 'off',\n 'no-useless-constructor': 'off',\n '@typescript-eslint/indent': 'off',\n semi: 'off',\n '@typescript-eslint/semi': 'off',\n 'react/jsx-filename-extension': 'off',\n 'no-use-before-define': 'off',\n '@typescript-eslint/lines-between-class-members': 'off',\n '@typescript-eslint/comma-spacing': 'off',\n '@typescript-eslint/space-before-blocks': 'off',\n '@typescript-eslint/object-curly-spacing': 'off',\n 'no-redeclare': 'off',\n // https://eslint.style/rules/ts/function-call-spacing\n '@typescript-eslint/func-call-spacing': 'off',\n};\n\nexport default {\n rules: {\n ...overriddenRules,\n '@typescript-eslint/no-shadow': 'error',\n '@typescript-eslint/no-unused-vars': ['error'],\n '@typescript-eslint/no-useless-constructor': ['error'],\n '@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],\n '@typescript-eslint/no-misused-promises': ['error', {\n checksVoidReturn: { arguments: false },\n }],\n '@typescript-eslint/no-use-before-define': ['error'],\n '@typescript-eslint/consistent-type-imports': ['error', {\n fixStyle: 'inline-type-imports',\n disallowTypeAnnotations: false,\n }],\n '@typescript-eslint/naming-convention': ['error', {\n selector: ['typeLike'],\n format: ['PascalCase'],\n custom: {\n regex: '^((I|T|E|G|C)[A-Z][a-z]|[A-Z]{1,2}$)',\n match: false,\n },\n }],\n '@typescript-eslint/await-thenable': 'off',\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport function removePluginsFromConfigs (configs: Linter.Config[]): Linter.Config[] {\n return configs.map(config => {\n // oxlint-disable-next-line @typescript-eslint/no-unused-vars\n const { plugins, ...rest } = config;\n\n return rest;\n });\n}\n"],"mappings":"AA0BA,IAAA,qBAAe,EACX,OAAO;CAxBP,QAAQ;CACR,YAAY;CACZ,aAAa;CACb,mCAAmC;CACnC,mBAAmB;CACnB,sCAAsC;CACtC,kDAAkD;CAClD,kBAAkB;CAClB,0BAA0B;CAC1B,6BAA6B;CAC7B,MAAM;CACN,2BAA2B;CAC3B,gCAAgC;CAChC,wBAAwB;CACxB,kDAAkD;CAClD,oCAAoC;CACpC,0CAA0C;CAC1C,2CAA2C;CAC3C,gBAAgB;CAEhB,wCAAwC;CAMpC,gCAAgC;CAChC,qCAAqC,CAAC,OAAO;CAC7C,6CAA6C,CAAC,OAAO;CACrD,iCAAiC,CAAC,SAAS;EAAE,SAAS;EAAS,UAAU;CAAO,CAAE;CAClF,0CAA0C,CAAC,SAAS,EAChD,kBAAkB,EAAE,WAAW,MAAK,EACvC,CAAA;CACD,2CAA2C,CAAC,OAAO;CACnD,8CAA8C,CAAC,SAAS;EACpD,UAAU;EACV,yBAAyB;CAC5B,CAAA;CACD,wCAAwC,CAAC,SAAS;EAC9C,UAAU,CAAC,UAAU;EACrB,QAAQ,CAAC,YAAY;EACrB,QAAQ;GACJ,OAAO;GACP,OAAO;EACV;CACJ,CAAA;CACD,qCAAqC;AACxC,EACa;;;ACjDlB,SAAgB,yBAA0B,SAAwB;CAC9D,OAAO,QAAQ,KAAI,WAAS;EAExB,MAAM,EAAE,SAAS,GAAG,SAAS;EAE7B,OAAO;CACX,CAAC;AACL"}
@@ -1,9 +1,9 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
1
+ const require_oxlintOwnership = require("./oxlintOwnership-7hpdB3d1.cjs");
2
2
  const require_merge = require("./merge-DJQU2y2U.cjs");
3
3
  let _cspell_eslint_plugin_recommended = require("@cspell/eslint-plugin/recommended");
4
- _cspell_eslint_plugin_recommended = require_rolldown_runtime.__toESM(_cspell_eslint_plugin_recommended, 1);
4
+ _cspell_eslint_plugin_recommended = require_oxlintOwnership.__toESM(_cspell_eslint_plugin_recommended, 1);
5
5
  let _eslint_js = require("@eslint/js");
6
- _eslint_js = require_rolldown_runtime.__toESM(_eslint_js, 1);
6
+ _eslint_js = require_oxlintOwnership.__toESM(_eslint_js, 1);
7
7
  //#region src/rules/jsdoc.ts
8
8
  var jsdoc_default = { rules: {
9
9
  "jsdoc/check-param-names": ["error"],
@@ -517,4 +517,4 @@ Object.defineProperty(exports, "stylistic_default", {
517
517
  }
518
518
  });
519
519
 
520
- //# sourceMappingURL=stylistic-Dio0AM2E.cjs.map
520
+ //# sourceMappingURL=stylistic-CoP3MT1Y.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stylistic-Dio0AM2E.cjs","names":[],"sources":["../src/rules/jsdoc.ts","../src/base.ts","../src/rules/core.ts","../src/rules/cspell.ts","../src/rules/importRules.ts","../src/rules/stylistic.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n 'jsdoc/check-param-names': ['error'],\n 'jsdoc/check-tag-names': ['error'],\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param': ['error', {\n enableRestElementFixer: false,\n enableRootFixer: false,\n }],\n 'jsdoc/require-jsdoc': ['off'],\n 'jsdoc/require-param-description': 'off',\n 'jsdoc/require-param-type': ['error'],\n 'jsdoc/require-property-description': 'off',\n 'jsdoc/require-returns': ['error', {\n contexts: ['TSInterfaceDeclaration', 'TSMethodSignature'],\n forceRequireReturn: true,\n exemptedBy: ['inheritdoc', 'watch'],\n }],\n 'jsdoc/require-returns-check': ['error'],\n 'jsdoc/require-returns-description': 'off',\n 'jsdoc/tag-lines': ['error'],\n 'jsdoc/valid-types': 'off',\n 'jsdoc/check-types': ['error'],\n 'jsdoc/no-multi-asterisks': ['error'],\n 'jsdoc/check-alignment': ['error'],\n 'jsdoc/sort-tags': ['error', {\n linesBetween: 1,\n tagSequence: [{\n tags: [\n 'todo',\n 'description',\n 'deprecated',\n 'namespace',\n 'private',\n 'protected',\n 'public',\n 'static',\n 'readonly',\n 'since',\n 'access',\n 'template',\n 'typedef',\n 'class',\n 'augments',\n 'mixes',\n 'extends',\n 'interface',\n 'this',\n 'constructor',\n 'alias',\n 'memberof',\n 'example',\n 'use',\n 'see',\n 'link',\n 'global',\n 'fires',\n 'listens',\n 'type',\n 'param',\n 'property',\n 'yields',\n 'returns',\n 'lends',\n 'override',\n 'todo',\n ],\n }],\n }],\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\nimport cspellESLintPluginRecommended from '@cspell/eslint-plugin/recommended';\nimport js from '@eslint/js';\nimport jsdoc from './rules/jsdoc';\nimport { merge } from './utils/merge';\n\nexport function preConfig () {\n return merge(\n js.configs.recommended as Linter.Config,\n cspellESLintPluginRecommended as Linter.Config\n );\n}\n\nexport function postConfig (): Linter.Config {\n return merge(\n jsdoc,\n {\n languageOptions: {\n ecmaVersion: 2022,\n parserOptions: {\n ecmaVersion: 2022,\n },\n },\n rules: {\n 'jsdoc/require-param': 'off',\n 'jsdoc/require-jsdoc': 'off',\n 'jsdoc/require-returns': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/check-param-names': 'off',\n },\n } satisfies Linter.Config\n );\n}\n","import type { Linter } from 'eslint';\nimport type { Entries } from 'type-fest';\n\n// InToasts is intentionally absent from DS_V1_TO_V2 — ToastV2 replacement not yet exported from DS v1.2.0.\nconst DS_V1_TO_V2_MAP = {\n InBox: 'InContainer',\n InButton: 'InButtonV2',\n InCheckBox: 'InCheckBoxV2',\n InCustomDropDown: 'InDropdownMenu',\n InDataTable: 'InDataTableV2',\n InDatePicker: 'InDatePickerV2',\n InDropDown: 'InSelect',\n InModals: 'InModalV2',\n InMultiDropDown: 'InMultiSelect',\n InSidebar: 'InSidebarV2',\n InSuperInput: 'InRichTextInput',\n InTagsText: 'InChips',\n InTextInput: 'InBasicTextInput',\n InTooltip: 'InTooltipV2',\n} as const;\n\nconst DS_V1_TO_V2 = (Object.entries(DS_V1_TO_V2_MAP) as Entries<typeof DS_V1_TO_V2_MAP>).map(([v1, v2]) => ({\n name: '@useinsider/design-system-vue',\n importNames: [v1],\n message: `It is marked as deprecated. Use '${v2}' instead.` as const,\n} as const));\n\nconst overriddenRules: Linter.RulesRecord = {\n // https://eslint.style/rules/js/function-call-spacing\n 'no-spaced-func': 'off',\n};\n\nexport default {\n rules: {\n ...overriddenRules,\n 'arrow-parens': 'off',\n camelcase: ['error', {\n allow: ['^\\\\$_'],\n properties: 'never',\n }],\n 'comma-dangle': 'off',\n 'consistent-return': ['error'],\n 'class-methods-use-this': 'off',\n curly: ['error', 'all'],\n 'dot-notation': ['error'],\n 'function-paren-newline': 'off',\n 'guard-for-in': 'error',\n 'handle-callback-err': ['error'],\n indent: 'off',\n 'max-len': 'off',\n 'new-cap': ['error'],\n 'no-alert': ['error'],\n 'no-bitwise': ['error', {\n allow: ['~'],\n }],\n 'no-caller': ['error'],\n 'no-case-declarations': ['error'],\n 'no-confusing-arrow': ['error', {\n allowParens: true,\n }],\n 'no-console': ['error'],\n 'no-debugger': ['error'],\n 'no-div-regex': ['error'],\n 'no-dupe-args': ['error'],\n 'no-dupe-keys': ['error'],\n 'no-duplicate-case': ['error'],\n 'no-else-return': ['error'],\n 'no-empty': ['error'],\n 'no-extra-bind': ['error'],\n 'no-extra-boolean-cast': 'error',\n 'no-fallthrough': ['error'],\n 'no-implicit-coercion': ['error', {\n boolean: true,\n number: true,\n string: true,\n }],\n 'implicit-arrow-linebreak': 'off',\n 'no-invalid-regexp': ['error'],\n 'no-iterator': ['error'],\n 'no-mixed-operators': 'off',\n 'no-multi-spaces': 'off',\n 'no-multi-str': ['error'],\n 'no-multiple-empty-lines': 'off',\n 'no-native-reassign': 'error',\n 'no-nested-ternary': ['error'],\n 'no-new': 'off',\n 'no-new-object': ['error'],\n 'no-new-require': ['error'],\n 'no-param-reassign': ['error', {\n props: false,\n }],\n 'no-plusplus': 'off',\n 'no-process-exit': ['error'],\n 'no-promise-executor-return': ['error', {\n allowVoid: true,\n }],\n 'no-return-assign': ['error', 'except-parens'],\n 'no-self-compare': ['error'],\n 'no-sequences': ['error'],\n 'no-shadow': ['error', {\n allow: ['state'],\n }],\n 'no-undef': ['error'],\n 'no-underscore-dangle': 'off',\n 'no-unexpected-multiline': ['error'],\n 'no-unreachable': ['error'],\n 'no-unused-vars': ['error'],\n 'no-use-before-define': 'error',\n 'no-useless-call': ['error'],\n 'no-void': 'off',\n 'no-with': ['error'],\n 'object-curly-newline': 'off',\n 'object-shorthand': ['error', 'always'],\n 'padded-blocks': 'off',\n 'prefer-const': ['error', {\n destructuring: 'all',\n }],\n 'prefer-destructuring': ['error'],\n radix: ['error', 'as-needed'],\n semi: 'off',\n 'space-before-function-paren': 'off',\n 'space-in-parens': 'off',\n strict: ['error', 'never'],\n 'use-isnan': ['error'],\n 'valid-typeof': ['error'],\n 'no-trailing-spaces': 'off',\n 'no-restricted-imports': ['error', {\n paths: DS_V1_TO_V2,\n }],\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n '@cspell/spellchecker': ['error', {\n customWordListFile: './cspell.json',\n }],\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n 'import-x/extensions': ['error', {\n css: 'always',\n js: 'never',\n json: 'always',\n jsx: 'never',\n sass: 'always',\n scss: 'always',\n svg: 'always',\n ts: 'never',\n tsx: 'never',\n vue: 'always',\n }],\n 'import-x/no-cycle': 'off',\n 'import-x/no-unresolved': 'off',\n 'import-x/order': ['error', {\n alphabetize: {\n caseInsensitive: true,\n order: 'asc',\n },\n groups: ['index', 'builtin', 'object', 'type', 'external', 'parent', 'internal', 'sibling'],\n pathGroups: [{\n group: 'internal',\n pattern: '@/**',\n }],\n }],\n 'import-x/prefer-default-export': 'off',\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n '@stylistic/array-bracket-newline': ['error', 'consistent'],\n '@stylistic/array-bracket-spacing': ['error', 'never'],\n '@stylistic/array-element-newline': ['error', 'consistent'],\n '@stylistic/arrow-parens': ['error', 'as-needed'],\n '@stylistic/arrow-spacing': ['error'],\n '@stylistic/brace-style': ['error', '1tbs'],\n '@stylistic/comma-dangle': ['error', {\n arrays: 'always-multiline',\n exports: 'always-multiline',\n functions: 'never',\n imports: 'always-multiline',\n objects: 'always-multiline',\n enums: 'always-multiline',\n generics: 'always-multiline',\n tuples: 'always-multiline',\n }],\n '@stylistic/comma-spacing': ['error'],\n '@stylistic/computed-property-spacing': ['error'],\n '@stylistic/dot-location': ['error', 'property'],\n '@stylistic/eol-last': ['error', 'always'],\n '@stylistic/function-call-argument-newline': ['error', 'consistent'],\n '@stylistic/function-call-spacing': ['error', 'never'],\n '@stylistic/function-paren-newline': ['error', 'consistent'],\n '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],\n '@stylistic/indent': ['error', 4, {\n SwitchCase: 1,\n ignoredNodes: [\n 'PropertyDefinition[decorators]',\n 'TSUnionType',\n ],\n }],\n '@stylistic/key-spacing': ['error'],\n '@stylistic/keyword-spacing': ['error'],\n '@stylistic/linebreak-style': ['error', 'unix'],\n '@stylistic/lines-between-class-members': ['error', 'always', {\n exceptAfterSingleLine: true,\n }],\n '@stylistic/max-len': ['error', 120, {\n ignoreComments: true,\n ignoreRegExpLiterals: true,\n ignoreTrailingComments: true,\n ignoreUrls: true,\n }],\n '@stylistic/max-statements-per-line': ['error', {\n max: 2,\n }],\n '@stylistic/member-delimiter-style': ['error', {\n multiline: {\n requireLast: true,\n },\n singleline: {\n requireLast: false,\n },\n }],\n '@stylistic/multiline-ternary': ['error', 'always-multiline'],\n '@stylistic/new-parens': ['error', 'always'],\n '@stylistic/no-extra-parens': ['error', 'all', {\n allowParensAfterCommentPattern: '@type|@satisfies',\n ignoredNodes: [\n \"ArrowFunctionExpression[body.type='ConditionalExpression']\",\n 'TSUnionType',\n 'TSTypeAnnotation:has(> TSUnionType)',\n 'TSTypeAliasDeclaration:has(> TSUnionType)',\n 'TSIntersectionType',\n 'TSTypeAnnotation:has(> TSIntersectionType)',\n 'TSTypeAliasDeclaration:has(> TSIntersectionType)',\n ],\n nestedBinaryExpressions: false,\n returnAssign: false,\n }],\n '@stylistic/no-extra-semi': ['error'],\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/no-mixed-operators': ['error', {\n allowSamePrecedence: true,\n groups: [\n ['&', '|', '^', '~', '<<', '>>', '>>>'],\n ['==', '!=', '===', '!==', '>', '>=', '<', '<='],\n ['&&', '||'],\n ['in', 'instanceof'],\n ],\n }],\n '@stylistic/no-mixed-spaces-and-tabs': ['error'],\n '@stylistic/no-multi-spaces': ['error'],\n '@stylistic/no-multiple-empty-lines': ['error', {\n max: 1,\n maxEOF: 0,\n maxBOF: 0,\n }],\n '@stylistic/no-trailing-spaces': ['error'],\n '@stylistic/no-whitespace-before-property': ['error'],\n '@stylistic/object-curly-newline': ['error', {\n multiline: true,\n consistent: true,\n }],\n '@stylistic/object-curly-spacing': ['error', 'always'],\n '@stylistic/padded-blocks': ['error', 'never'],\n '@stylistic/quote-props': ['error', 'as-needed'],\n '@stylistic/quotes': ['error', 'single', {\n avoidEscape: true,\n }],\n '@stylistic/rest-spread-spacing': ['error', 'never'],\n '@stylistic/semi': ['error'],\n '@stylistic/semi-spacing': ['error', {\n after: true,\n before: false,\n }],\n '@stylistic/semi-style': ['error', 'last'],\n '@stylistic/space-before-blocks': ['error'],\n '@stylistic/space-before-function-paren': ['error', {\n anonymous: 'always',\n named: 'always',\n }],\n '@stylistic/space-in-parens': ['error', 'never'],\n '@stylistic/space-infix-ops': ['error'],\n '@stylistic/spaced-comment': ['error', 'always', {\n markers: ['/'],\n }],\n '@stylistic/template-curly-spacing': ['error', 'never'],\n '@stylistic/template-tag-spacing': ['error', 'never'],\n '@stylistic/type-annotation-spacing': ['error'],\n '@stylistic/type-generic-spacing': ['error'],\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: '*',\n prev: ['const', 'let', 'var', 'if', 'block-like', 'directive'],\n },\n {\n blankLine: 'always',\n next: [\n 'const',\n 'let',\n 'var',\n 'if',\n 'while',\n 'directive',\n 'throw',\n 'return',\n 'break',\n 'default',\n 'cjs-export',\n 'export',\n 'continue',\n 'iife',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n prev: ['*'],\n next: ['cjs-export', 'export'],\n },\n {\n blankLine: 'any',\n next: ['const', 'let', 'var', 'directive'],\n prev: ['const', 'let', 'var', 'directive'],\n },\n {\n blankLine: 'never',\n next: ['singleline-const', 'singleline-let', 'singleline-var'],\n prev: ['singleline-const', 'singleline-let', 'singleline-var'],\n },\n {\n blankLine: 'always',\n next: ['multiline-block-like'],\n prev: ['*'],\n },\n {\n blankLine: 'always',\n next: ['*'],\n prev: ['multiline-block-like'],\n },\n {\n blankLine: 'any',\n next: ['case'],\n prev: ['case'],\n },\n {\n blankLine: 'any',\n next: ['singleline-const', 'singleline-let', 'singleline-var'],\n prev: ['cjs-import'],\n },\n ],\n },\n} as Linter.Config;\n"],"mappings":";;;;;;;AAEA,IAAA,gBAAe,EACX,OAAO;CACH,2BAA2B,CAAC,OAAO;CACnC,yBAAy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S,CAAC,GAAG,EAChB;CAAA;CACD,qCAAqC,CAAC,SAAS,OAAO;CACtD,mCAAmC,CAAC,SAAS,OAAO;CACpD,sCAAsC,CAAC,OAAO;CAC9C,mCAAmC,CAAC,OAAO;CAC3C,8CAA8C;EAC1C;EACA;GACI,WAAW;GACX,MAAM;GACN,MAAM;IAAC;IAAS;IAAO;IAAO;IAAM;IAAc;GAAW;EAChE;EACD;GACI,WAAW;GACX,MAAM;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACH;GACD,MAAM;EACT;EACD;GACI,WAAW;GACX,MAAM,CAAC,GAAG;GACV,MAAM,CAAC,cAAc,QAAQ;EAChC;EACD;GACI,WAAW;GACX,MAAM;IAAC;IAAS;IAAO;IAAO;GAAW;GACzC,MAAM;IAAC;IAAS;IAAO;IAAO;GAAW;EAC5C;EACD;GACI,WAAW;GACX,MAAM;IAAC;IAAoB;IAAkB;GAAgB;GAC7D,MAAM;IAAC;IAAoB;IAAkB;GAAgB;EAChE;EACD;GACI,WAAW;GACX,MAAM,CAAC,sBAAsB;GAC7B,MAAM,CAAC,GAAG;EACb;EACD;GACI,WAAW;GACX,MAAM,CAAC,GAAG;GACV,MAAM,CAAC,sBAAsB;EAChC;EACD;GACI,WAAW;GACX,MAAM,CAAC,MAAM;GACb,MAAM,CAAC,MAAM;EAChB;EACD;GACI,WAAW;GACX,MAAM;IAAC;IAAoB;IAAkB;GAAgB;GAC7D,MAAM,CAAC,YAAY;EACtB;CACJ;AACJ,EACa"}
1
+ {"version":3,"file":"stylistic-CoP3MT1Y.cjs","names":[],"sources":["../src/rules/jsdoc.ts","../src/base.ts","../src/rules/core.ts","../src/rules/cspell.ts","../src/rules/importRules.ts","../src/rules/stylistic.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n 'jsdoc/check-param-names': ['error'],\n 'jsdoc/check-tag-names': ['error'],\n 'jsdoc/no-undefined-types': 'off',\n 'jsdoc/require-param': ['error', {\n enableRestElementFixer: false,\n enableRootFixer: false,\n }],\n 'jsdoc/require-jsdoc': ['off'],\n 'jsdoc/require-param-description': 'off',\n 'jsdoc/require-param-type': ['error'],\n 'jsdoc/require-property-description': 'off',\n 'jsdoc/require-returns': ['error', {\n contexts: ['TSInterfaceDeclaration', 'TSMethodSignature'],\n forceRequireReturn: true,\n exemptedBy: ['inheritdoc', 'watch'],\n }],\n 'jsdoc/require-returns-check': ['error'],\n 'jsdoc/require-returns-description': 'off',\n 'jsdoc/tag-lines': ['error'],\n 'jsdoc/valid-types': 'off',\n 'jsdoc/check-types': ['error'],\n 'jsdoc/no-multi-asterisks': ['error'],\n 'jsdoc/check-alignment': ['error'],\n 'jsdoc/sort-tags': ['error', {\n linesBetween: 1,\n tagSequence: [{\n tags: [\n 'todo',\n 'description',\n 'deprecated',\n 'namespace',\n 'private',\n 'protected',\n 'public',\n 'static',\n 'readonly',\n 'since',\n 'access',\n 'template',\n 'typedef',\n 'class',\n 'augments',\n 'mixes',\n 'extends',\n 'interface',\n 'this',\n 'constructor',\n 'alias',\n 'memberof',\n 'example',\n 'use',\n 'see',\n 'link',\n 'global',\n 'fires',\n 'listens',\n 'type',\n 'param',\n 'property',\n 'yields',\n 'returns',\n 'lends',\n 'override',\n 'todo',\n ],\n }],\n }],\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\nimport cspellESLintPluginRecommended from '@cspell/eslint-plugin/recommended';\nimport js from '@eslint/js';\nimport jsdoc from './rules/jsdoc';\nimport { merge } from './utils/merge';\n\nexport function preConfig () {\n return merge(\n js.configs.recommended as Linter.Config,\n cspellESLintPluginRecommended as Linter.Config\n );\n}\n\nexport function postConfig (): Linter.Config {\n return merge(\n jsdoc,\n {\n languageOptions: {\n ecmaVersion: 2022,\n parserOptions: {\n ecmaVersion: 2022,\n },\n },\n rules: {\n 'jsdoc/require-param': 'off',\n 'jsdoc/require-jsdoc': 'off',\n 'jsdoc/require-returns': 'off',\n 'jsdoc/require-param-type': 'off',\n 'jsdoc/check-param-names': 'off',\n },\n } satisfies Linter.Config\n );\n}\n","import type { Linter } from 'eslint';\nimport type { Entries } from 'type-fest';\n\n// InToasts is intentionally absent from DS_V1_TO_V2 — ToastV2 replacement not yet exported from DS v1.2.0.\nconst DS_V1_TO_V2_MAP = {\n InBox: 'InContainer',\n InButton: 'InButtonV2',\n InCheckBox: 'InCheckBoxV2',\n InCustomDropDown: 'InDropdownMenu',\n InDataTable: 'InDataTableV2',\n InDatePicker: 'InDatePickerV2',\n InDropDown: 'InSelect',\n InModals: 'InModalV2',\n InMultiDropDown: 'InMultiSelect',\n InSidebar: 'InSidebarV2',\n InSuperInput: 'InRichTextInput',\n InTagsText: 'InChips',\n InTextInput: 'InBasicTextInput',\n InTooltip: 'InTooltipV2',\n} as const;\n\nconst DS_V1_TO_V2 = (Object.entries(DS_V1_TO_V2_MAP) as Entries<typeof DS_V1_TO_V2_MAP>).map(([v1, v2]) => ({\n name: '@useinsider/design-system-vue',\n importNames: [v1],\n message: `It is marked as deprecated. Use '${v2}' instead.` as const,\n} as const));\n\nconst overriddenRules: Linter.RulesRecord = {\n // https://eslint.style/rules/js/function-call-spacing\n 'no-spaced-func': 'off',\n};\n\nexport default {\n rules: {\n ...overriddenRules,\n 'arrow-parens': 'off',\n camelcase: ['error', {\n allow: ['^\\\\$_'],\n properties: 'never',\n }],\n 'comma-dangle': 'off',\n 'consistent-return': ['error'],\n 'class-methods-use-this': 'off',\n curly: ['error', 'all'],\n 'dot-notation': ['error'],\n 'function-paren-newline': 'off',\n 'guard-for-in': 'error',\n 'handle-callback-err': ['error'],\n indent: 'off',\n 'max-len': 'off',\n 'new-cap': ['error'],\n 'no-alert': ['error'],\n 'no-bitwise': ['error', {\n allow: ['~'],\n }],\n 'no-caller': ['error'],\n 'no-case-declarations': ['error'],\n 'no-confusing-arrow': ['error', {\n allowParens: true,\n }],\n 'no-console': ['error'],\n 'no-debugger': ['error'],\n 'no-div-regex': ['error'],\n 'no-dupe-args': ['error'],\n 'no-dupe-keys': ['error'],\n 'no-duplicate-case': ['error'],\n 'no-else-return': ['error'],\n 'no-empty': ['error'],\n 'no-extra-bind': ['error'],\n 'no-extra-boolean-cast': 'error',\n 'no-fallthrough': ['error'],\n 'no-implicit-coercion': ['error', {\n boolean: true,\n number: true,\n string: true,\n }],\n 'implicit-arrow-linebreak': 'off',\n 'no-invalid-regexp': ['error'],\n 'no-iterator': ['error'],\n 'no-mixed-operators': 'off',\n 'no-multi-spaces': 'off',\n 'no-multi-str': ['error'],\n 'no-multiple-empty-lines': 'off',\n 'no-native-reassign': 'error',\n 'no-nested-ternary': ['error'],\n 'no-new': 'off',\n 'no-new-object': ['error'],\n 'no-new-require': ['error'],\n 'no-param-reassign': ['error', {\n props: false,\n }],\n 'no-plusplus': 'off',\n 'no-process-exit': ['error'],\n 'no-promise-executor-return': ['error', {\n allowVoid: true,\n }],\n 'no-return-assign': ['error', 'except-parens'],\n 'no-self-compare': ['error'],\n 'no-sequences': ['error'],\n 'no-shadow': ['error', {\n allow: ['state'],\n }],\n 'no-undef': ['error'],\n 'no-underscore-dangle': 'off',\n 'no-unexpected-multiline': ['error'],\n 'no-unreachable': ['error'],\n 'no-unused-vars': ['error'],\n 'no-use-before-define': 'error',\n 'no-useless-call': ['error'],\n 'no-void': 'off',\n 'no-with': ['error'],\n 'object-curly-newline': 'off',\n 'object-shorthand': ['error', 'always'],\n 'padded-blocks': 'off',\n 'prefer-const': ['error', {\n destructuring: 'all',\n }],\n 'prefer-destructuring': ['error'],\n radix: ['error', 'as-needed'],\n semi: 'off',\n 'space-before-function-paren': 'off',\n 'space-in-parens': 'off',\n strict: ['error', 'never'],\n 'use-isnan': ['error'],\n 'valid-typeof': ['error'],\n 'no-trailing-spaces': 'off',\n 'no-restricted-imports': ['error', {\n paths: DS_V1_TO_V2,\n }],\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n '@cspell/spellchecker': ['error', {\n customWordListFile: './cspell.json',\n }],\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n 'import-x/extensions': ['error', {\n css: 'always',\n js: 'never',\n json: 'always',\n jsx: 'never',\n sass: 'always',\n scss: 'always',\n svg: 'always',\n ts: 'never',\n tsx: 'never',\n vue: 'always',\n }],\n 'import-x/no-cycle': 'off',\n 'import-x/no-unresolved': 'off',\n 'import-x/order': ['error', {\n alphabetize: {\n caseInsensitive: true,\n order: 'asc',\n },\n groups: ['index', 'builtin', 'object', 'type', 'external', 'parent', 'internal', 'sibling'],\n pathGroups: [{\n group: 'internal',\n pattern: '@/**',\n }],\n }],\n 'import-x/prefer-default-export': 'off',\n },\n} as Linter.Config;\n","import type { Linter } from 'eslint';\n\nexport default {\n rules: {\n '@stylistic/array-bracket-newline': ['error', 'consistent'],\n '@stylistic/array-bracket-spacing': ['error', 'never'],\n '@stylistic/array-element-newline': ['error', 'consistent'],\n '@stylistic/arrow-parens': ['error', 'as-needed'],\n '@stylistic/arrow-spacing': ['error'],\n '@stylistic/brace-style': ['error', '1tbs'],\n '@stylistic/comma-dangle': ['error', {\n arrays: 'always-multiline',\n exports: 'always-multiline',\n functions: 'never',\n imports: 'always-multiline',\n objects: 'always-multiline',\n enums: 'always-multiline',\n generics: 'always-multiline',\n tuples: 'always-multiline',\n }],\n '@stylistic/comma-spacing': ['error'],\n '@stylistic/computed-property-spacing': ['error'],\n '@stylistic/dot-location': ['error', 'property'],\n '@stylistic/eol-last': ['error', 'always'],\n '@stylistic/function-call-argument-newline': ['error', 'consistent'],\n '@stylistic/function-call-spacing': ['error', 'never'],\n '@stylistic/function-paren-newline': ['error', 'consistent'],\n '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],\n '@stylistic/indent': ['error', 4, {\n SwitchCase: 1,\n ignoredNodes: [\n 'PropertyDefinition[decorators]',\n 'TSUnionType',\n ],\n }],\n '@stylistic/key-spacing': ['error'],\n '@stylistic/keyword-spacing': ['error'],\n '@stylistic/linebreak-style': ['error', 'unix'],\n '@stylistic/lines-between-class-members': ['error', 'always', {\n exceptAfterSingleLine: true,\n }],\n '@stylistic/max-len': ['error', 120, {\n ignoreComments: true,\n ignoreRegExpLiterals: true,\n ignoreTrailingComments: true,\n ignoreUrls: true,\n }],\n '@stylistic/max-statements-per-line': ['error', {\n max: 2,\n }],\n '@stylistic/member-delimiter-style': ['error', {\n multiline: {\n requireLast: true,\n },\n singleline: {\n requireLast: false,\n },\n }],\n '@stylistic/multiline-ternary': ['error', 'always-multiline'],\n '@stylistic/new-parens': ['error', 'always'],\n '@stylistic/no-extra-parens': ['error', 'all', {\n allowParensAfterCommentPattern: '@type|@satisfies',\n ignoredNodes: [\n \"ArrowFunctionExpression[body.type='ConditionalExpression']\",\n 'TSUnionType',\n 'TSTypeAnnotation:has(> TSUnionType)',\n 'TSTypeAliasDeclaration:has(> TSUnionType)',\n 'TSIntersectionType',\n 'TSTypeAnnotation:has(> TSIntersectionType)',\n 'TSTypeAliasDeclaration:has(> TSIntersectionType)',\n ],\n nestedBinaryExpressions: false,\n returnAssign: false,\n }],\n '@stylistic/no-extra-semi': ['error'],\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/no-mixed-operators': ['error', {\n allowSamePrecedence: true,\n groups: [\n ['&', '|', '^', '~', '<<', '>>', '>>>'],\n ['==', '!=', '===', '!==', '>', '>=', '<', '<='],\n ['&&', '||'],\n ['in', 'instanceof'],\n ],\n }],\n '@stylistic/no-mixed-spaces-and-tabs': ['error'],\n '@stylistic/no-multi-spaces': ['error'],\n '@stylistic/no-multiple-empty-lines': ['error', {\n max: 1,\n maxEOF: 0,\n maxBOF: 0,\n }],\n '@stylistic/no-trailing-spaces': ['error'],\n '@stylistic/no-whitespace-before-property': ['error'],\n '@stylistic/object-curly-newline': ['error', {\n multiline: true,\n consistent: true,\n }],\n '@stylistic/object-curly-spacing': ['error', 'always'],\n '@stylistic/padded-blocks': ['error', 'never'],\n '@stylistic/quote-props': ['error', 'as-needed'],\n '@stylistic/quotes': ['error', 'single', {\n avoidEscape: true,\n }],\n '@stylistic/rest-spread-spacing': ['error', 'never'],\n '@stylistic/semi': ['error'],\n '@stylistic/semi-spacing': ['error', {\n after: true,\n before: false,\n }],\n '@stylistic/semi-style': ['error', 'last'],\n '@stylistic/space-before-blocks': ['error'],\n '@stylistic/space-before-function-paren': ['error', {\n anonymous: 'always',\n named: 'always',\n }],\n '@stylistic/space-in-parens': ['error', 'never'],\n '@stylistic/space-infix-ops': ['error'],\n '@stylistic/spaced-comment': ['error', 'always', {\n markers: ['/'],\n }],\n '@stylistic/template-curly-spacing': ['error', 'never'],\n '@stylistic/template-tag-spacing': ['error', 'never'],\n '@stylistic/type-annotation-spacing': ['error'],\n '@stylistic/type-generic-spacing': ['error'],\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: '*',\n prev: ['const', 'let', 'var', 'if', 'block-like', 'directive'],\n },\n {\n blankLine: 'always',\n next: [\n 'const',\n 'let',\n 'var',\n 'if',\n 'while',\n 'directive',\n 'throw',\n 'return',\n 'break',\n 'default',\n 'cjs-export',\n 'export',\n 'continue',\n 'iife',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n prev: ['*'],\n next: ['cjs-export', 'export'],\n },\n {\n blankLine: 'any',\n next: ['const', 'let', 'var', 'directive'],\n prev: ['const', 'let', 'var', 'directive'],\n },\n {\n blankLine: 'never',\n next: ['singleline-const', 'singleline-let', 'singleline-var'],\n prev: ['singleline-const', 'singleline-let', 'singleline-var'],\n },\n {\n blankLine: 'always',\n next: ['multiline-block-like'],\n prev: ['*'],\n },\n {\n blankLine: 'always',\n next: ['*'],\n prev: ['multiline-block-like'],\n },\n {\n blankLine: 'any',\n next: ['case'],\n prev: ['case'],\n },\n {\n blankLine: 'any',\n next: ['singleline-const', 'singleline-let', 'singleline-var'],\n prev: ['cjs-import'],\n },\n ],\n },\n} as Linter.Config;\n"],"mappings":";;;;;;;AAEA,IAAA,gBAAe,EACX,OAAO;CACH,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