@ariestools/eslint-config-flat 8.6.11
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.
- package/LICENSE +165 -0
- package/README.md +150 -0
- package/dist/neutral/core/index.d.ts +5 -0
- package/dist/neutral/core/index.d.ts.map +1 -0
- package/dist/neutral/ignores.d.ts +2 -0
- package/dist/neutral/ignores.d.ts.map +1 -0
- package/dist/neutral/import/index.d.ts +3 -0
- package/dist/neutral/import/index.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +20 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +1539 -0
- package/dist/neutral/index.mjs.map +7 -0
- package/dist/neutral/json/index.d.ts +5 -0
- package/dist/neutral/json/index.d.ts.map +1 -0
- package/dist/neutral/markdown/index.d.ts +3 -0
- package/dist/neutral/markdown/index.d.ts.map +1 -0
- package/dist/neutral/rules/consistency.d.ts +3 -0
- package/dist/neutral/rules/consistency.d.ts.map +1 -0
- package/dist/neutral/rules/correctness.d.ts +3 -0
- package/dist/neutral/rules/correctness.d.ts.map +1 -0
- package/dist/neutral/rules/index.d.ts +6 -0
- package/dist/neutral/rules/index.d.ts.map +1 -0
- package/dist/neutral/shared.d.ts +13 -0
- package/dist/neutral/shared.d.ts.map +1 -0
- package/dist/neutral/tiers/conflicts.d.ts +22 -0
- package/dist/neutral/tiers/conflicts.d.ts.map +1 -0
- package/dist/neutral/tiers/index.d.ts +48 -0
- package/dist/neutral/tiers/index.d.ts.map +1 -0
- package/dist/neutral/tiers/opinionated.d.ts +24 -0
- package/dist/neutral/tiers/opinionated.d.ts.map +1 -0
- package/dist/neutral/tiers/plugin-rules.d.ts +8 -0
- package/dist/neutral/tiers/plugin-rules.d.ts.map +1 -0
- package/dist/neutral/tiers/recommendedConfig.d.ts +16 -0
- package/dist/neutral/tiers/recommendedConfig.d.ts.map +1 -0
- package/dist/neutral/tiers/rule-catalog/index.d.ts +13 -0
- package/dist/neutral/tiers/rule-catalog/index.d.ts.map +1 -0
- package/dist/neutral/tiers/rule-catalog/managed-rules.d.ts +4 -0
- package/dist/neutral/tiers/rule-catalog/managed-rules.d.ts.map +1 -0
- package/dist/neutral/tiers/rule-catalog/type-checked-rules.d.ts +5 -0
- package/dist/neutral/tiers/rule-catalog/type-checked-rules.d.ts.map +1 -0
- package/dist/neutral/tiers/rule-catalog/types.d.ts +14 -0
- package/dist/neutral/tiers/rule-catalog/types.d.ts.map +1 -0
- package/dist/neutral/tiers/tier-builder.d.ts +6 -0
- package/dist/neutral/tiers/tier-builder.d.ts.map +1 -0
- package/dist/neutral/typescript/index.d.ts +9 -0
- package/dist/neutral/typescript/index.d.ts.map +1 -0
- package/dist/neutral/unicorn/index.d.ts +18 -0
- package/dist/neutral/unicorn/index.d.ts.map +1 -0
- package/dist/neutral/workspaces/index.d.ts +3 -0
- package/dist/neutral/workspaces/index.d.ts.map +1 -0
- package/dist/node/core/index.d.ts +5 -0
- package/dist/node/core/index.d.ts.map +1 -0
- package/dist/node/ignores.d.ts +2 -0
- package/dist/node/ignores.d.ts.map +1 -0
- package/dist/node/import/index.d.ts +3 -0
- package/dist/node/import/index.d.ts.map +1 -0
- package/dist/node/index.d.ts +20 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.mjs +1539 -0
- package/dist/node/index.mjs.map +7 -0
- package/dist/node/json/index.d.ts +5 -0
- package/dist/node/json/index.d.ts.map +1 -0
- package/dist/node/markdown/index.d.ts +3 -0
- package/dist/node/markdown/index.d.ts.map +1 -0
- package/dist/node/rules/consistency.d.ts +3 -0
- package/dist/node/rules/consistency.d.ts.map +1 -0
- package/dist/node/rules/correctness.d.ts +3 -0
- package/dist/node/rules/correctness.d.ts.map +1 -0
- package/dist/node/rules/index.d.ts +6 -0
- package/dist/node/rules/index.d.ts.map +1 -0
- package/dist/node/shared.d.ts +13 -0
- package/dist/node/shared.d.ts.map +1 -0
- package/dist/node/tiers/conflicts.d.ts +22 -0
- package/dist/node/tiers/conflicts.d.ts.map +1 -0
- package/dist/node/tiers/index.d.ts +48 -0
- package/dist/node/tiers/index.d.ts.map +1 -0
- package/dist/node/tiers/opinionated.d.ts +24 -0
- package/dist/node/tiers/opinionated.d.ts.map +1 -0
- package/dist/node/tiers/plugin-rules.d.ts +8 -0
- package/dist/node/tiers/plugin-rules.d.ts.map +1 -0
- package/dist/node/tiers/recommendedConfig.d.ts +16 -0
- package/dist/node/tiers/recommendedConfig.d.ts.map +1 -0
- package/dist/node/tiers/rule-catalog/index.d.ts +13 -0
- package/dist/node/tiers/rule-catalog/index.d.ts.map +1 -0
- package/dist/node/tiers/rule-catalog/managed-rules.d.ts +4 -0
- package/dist/node/tiers/rule-catalog/managed-rules.d.ts.map +1 -0
- package/dist/node/tiers/rule-catalog/type-checked-rules.d.ts +5 -0
- package/dist/node/tiers/rule-catalog/type-checked-rules.d.ts.map +1 -0
- package/dist/node/tiers/rule-catalog/types.d.ts +14 -0
- package/dist/node/tiers/rule-catalog/types.d.ts.map +1 -0
- package/dist/node/tiers/tier-builder.d.ts +6 -0
- package/dist/node/tiers/tier-builder.d.ts.map +1 -0
- package/dist/node/typescript/index.d.ts +9 -0
- package/dist/node/typescript/index.d.ts.map +1 -0
- package/dist/node/unicorn/index.d.ts +18 -0
- package/dist/node/unicorn/index.d.ts.map +1 -0
- package/dist/node/workspaces/index.d.ts +3 -0
- package/dist/node/workspaces/index.d.ts.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,1539 @@
|
|
|
1
|
+
// src/json/index.ts
|
|
2
|
+
import json from "@eslint/json";
|
|
3
|
+
|
|
4
|
+
// src/ignores.ts
|
|
5
|
+
var ignores = [
|
|
6
|
+
".eslintcache",
|
|
7
|
+
".github",
|
|
8
|
+
".husky",
|
|
9
|
+
".jest",
|
|
10
|
+
".next",
|
|
11
|
+
".vscode",
|
|
12
|
+
".yarn",
|
|
13
|
+
"**/dist",
|
|
14
|
+
"**/docs",
|
|
15
|
+
"**/node_modules",
|
|
16
|
+
"coverage",
|
|
17
|
+
"cypress",
|
|
18
|
+
"public",
|
|
19
|
+
"storybook-static",
|
|
20
|
+
"tmp",
|
|
21
|
+
"yarn-error.log",
|
|
22
|
+
"yarn.lock"
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
// src/json/index.ts
|
|
26
|
+
var jsonConfig = {
|
|
27
|
+
ignores,
|
|
28
|
+
files: ["**/*.json"],
|
|
29
|
+
plugins: { json },
|
|
30
|
+
language: "json/json",
|
|
31
|
+
rules: { "json/no-duplicate-keys": ["error"] }
|
|
32
|
+
};
|
|
33
|
+
var jsoncConfig = {
|
|
34
|
+
ignores,
|
|
35
|
+
files: ["**/*.jsonc"],
|
|
36
|
+
plugins: { json },
|
|
37
|
+
language: "json/jsonc",
|
|
38
|
+
rules: { "json/no-duplicate-keys": ["error"] }
|
|
39
|
+
};
|
|
40
|
+
var json5Config = {
|
|
41
|
+
ignores,
|
|
42
|
+
files: ["**/*.json5"],
|
|
43
|
+
plugins: { json },
|
|
44
|
+
language: "json/json5",
|
|
45
|
+
rules: { "json/no-duplicate-keys": ["error"] }
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/markdown/index.ts
|
|
49
|
+
import markdown from "@eslint/markdown";
|
|
50
|
+
|
|
51
|
+
// src/shared.ts
|
|
52
|
+
import tsParser from "@typescript-eslint/parser";
|
|
53
|
+
var scriptFiles = [
|
|
54
|
+
"**/*.ts",
|
|
55
|
+
"**/*.tsx",
|
|
56
|
+
"**/*.mts",
|
|
57
|
+
"**/*.cts",
|
|
58
|
+
"**/*.js",
|
|
59
|
+
"**/*.jsx",
|
|
60
|
+
"**/*.cjs",
|
|
61
|
+
"**/*.mjs",
|
|
62
|
+
"**/*.d.ts",
|
|
63
|
+
"**/*.d.tsx",
|
|
64
|
+
"**/*.d.jsx",
|
|
65
|
+
"**/*.d.mts",
|
|
66
|
+
"**/*.d.cts"
|
|
67
|
+
];
|
|
68
|
+
var scriptLanguageOptions = {
|
|
69
|
+
ecmaVersion: "latest",
|
|
70
|
+
parser: tsParser,
|
|
71
|
+
parserOptions: { ecmaFeatures: { jsx: true } },
|
|
72
|
+
sourceType: "module"
|
|
73
|
+
};
|
|
74
|
+
function currentWorkingDirectory() {
|
|
75
|
+
return globalThis.process?.cwd?.();
|
|
76
|
+
}
|
|
77
|
+
var tsconfigRootDir = currentWorkingDirectory();
|
|
78
|
+
var typeCheckedParserOptions = {
|
|
79
|
+
...scriptLanguageOptions.parserOptions,
|
|
80
|
+
projectService: true
|
|
81
|
+
};
|
|
82
|
+
if (tsconfigRootDir !== void 0) {
|
|
83
|
+
typeCheckedParserOptions.tsconfigRootDir = tsconfigRootDir;
|
|
84
|
+
}
|
|
85
|
+
var typeCheckedLanguageOptions = {
|
|
86
|
+
...scriptLanguageOptions,
|
|
87
|
+
parserOptions: typeCheckedParserOptions
|
|
88
|
+
};
|
|
89
|
+
function unique(values) {
|
|
90
|
+
return [...new Set(values.filter((value) => value !== void 0))];
|
|
91
|
+
}
|
|
92
|
+
function mergeLanguageOptions(base, next) {
|
|
93
|
+
if (!base) return next;
|
|
94
|
+
if (!next) return base;
|
|
95
|
+
return {
|
|
96
|
+
...base,
|
|
97
|
+
...next,
|
|
98
|
+
globals: {
|
|
99
|
+
...base.globals,
|
|
100
|
+
...next.globals
|
|
101
|
+
},
|
|
102
|
+
parserOptions: {
|
|
103
|
+
...base.parserOptions,
|
|
104
|
+
...next.parserOptions
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function scopeConfig(config2, {
|
|
109
|
+
files,
|
|
110
|
+
languageOptions
|
|
111
|
+
} = {}) {
|
|
112
|
+
const merged = mergeLanguageOptions(languageOptions, config2.languageOptions);
|
|
113
|
+
const result = {
|
|
114
|
+
...config2,
|
|
115
|
+
files: files ?? config2.files,
|
|
116
|
+
ignores: unique([...config2.ignores ?? [], ...ignores])
|
|
117
|
+
};
|
|
118
|
+
if (merged) {
|
|
119
|
+
result.languageOptions = merged;
|
|
120
|
+
}
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
function scopeConfigs(configs, options = {}) {
|
|
124
|
+
return (Array.isArray(configs) ? configs : [configs]).map((config2) => scopeConfig(config2, options));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// src/markdown/index.ts
|
|
128
|
+
var markdownFiles = ["**/*.md"];
|
|
129
|
+
var markdownConfig = [
|
|
130
|
+
...scopeConfigs(markdown.configs.recommended),
|
|
131
|
+
scopeConfig({ rules: { "markdown/fenced-code-language": "off" } }, { files: markdownFiles })
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
// src/core/index.ts
|
|
135
|
+
import js from "@eslint/js";
|
|
136
|
+
|
|
137
|
+
// src/rules/consistency.ts
|
|
138
|
+
var consistencyRulesConfig = {
|
|
139
|
+
ignores,
|
|
140
|
+
rules: {
|
|
141
|
+
"complexity": ["error", 18],
|
|
142
|
+
"max-depth": ["error", 6],
|
|
143
|
+
"max-lines": [
|
|
144
|
+
"error",
|
|
145
|
+
{
|
|
146
|
+
max: 512,
|
|
147
|
+
skipBlankLines: true
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"array-element-newline": ["warn", "consistent"],
|
|
151
|
+
// Owned by max-nested-callbacks — measures callback nesting, not call depth
|
|
152
|
+
"max-nested-callbacks": ["error", 6],
|
|
153
|
+
"max-statements": ["error", 32],
|
|
154
|
+
"no-tabs": ["error"]
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/rules/correctness.ts
|
|
159
|
+
var restrictedImportPaths = [
|
|
160
|
+
"./index.ts",
|
|
161
|
+
"../index.ts",
|
|
162
|
+
"../../index.ts",
|
|
163
|
+
"../../../index.ts",
|
|
164
|
+
"../../../../index.ts",
|
|
165
|
+
"../../../../../index.ts",
|
|
166
|
+
"../../../../../../index.ts",
|
|
167
|
+
"../../../../../../../index.ts"
|
|
168
|
+
];
|
|
169
|
+
var correctnessRulesConfig = {
|
|
170
|
+
ignores,
|
|
171
|
+
rules: {
|
|
172
|
+
// Owned by @typescript-eslint/no-unused-vars
|
|
173
|
+
"no-unused-vars": "off",
|
|
174
|
+
// Owned by unicorn/escape-case
|
|
175
|
+
"no-useless-escape": "off",
|
|
176
|
+
// Owned by unicorn/prefer-spread
|
|
177
|
+
"prefer-spread": "off",
|
|
178
|
+
"no-restricted-imports": [
|
|
179
|
+
"error",
|
|
180
|
+
{ paths: restrictedImportPaths }
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
// src/rules/index.ts
|
|
186
|
+
var restrictedImportPaths2 = [
|
|
187
|
+
"./index.ts",
|
|
188
|
+
"../index.ts",
|
|
189
|
+
"../../index.ts",
|
|
190
|
+
"../../../index.ts",
|
|
191
|
+
"../../../../index.ts",
|
|
192
|
+
"../../../../../index.ts",
|
|
193
|
+
"../../../../../../index.ts",
|
|
194
|
+
"../../../../../../../index.ts"
|
|
195
|
+
];
|
|
196
|
+
var restrictedSrcImportPatterns = [
|
|
197
|
+
{
|
|
198
|
+
group: [
|
|
199
|
+
"**/src/**",
|
|
200
|
+
"**/src",
|
|
201
|
+
"src/**"
|
|
202
|
+
],
|
|
203
|
+
message: "Do not import from another package's src folder. Import the package by its public entry point instead."
|
|
204
|
+
}
|
|
205
|
+
];
|
|
206
|
+
var rulesConfig = {
|
|
207
|
+
ignores,
|
|
208
|
+
rules: {
|
|
209
|
+
...correctnessRulesConfig.rules,
|
|
210
|
+
...consistencyRulesConfig.rules
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
var srcImportsConfig = {
|
|
214
|
+
files: scriptFiles.map((pattern) => `**/src/${pattern}`),
|
|
215
|
+
ignores,
|
|
216
|
+
rules: {
|
|
217
|
+
"no-restricted-imports": [
|
|
218
|
+
"error",
|
|
219
|
+
{
|
|
220
|
+
paths: restrictedImportPaths2,
|
|
221
|
+
patterns: restrictedSrcImportPatterns
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// src/unicorn/index.ts
|
|
228
|
+
import unicornPlugin from "eslint-plugin-unicorn";
|
|
229
|
+
var compareStrings = (left, right) => left.localeCompare(right);
|
|
230
|
+
var unicornRecommendedRules = unicornPlugin.configs.recommended.rules ?? {};
|
|
231
|
+
var unicornUnopinionatedConfig = unicornPlugin.configs.unopinionated;
|
|
232
|
+
var unicornUnopinionatedRules = unicornUnopinionatedConfig.rules ?? {};
|
|
233
|
+
var unicornOpinionatedRules = Object.entries(unicornRecommendedRules).filter(([rule2, severity]) => severity !== "off" && unicornUnopinionatedRules[rule2] === "off").map(([rule2]) => rule2).toSorted(compareStrings);
|
|
234
|
+
var unicornV66MigrationQueue = [
|
|
235
|
+
"unicorn/class-reference-in-static-methods",
|
|
236
|
+
"unicorn/comment-content",
|
|
237
|
+
"unicorn/consistent-export-decorator-position",
|
|
238
|
+
"unicorn/consistent-optional-chaining",
|
|
239
|
+
"unicorn/explicit-timer-delay",
|
|
240
|
+
"unicorn/no-array-reverse",
|
|
241
|
+
"unicorn/no-array-sort",
|
|
242
|
+
"unicorn/no-break-in-nested-loop",
|
|
243
|
+
"unicorn/no-computed-property-existence-check",
|
|
244
|
+
"unicorn/no-confusing-array-with",
|
|
245
|
+
"unicorn/no-declarations-before-early-exit",
|
|
246
|
+
"unicorn/no-duplicate-loops",
|
|
247
|
+
"unicorn/no-error-property-assignment",
|
|
248
|
+
"unicorn/no-for-each",
|
|
249
|
+
"unicorn/no-global-object-property-assignment",
|
|
250
|
+
"unicorn/no-incorrect-template-string-interpolation",
|
|
251
|
+
"unicorn/no-invalid-argument-count",
|
|
252
|
+
"unicorn/no-mismatched-map-key",
|
|
253
|
+
"unicorn/no-negated-array-predicate",
|
|
254
|
+
"unicorn/no-negated-comparison",
|
|
255
|
+
"unicorn/no-object-methods-with-collections",
|
|
256
|
+
"unicorn/no-optional-chaining-on-undeclared-variable",
|
|
257
|
+
"unicorn/no-redundant-comparison",
|
|
258
|
+
"unicorn/no-return-array-push",
|
|
259
|
+
"unicorn/no-subtraction-comparison",
|
|
260
|
+
"unicorn/no-top-level-side-effects",
|
|
261
|
+
"unicorn/no-undeclared-class-members",
|
|
262
|
+
"unicorn/no-unnecessary-global-this",
|
|
263
|
+
"unicorn/no-unnecessary-splice",
|
|
264
|
+
"unicorn/no-unreadable-new-expression",
|
|
265
|
+
"unicorn/no-unreadable-object-destructuring",
|
|
266
|
+
"unicorn/no-unsafe-buffer-conversion",
|
|
267
|
+
"unicorn/no-unsafe-property-key",
|
|
268
|
+
"unicorn/no-unsafe-string-replacement",
|
|
269
|
+
"unicorn/no-useless-boolean-cast",
|
|
270
|
+
"unicorn/no-useless-concat",
|
|
271
|
+
"unicorn/no-useless-else",
|
|
272
|
+
"unicorn/no-useless-recursion",
|
|
273
|
+
"unicorn/no-useless-template-literals",
|
|
274
|
+
"unicorn/prefer-add-event-listener-options",
|
|
275
|
+
"unicorn/prefer-array-from-map",
|
|
276
|
+
"unicorn/prefer-await",
|
|
277
|
+
"unicorn/prefer-direct-iteration",
|
|
278
|
+
"unicorn/prefer-early-return",
|
|
279
|
+
"unicorn/prefer-global-number-constants",
|
|
280
|
+
"unicorn/prefer-identifier-import-export-specifiers",
|
|
281
|
+
"unicorn/prefer-iterable-in-constructor",
|
|
282
|
+
"unicorn/prefer-iterator-to-array",
|
|
283
|
+
"unicorn/prefer-location-assign",
|
|
284
|
+
"unicorn/prefer-minimal-ternary",
|
|
285
|
+
"unicorn/prefer-number-coercion",
|
|
286
|
+
"unicorn/prefer-number-is-safe-integer",
|
|
287
|
+
"unicorn/prefer-object-define-properties",
|
|
288
|
+
"unicorn/prefer-object-destructuring-defaults",
|
|
289
|
+
"unicorn/prefer-object-iterable-methods",
|
|
290
|
+
"unicorn/prefer-path2d",
|
|
291
|
+
"unicorn/prefer-private-class-fields",
|
|
292
|
+
"unicorn/prefer-scoped-selector",
|
|
293
|
+
"unicorn/prefer-short-arrow-method",
|
|
294
|
+
"unicorn/prefer-simple-sort-comparator",
|
|
295
|
+
"unicorn/prefer-single-array-predicate",
|
|
296
|
+
"unicorn/prefer-single-object-destructuring",
|
|
297
|
+
"unicorn/prefer-smaller-scope",
|
|
298
|
+
"unicorn/prefer-type-literal-last",
|
|
299
|
+
"unicorn/prefer-uint8array-base64",
|
|
300
|
+
"unicorn/prefer-unicode-code-point-escapes",
|
|
301
|
+
"unicorn/prefer-url-href",
|
|
302
|
+
"unicorn/require-proxy-trap-boolean-return"
|
|
303
|
+
];
|
|
304
|
+
var unicornGloballyDisabledRules = [
|
|
305
|
+
"unicorn/consistent-boolean-name",
|
|
306
|
+
"unicorn/require-array-sort-compare"
|
|
307
|
+
];
|
|
308
|
+
var unicornGloballyDisabledRuleSet = new Set(unicornGloballyDisabledRules);
|
|
309
|
+
var unicornV67MigrationQueue = [
|
|
310
|
+
"unicorn/logical-assignment-operators",
|
|
311
|
+
"unicorn/no-array-splice",
|
|
312
|
+
"unicorn/no-non-function-verb-prefix",
|
|
313
|
+
"unicorn/no-top-level-assignment-in-function",
|
|
314
|
+
"unicorn/no-uncalled-method",
|
|
315
|
+
"unicorn/no-unreadable-for-of-expression",
|
|
316
|
+
"unicorn/no-useless-coercion",
|
|
317
|
+
"unicorn/no-useless-continue",
|
|
318
|
+
"unicorn/no-useless-override",
|
|
319
|
+
"unicorn/operator-assignment",
|
|
320
|
+
"unicorn/prefer-array-slice",
|
|
321
|
+
"unicorn/prefer-else-if",
|
|
322
|
+
"unicorn/prefer-has-check",
|
|
323
|
+
"unicorn/prefer-map-from-entries"
|
|
324
|
+
];
|
|
325
|
+
var unicornV69MigrationQueue = [
|
|
326
|
+
"unicorn/consistent-conditional-object-spread",
|
|
327
|
+
"unicorn/consistent-tuple-labels",
|
|
328
|
+
"unicorn/default-export-style",
|
|
329
|
+
"unicorn/no-accidental-bitwise-operator",
|
|
330
|
+
"unicorn/no-array-concat-in-loop",
|
|
331
|
+
"unicorn/no-array-sort-for-min-max",
|
|
332
|
+
"unicorn/no-boolean-sort-comparator",
|
|
333
|
+
"unicorn/no-chained-comparison",
|
|
334
|
+
"unicorn/no-collection-bracket-access",
|
|
335
|
+
"unicorn/no-constant-zero-expression",
|
|
336
|
+
"unicorn/no-double-comparison",
|
|
337
|
+
"unicorn/no-duplicate-if-branches",
|
|
338
|
+
"unicorn/no-duplicate-logical-operands",
|
|
339
|
+
"unicorn/no-impossible-length-comparison",
|
|
340
|
+
"unicorn/no-invalid-character-comparison",
|
|
341
|
+
"unicorn/no-invalid-well-known-symbol-methods",
|
|
342
|
+
"unicorn/no-late-event-control",
|
|
343
|
+
"unicorn/no-loop-iterable-mutation",
|
|
344
|
+
"unicorn/no-misrefactored-assignment",
|
|
345
|
+
"unicorn/no-nonstandard-builtin-properties",
|
|
346
|
+
"unicorn/no-selector-as-dom-name",
|
|
347
|
+
"unicorn/no-unnecessary-boolean-comparison",
|
|
348
|
+
"unicorn/no-useless-compound-assignment",
|
|
349
|
+
"unicorn/no-useless-delete-check",
|
|
350
|
+
"unicorn/no-useless-logical-operand",
|
|
351
|
+
"unicorn/no-xor-as-exponentiation",
|
|
352
|
+
"unicorn/prefer-abort-signal-timeout",
|
|
353
|
+
"unicorn/prefer-aggregate-error",
|
|
354
|
+
"unicorn/prefer-array-from-async",
|
|
355
|
+
"unicorn/prefer-array-iterable-methods",
|
|
356
|
+
"unicorn/prefer-boolean-return",
|
|
357
|
+
"unicorn/prefer-continue",
|
|
358
|
+
"unicorn/prefer-dom-node-replace-children",
|
|
359
|
+
"unicorn/prefer-flat-math-min-max",
|
|
360
|
+
"unicorn/prefer-hoisting-branch-code",
|
|
361
|
+
"unicorn/prefer-math-constants",
|
|
362
|
+
"unicorn/prefer-observer-apis",
|
|
363
|
+
"unicorn/prefer-promise-try",
|
|
364
|
+
"unicorn/prefer-promise-with-resolvers",
|
|
365
|
+
"unicorn/prefer-set-methods",
|
|
366
|
+
"unicorn/prefer-single-replace",
|
|
367
|
+
"unicorn/prefer-toggle-attribute",
|
|
368
|
+
"unicorn/prefer-unary-minus",
|
|
369
|
+
"unicorn/prefer-url-can-parse",
|
|
370
|
+
"unicorn/prefer-url-search-parameters",
|
|
371
|
+
"unicorn/prefer-while-loop-condition"
|
|
372
|
+
];
|
|
373
|
+
var unicornV71MigrationQueue = [
|
|
374
|
+
"unicorn/no-async-promise-finally",
|
|
375
|
+
"unicorn/no-unnecessary-array-flat-map",
|
|
376
|
+
"unicorn/no-unnecessary-fetch-options",
|
|
377
|
+
"unicorn/no-unsafe-promise-all-settled-values",
|
|
378
|
+
"unicorn/prefer-abort-signal-any",
|
|
379
|
+
"unicorn/prefer-array-from-range",
|
|
380
|
+
"unicorn/prefer-block-statement-over-iife",
|
|
381
|
+
"unicorn/prefer-group-by",
|
|
382
|
+
"unicorn/prefer-iterator-helpers",
|
|
383
|
+
"unicorn/prefer-simplified-conditions"
|
|
384
|
+
];
|
|
385
|
+
var unicornV71MigrationRuleSet = new Set(unicornV71MigrationQueue);
|
|
386
|
+
function isEnabledOpinionatedRule(rule2, tier) {
|
|
387
|
+
if (unicornGloballyDisabledRuleSet.has(rule2) || unicornV71MigrationRuleSet.has(rule2)) {
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
390
|
+
if (tier < 4) {
|
|
391
|
+
return !unicornV67MigrationQueue.includes(rule2) && !unicornV69MigrationQueue.includes(rule2);
|
|
392
|
+
}
|
|
393
|
+
return true;
|
|
394
|
+
}
|
|
395
|
+
function unicornOpinionatedRulesForTier(tier) {
|
|
396
|
+
return unicornOpinionatedRules.filter((rule2) => isEnabledOpinionatedRule(rule2, tier));
|
|
397
|
+
}
|
|
398
|
+
function unicornOpinionatedRuleEntries(severity, tier = 4) {
|
|
399
|
+
return Object.fromEntries(unicornOpinionatedRulesForTier(tier).map((rule2) => [rule2, severity]));
|
|
400
|
+
}
|
|
401
|
+
var unicornExperimentalMigrationQueue = unicornV67MigrationQueue;
|
|
402
|
+
var unicornV66NewRules = unicornV66MigrationQueue;
|
|
403
|
+
function unicornQueueRules(queue, severity) {
|
|
404
|
+
return Object.fromEntries(queue.map((rule2) => [rule2, severity]));
|
|
405
|
+
}
|
|
406
|
+
var unicornConfig = {
|
|
407
|
+
...unicornUnopinionatedConfig,
|
|
408
|
+
plugins: { unicorn: unicornPlugin },
|
|
409
|
+
rules: {
|
|
410
|
+
...unicornUnopinionatedRules,
|
|
411
|
+
...unicornQueueRules(unicornV66MigrationQueue, "off"),
|
|
412
|
+
...unicornQueueRules(unicornV67MigrationQueue, "off"),
|
|
413
|
+
...unicornQueueRules(unicornV69MigrationQueue, "off"),
|
|
414
|
+
...unicornQueueRules(unicornV71MigrationQueue, "warn"),
|
|
415
|
+
// Owned by @typescript-eslint/member-ordering
|
|
416
|
+
"unicorn/consistent-class-member-order": ["off"],
|
|
417
|
+
// Owned by max-nested-callbacks
|
|
418
|
+
"unicorn/max-nested-calls": ["off"],
|
|
419
|
+
// Tier 3 opinionated — enabled in opinionatedConfig
|
|
420
|
+
"unicorn/new-for-builtins": ["off"],
|
|
421
|
+
// Formatting — candidate for stylistic tier; overlaps @stylistic formatting
|
|
422
|
+
"unicorn/number-literal-case": ["off"],
|
|
423
|
+
// Boolean naming is too disruptive for org-wide enforcement
|
|
424
|
+
"unicorn/consistent-boolean-name": ["off"],
|
|
425
|
+
// Sort comparators are often intentional (locale, numeric, custom keys)
|
|
426
|
+
"unicorn/require-array-sort-compare": ["off"],
|
|
427
|
+
"unicorn/prefer-module": ["off"],
|
|
428
|
+
"unicorn/prefer-top-level-await": ["off"],
|
|
429
|
+
"unicorn/name-replacements": ["off"],
|
|
430
|
+
"unicorn/prefer-https": ["off"],
|
|
431
|
+
"unicorn/no-useless-undefined": "warn"
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
// src/core/index.ts
|
|
436
|
+
var correctnessCoreConfig = [
|
|
437
|
+
scopeConfig(js.configs.recommended, { files: scriptFiles, languageOptions: scriptLanguageOptions }),
|
|
438
|
+
correctnessRulesConfig,
|
|
439
|
+
srcImportsConfig
|
|
440
|
+
];
|
|
441
|
+
var bestPracticesCoreConfig = [
|
|
442
|
+
scopeConfig(unicornConfig, { files: scriptFiles })
|
|
443
|
+
];
|
|
444
|
+
var coreConfig = [
|
|
445
|
+
...correctnessCoreConfig,
|
|
446
|
+
consistencyRulesConfig,
|
|
447
|
+
...bestPracticesCoreConfig
|
|
448
|
+
];
|
|
449
|
+
|
|
450
|
+
// src/import/index.ts
|
|
451
|
+
import importPlugin from "eslint-plugin-import-x";
|
|
452
|
+
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
453
|
+
var importFlatConfigs = importPlugin.flatConfigs;
|
|
454
|
+
var importConfig = [
|
|
455
|
+
scopeConfig(importFlatConfigs.recommended, { files: scriptFiles, languageOptions: scriptLanguageOptions }),
|
|
456
|
+
scopeConfig(importFlatConfigs.typescript, { files: scriptFiles, languageOptions: scriptLanguageOptions }),
|
|
457
|
+
{
|
|
458
|
+
files: scriptFiles,
|
|
459
|
+
languageOptions: scriptLanguageOptions,
|
|
460
|
+
plugins: {
|
|
461
|
+
"import-x": importPlugin,
|
|
462
|
+
"simple-import-sort": simpleImportSort
|
|
463
|
+
},
|
|
464
|
+
settings: { "import-x/resolver": { typescript: { alwaysTryTypes: true, project: "./tsconfig.json" } } },
|
|
465
|
+
rules: {
|
|
466
|
+
// Owned by simple-import-sort/imports
|
|
467
|
+
"simple-import-sort/imports": ["warn"],
|
|
468
|
+
"simple-import-sort/exports": ["warn"],
|
|
469
|
+
// Type-aware resolution is slow and requires per-repo resolver setup
|
|
470
|
+
"import-x/default": ["off"],
|
|
471
|
+
"import-x/named": ["off"],
|
|
472
|
+
"import-x/namespace": ["off"],
|
|
473
|
+
"import-x/no-unresolved": ["off"],
|
|
474
|
+
"import-x/no-absolute-path": ["warn"],
|
|
475
|
+
"import-x/no-cycle": [
|
|
476
|
+
"warn",
|
|
477
|
+
{ maxDepth: 5 }
|
|
478
|
+
],
|
|
479
|
+
"import-x/no-deprecated": ["off"],
|
|
480
|
+
"import-x/no-named-as-default-member": ["off"],
|
|
481
|
+
"import-x/no-named-as-default": ["off"],
|
|
482
|
+
"import-x/no-restricted-paths": ["warn"],
|
|
483
|
+
"import-x/no-self-import": ["warn"],
|
|
484
|
+
"import-x/no-useless-path-segments": ["warn"]
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
];
|
|
488
|
+
|
|
489
|
+
// src/tiers/conflicts.ts
|
|
490
|
+
var RULE_OWNERSHIP_GROUPS = [
|
|
491
|
+
{
|
|
492
|
+
description: "Class member ordering with alphabetical within-group sorting",
|
|
493
|
+
owner: "@typescript-eslint/member-ordering",
|
|
494
|
+
disabled: ["unicorn/consistent-class-member-order"]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
description: "Callback nesting depth limit",
|
|
498
|
+
owner: "max-nested-callbacks",
|
|
499
|
+
disabled: ["unicorn/max-nested-calls"]
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
description: "Spread over Function.prototype.apply",
|
|
503
|
+
owner: "unicorn/prefer-spread",
|
|
504
|
+
disabled: ["prefer-spread"]
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
description: "Semicolon style",
|
|
508
|
+
owner: "@stylistic/semi",
|
|
509
|
+
disabled: ["semi"]
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
description: "Quote style",
|
|
513
|
+
owner: "@stylistic/quotes",
|
|
514
|
+
disabled: ["quotes"]
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
description: "Unused variable detection with TypeScript support",
|
|
518
|
+
owner: "@typescript-eslint/no-unused-vars",
|
|
519
|
+
disabled: ["no-unused-vars"]
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
description: "Escape sequence casing in strings and regexes",
|
|
523
|
+
owner: "unicorn/escape-case",
|
|
524
|
+
disabled: ["no-useless-escape"]
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
description: "Negated condition style",
|
|
528
|
+
owner: "unicorn/no-negated-condition",
|
|
529
|
+
disabled: ["no-negated-condition"]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
description: "Nested ternary restrictions",
|
|
533
|
+
owner: "unicorn/no-unnecessary-nested-ternary",
|
|
534
|
+
disabled: ["no-nested-ternary", "unicorn/no-nested-ternary"]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
description: "Import statement ordering",
|
|
538
|
+
owner: "simple-import-sort/imports",
|
|
539
|
+
disabled: ["import-x/order"]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
description: "Explicit boolean coercion for non-boolean values",
|
|
543
|
+
owner: "@typescript-eslint/strict-boolean-expressions",
|
|
544
|
+
disabled: ["no-extra-boolean-cast", "unicorn/no-useless-boolean-cast"]
|
|
545
|
+
}
|
|
546
|
+
];
|
|
547
|
+
function getRuleSeverity(setting) {
|
|
548
|
+
if (setting === void 0) {
|
|
549
|
+
return void 0;
|
|
550
|
+
}
|
|
551
|
+
const level = Array.isArray(setting) ? setting[0] : setting;
|
|
552
|
+
if (level === "off" || level === 0) {
|
|
553
|
+
return "off";
|
|
554
|
+
}
|
|
555
|
+
if (level === "warn" || level === 1) {
|
|
556
|
+
return "warn";
|
|
557
|
+
}
|
|
558
|
+
if (level === "error" || level === 2) {
|
|
559
|
+
return "error";
|
|
560
|
+
}
|
|
561
|
+
return void 0;
|
|
562
|
+
}
|
|
563
|
+
function isRuleEnabled(setting) {
|
|
564
|
+
const severity = getRuleSeverity(setting);
|
|
565
|
+
return severity !== void 0 && severity !== "off";
|
|
566
|
+
}
|
|
567
|
+
function mergeConfigRules(configs) {
|
|
568
|
+
const merged = {};
|
|
569
|
+
for (const entry of configs) {
|
|
570
|
+
if (!entry.rules) {
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
Object.assign(merged, entry.rules);
|
|
574
|
+
}
|
|
575
|
+
return merged;
|
|
576
|
+
}
|
|
577
|
+
function findRuleOwnershipConflicts(rules) {
|
|
578
|
+
const conflicts = [];
|
|
579
|
+
for (const group of RULE_OWNERSHIP_GROUPS) {
|
|
580
|
+
const ownerSetting = rules[group.owner];
|
|
581
|
+
if (!isRuleEnabled(ownerSetting)) {
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
for (const conflictingRule of group.disabled) {
|
|
585
|
+
if (isRuleEnabled(rules[conflictingRule])) {
|
|
586
|
+
conflicts.push({
|
|
587
|
+
description: group.description,
|
|
588
|
+
owner: group.owner,
|
|
589
|
+
conflictingRule,
|
|
590
|
+
ownerSetting,
|
|
591
|
+
conflictingSetting: rules[conflictingRule]
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return conflicts;
|
|
597
|
+
}
|
|
598
|
+
function assertNoRuleOwnershipConflicts(configs) {
|
|
599
|
+
const conflicts = findRuleOwnershipConflicts(mergeConfigRules(configs));
|
|
600
|
+
if (conflicts.length === 0) {
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
const details = conflicts.map((conflict) => `${conflict.owner} conflicts with ${conflict.conflictingRule} (${conflict.description})`).join("\n");
|
|
604
|
+
throw new Error(`ESLint rule ownership conflicts detected:
|
|
605
|
+
${details}`);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// src/typescript/index.ts
|
|
609
|
+
import esStylistic from "@stylistic/eslint-plugin";
|
|
610
|
+
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
611
|
+
var flatConfigs = tsPlugin.configs;
|
|
612
|
+
var memberOrderingRule = [
|
|
613
|
+
"warn",
|
|
614
|
+
{
|
|
615
|
+
default: {
|
|
616
|
+
memberTypes: [
|
|
617
|
+
"signature",
|
|
618
|
+
"call-signature",
|
|
619
|
+
"public-static-field",
|
|
620
|
+
"protected-static-field",
|
|
621
|
+
"private-static-field",
|
|
622
|
+
"public-decorated-field",
|
|
623
|
+
"protected-decorated-field",
|
|
624
|
+
"private-decorated-field",
|
|
625
|
+
"public-instance-field",
|
|
626
|
+
"protected-instance-field",
|
|
627
|
+
"private-instance-field",
|
|
628
|
+
"public-abstract-field",
|
|
629
|
+
"protected-abstract-field",
|
|
630
|
+
"public-field",
|
|
631
|
+
"protected-field",
|
|
632
|
+
"private-field",
|
|
633
|
+
"static-field",
|
|
634
|
+
"instance-field",
|
|
635
|
+
"abstract-field",
|
|
636
|
+
"decorated-field",
|
|
637
|
+
"field",
|
|
638
|
+
"public-constructor",
|
|
639
|
+
"protected-constructor",
|
|
640
|
+
"private-constructor",
|
|
641
|
+
"constructor",
|
|
642
|
+
["public-static-get", "public-static-set"],
|
|
643
|
+
["protected-static-get", "protected-static-set"],
|
|
644
|
+
["private-static-get", "private-static-set"],
|
|
645
|
+
["public-decorated-get", "public-decorated-set"],
|
|
646
|
+
["protected-decorated-get", "protected-decorated-set"],
|
|
647
|
+
["private-decorated-get", "private-decorated-set"],
|
|
648
|
+
["public-instance-get", "public-instance-set"],
|
|
649
|
+
["protected-instance-get", "protected-instance-set"],
|
|
650
|
+
["private-instance-get", "private-instance-set"],
|
|
651
|
+
["public-abstract-get", "public-abstract-set"],
|
|
652
|
+
["protected-abstract-get", "protected-abstract-set"],
|
|
653
|
+
["public-get", "public-set"],
|
|
654
|
+
["protected-get", "protected-set"],
|
|
655
|
+
["private-get", "private-set"],
|
|
656
|
+
["static-get", "static-set"],
|
|
657
|
+
["instance-get", "instance-set"],
|
|
658
|
+
["abstract-get", "abstract-set"],
|
|
659
|
+
["decorated-get", "decorated-set"],
|
|
660
|
+
"get",
|
|
661
|
+
"set",
|
|
662
|
+
"public-static-method",
|
|
663
|
+
"protected-static-method",
|
|
664
|
+
"private-static-method",
|
|
665
|
+
"public-decorated-method",
|
|
666
|
+
"protected-decorated-method",
|
|
667
|
+
"private-decorated-method",
|
|
668
|
+
"public-instance-method",
|
|
669
|
+
"protected-instance-method",
|
|
670
|
+
"private-instance-method",
|
|
671
|
+
"public-abstract-method",
|
|
672
|
+
"protected-abstract-method",
|
|
673
|
+
"public-method",
|
|
674
|
+
"protected-method",
|
|
675
|
+
"private-method",
|
|
676
|
+
"static-method",
|
|
677
|
+
"instance-method",
|
|
678
|
+
"abstract-method",
|
|
679
|
+
"decorated-method",
|
|
680
|
+
"method"
|
|
681
|
+
],
|
|
682
|
+
order: "alphabetically"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
];
|
|
686
|
+
function createCorrectnessOverride(languageOptions) {
|
|
687
|
+
return {
|
|
688
|
+
files: scriptFiles,
|
|
689
|
+
languageOptions,
|
|
690
|
+
rules: {
|
|
691
|
+
"@typescript-eslint/no-unused-vars": [
|
|
692
|
+
"warn",
|
|
693
|
+
{
|
|
694
|
+
argsIgnorePattern: "^_",
|
|
695
|
+
varsIgnorePattern: "^_",
|
|
696
|
+
ignoreRestSiblings: true
|
|
697
|
+
}
|
|
698
|
+
],
|
|
699
|
+
"@typescript-eslint/require-await": "off",
|
|
700
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
701
|
+
"@typescript-eslint/no-empty-object-type": ["off"],
|
|
702
|
+
"@typescript-eslint/triple-slash-reference": ["off"],
|
|
703
|
+
// Tier 3 opinionated — enabled in opinionatedConfig
|
|
704
|
+
"@typescript-eslint/strict-boolean-expressions": ["off"],
|
|
705
|
+
// Owned by @stylistic/quotes
|
|
706
|
+
"quotes": ["off"],
|
|
707
|
+
// Owned by @stylistic/semi
|
|
708
|
+
"semi": ["off"],
|
|
709
|
+
// Owned by unicorn/prefer-spread
|
|
710
|
+
"prefer-spread": ["off"],
|
|
711
|
+
"require-await": "off"
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
function createConsistencyOverride(languageOptions) {
|
|
716
|
+
return {
|
|
717
|
+
files: scriptFiles,
|
|
718
|
+
languageOptions,
|
|
719
|
+
plugins: { "@stylistic": esStylistic },
|
|
720
|
+
rules: {
|
|
721
|
+
...esStylistic.configs.recommended.rules,
|
|
722
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
723
|
+
"@stylistic/eol-last": "warn",
|
|
724
|
+
"@typescript-eslint/explicit-member-accessibility": ["warn", { accessibility: "no-public" }],
|
|
725
|
+
"@stylistic/brace-style": ["warn", "1tbs", { allowSingleLine: true }],
|
|
726
|
+
"@stylistic/quotes": ["warn", "single", { avoidEscape: true }],
|
|
727
|
+
"@typescript-eslint/consistent-type-imports": ["warn", { fixStyle: "separate-type-imports", prefer: "type-imports" }],
|
|
728
|
+
"@stylistic/object-property-newline": ["warn", { allowAllPropertiesOnSameLine: true }],
|
|
729
|
+
"@stylistic/function-call-argument-newline": ["warn", "consistent"],
|
|
730
|
+
"@stylistic/function-paren-newline": ["warn", "multiline-arguments"],
|
|
731
|
+
"@stylistic/member-delimiter-style": [
|
|
732
|
+
"error",
|
|
733
|
+
{
|
|
734
|
+
multiline: {
|
|
735
|
+
delimiter: "none",
|
|
736
|
+
requireLast: true
|
|
737
|
+
},
|
|
738
|
+
singleline: {
|
|
739
|
+
delimiter: "semi",
|
|
740
|
+
requireLast: false
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
],
|
|
744
|
+
"@stylistic/object-curly-newline": ["warn", {
|
|
745
|
+
ObjectExpression: {
|
|
746
|
+
multiline: true,
|
|
747
|
+
minProperties: 3,
|
|
748
|
+
consistent: false
|
|
749
|
+
},
|
|
750
|
+
ObjectPattern: {
|
|
751
|
+
multiline: true,
|
|
752
|
+
minProperties: 3,
|
|
753
|
+
consistent: false
|
|
754
|
+
},
|
|
755
|
+
ImportDeclaration: {
|
|
756
|
+
multiline: true,
|
|
757
|
+
minProperties: 3,
|
|
758
|
+
consistent: false
|
|
759
|
+
},
|
|
760
|
+
ExportDeclaration: {
|
|
761
|
+
multiline: true,
|
|
762
|
+
minProperties: 3,
|
|
763
|
+
consistent: false
|
|
764
|
+
}
|
|
765
|
+
}],
|
|
766
|
+
"@stylistic/max-len": ["warn", { code: 200 }],
|
|
767
|
+
"no-restricted-syntax": [
|
|
768
|
+
"warn",
|
|
769
|
+
{
|
|
770
|
+
selector: "TSEnumDeclaration",
|
|
771
|
+
message: "Enums are disallowed. Consider using a union of string literals or a `const` object instead."
|
|
772
|
+
}
|
|
773
|
+
],
|
|
774
|
+
"@typescript-eslint/member-ordering": memberOrderingRule
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
var typescriptDelegationConfig = {
|
|
779
|
+
files: scriptFiles,
|
|
780
|
+
rules: {
|
|
781
|
+
// Owned by unicorn/prefer-spread — stylistic presets may re-enable the core rule
|
|
782
|
+
"prefer-spread": "off",
|
|
783
|
+
// Owned by @stylistic/semi
|
|
784
|
+
"semi": "off",
|
|
785
|
+
// Owned by @stylistic/quotes
|
|
786
|
+
"quotes": "off"
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
var typescriptCorrectnessConfig = [
|
|
790
|
+
...scopeConfigs(flatConfigs["flat/recommended"], { files: scriptFiles, languageOptions: scriptLanguageOptions }),
|
|
791
|
+
createCorrectnessOverride(scriptLanguageOptions)
|
|
792
|
+
];
|
|
793
|
+
var typescriptConsistencyConfig = [
|
|
794
|
+
...scopeConfigs(flatConfigs["flat/stylistic"], { files: scriptFiles, languageOptions: scriptLanguageOptions }),
|
|
795
|
+
createConsistencyOverride(scriptLanguageOptions)
|
|
796
|
+
];
|
|
797
|
+
var typescriptTypeCheckedCorrectnessConfig = [
|
|
798
|
+
...scopeConfigs(flatConfigs["flat/recommended-type-checked"], { files: scriptFiles, languageOptions: typeCheckedLanguageOptions }),
|
|
799
|
+
createCorrectnessOverride(typeCheckedLanguageOptions),
|
|
800
|
+
{
|
|
801
|
+
files: scriptFiles,
|
|
802
|
+
languageOptions: typeCheckedLanguageOptions,
|
|
803
|
+
rules: { "@typescript-eslint/no-deprecated": "warn" }
|
|
804
|
+
}
|
|
805
|
+
];
|
|
806
|
+
var typescriptTypeCheckedConsistencyConfig = [
|
|
807
|
+
...scopeConfigs(flatConfigs["flat/stylistic-type-checked"], { files: scriptFiles, languageOptions: typeCheckedLanguageOptions }),
|
|
808
|
+
createConsistencyOverride(typeCheckedLanguageOptions)
|
|
809
|
+
];
|
|
810
|
+
var typescriptConfig = [
|
|
811
|
+
...typescriptCorrectnessConfig,
|
|
812
|
+
...typescriptConsistencyConfig,
|
|
813
|
+
typescriptDelegationConfig
|
|
814
|
+
];
|
|
815
|
+
var typescriptTypeCheckedConfig = [
|
|
816
|
+
...typescriptTypeCheckedCorrectnessConfig,
|
|
817
|
+
...typescriptTypeCheckedConsistencyConfig,
|
|
818
|
+
typescriptDelegationConfig
|
|
819
|
+
];
|
|
820
|
+
|
|
821
|
+
// src/workspaces/index.ts
|
|
822
|
+
import workspacesPlugin from "eslint-plugin-workspaces";
|
|
823
|
+
var workspacesConfig = {
|
|
824
|
+
plugins: { workspaces: workspacesPlugin },
|
|
825
|
+
rules: {
|
|
826
|
+
...workspacesPlugin.configs.recommended.rules,
|
|
827
|
+
// Tier 3 opinionated — enabled in opinionatedConfig
|
|
828
|
+
"workspaces/no-relative-imports": ["off"],
|
|
829
|
+
"workspaces/require-dependency": ["off"]
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
// src/tiers/rule-catalog/managed-rules.ts
|
|
834
|
+
var filenameCaseRuleOptions = {
|
|
835
|
+
cases: {
|
|
836
|
+
camelCase: true,
|
|
837
|
+
kebabCase: true,
|
|
838
|
+
pascalCase: true
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
function filenameCaseRule(severity) {
|
|
842
|
+
return [severity, filenameCaseRuleOptions];
|
|
843
|
+
}
|
|
844
|
+
function rule(name, plugin, category, introducedAtTier, severityAtTier, options, isTypeCheckingRequired = false) {
|
|
845
|
+
return {
|
|
846
|
+
category,
|
|
847
|
+
introducedAtTier,
|
|
848
|
+
isTypeCheckingRequired,
|
|
849
|
+
options,
|
|
850
|
+
plugin,
|
|
851
|
+
rule: name,
|
|
852
|
+
severityAtTier
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
var MANAGED_RULES = [
|
|
856
|
+
// Tier 0 — correctness
|
|
857
|
+
rule("no-unused-vars", "eslint", "correctness", 0, { 0: "off" }),
|
|
858
|
+
rule("no-useless-escape", "eslint", "correctness", 0, { 0: "off" }),
|
|
859
|
+
rule("prefer-spread", "eslint", "correctness", 0, { 0: "off" }),
|
|
860
|
+
rule("no-restricted-imports", "eslint", "correctness", 0, { 0: "error" }),
|
|
861
|
+
rule("@typescript-eslint/no-unused-vars", "@typescript-eslint", "correctness", 0, { 0: "warn" }, [
|
|
862
|
+
"warn",
|
|
863
|
+
{
|
|
864
|
+
argsIgnorePattern: "^_",
|
|
865
|
+
ignoreRestSiblings: true,
|
|
866
|
+
varsIgnorePattern: "^_"
|
|
867
|
+
}
|
|
868
|
+
]),
|
|
869
|
+
rule("@typescript-eslint/require-await", "@typescript-eslint", "correctness", 0, { 0: "off" }),
|
|
870
|
+
rule("@typescript-eslint/explicit-module-boundary-types", "@typescript-eslint", "correctness", 0, { 0: "off" }),
|
|
871
|
+
rule("@typescript-eslint/no-empty-object-type", "@typescript-eslint", "correctness", 0, { 0: "off" }),
|
|
872
|
+
rule("@typescript-eslint/triple-slash-reference", "@typescript-eslint", "correctness", 0, { 0: "off" }),
|
|
873
|
+
rule("@typescript-eslint/strict-boolean-expressions", "@typescript-eslint", "correctness", 0, { 0: "off", 3: "error" }, void 0, true),
|
|
874
|
+
rule("@typescript-eslint/no-deprecated", "@typescript-eslint", "correctness", 0, { 0: "warn", 3: "error" }, void 0, true),
|
|
875
|
+
rule("quotes", "eslint", "correctness", 0, { 0: "off" }),
|
|
876
|
+
rule("semi", "eslint", "correctness", 0, { 0: "off" }),
|
|
877
|
+
rule("require-await", "eslint", "correctness", 0, { 0: "off" }),
|
|
878
|
+
// Tier 1 — consistency
|
|
879
|
+
rule("complexity", "eslint", "consistency", 1, { 1: "error" }, ["error", 18]),
|
|
880
|
+
rule("max-depth", "eslint", "consistency", 1, { 1: "error" }, ["error", 6]),
|
|
881
|
+
rule("max-lines", "eslint", "consistency", 1, { 1: "error" }, ["error", { max: 512, skipBlankLines: true }]),
|
|
882
|
+
rule("array-element-newline", "eslint", "consistency", 1, { 1: "warn", 3: "error" }, ["warn", "consistent"]),
|
|
883
|
+
rule("max-nested-callbacks", "eslint", "consistency", 1, { 1: "error" }),
|
|
884
|
+
rule("max-statements", "eslint", "consistency", 1, { 1: "error" }, ["error", 32]),
|
|
885
|
+
rule("no-tabs", "eslint", "consistency", 1, { 1: "error" }),
|
|
886
|
+
rule("@typescript-eslint/no-empty-function", "@typescript-eslint", "consistency", 1, { 1: "warn", 3: "error" }),
|
|
887
|
+
rule("@stylistic/eol-last", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }),
|
|
888
|
+
rule("@typescript-eslint/explicit-member-accessibility", "@typescript-eslint", "consistency", 1, { 1: "warn", 3: "error" }, [
|
|
889
|
+
"warn",
|
|
890
|
+
{ accessibility: "no-public" }
|
|
891
|
+
]),
|
|
892
|
+
rule("@stylistic/brace-style", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, ["warn", "1tbs", { allowSingleLine: true }]),
|
|
893
|
+
rule("@stylistic/quotes", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, ["warn", "single", { avoidEscape: true }]),
|
|
894
|
+
rule("@typescript-eslint/consistent-type-imports", "@typescript-eslint", "consistency", 1, { 1: "warn", 3: "error" }, [
|
|
895
|
+
"warn",
|
|
896
|
+
{ fixStyle: "separate-type-imports", prefer: "type-imports" }
|
|
897
|
+
]),
|
|
898
|
+
rule("@stylistic/object-property-newline", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, [
|
|
899
|
+
"warn",
|
|
900
|
+
{ allowAllPropertiesOnSameLine: true }
|
|
901
|
+
]),
|
|
902
|
+
rule("@stylistic/function-call-argument-newline", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, ["warn", "consistent"]),
|
|
903
|
+
rule("@stylistic/function-paren-newline", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, ["warn", "multiline-arguments"]),
|
|
904
|
+
rule("@stylistic/member-delimiter-style", "@stylistic", "consistency", 1, { 1: "error" }, [
|
|
905
|
+
"error",
|
|
906
|
+
{
|
|
907
|
+
multiline: { delimiter: "none", requireLast: true },
|
|
908
|
+
singleline: { delimiter: "semi", requireLast: false }
|
|
909
|
+
}
|
|
910
|
+
]),
|
|
911
|
+
rule("@stylistic/object-curly-newline", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, [
|
|
912
|
+
"warn",
|
|
913
|
+
{
|
|
914
|
+
ExportDeclaration: {
|
|
915
|
+
consistent: false,
|
|
916
|
+
minProperties: 3,
|
|
917
|
+
multiline: true
|
|
918
|
+
},
|
|
919
|
+
ImportDeclaration: {
|
|
920
|
+
consistent: false,
|
|
921
|
+
minProperties: 3,
|
|
922
|
+
multiline: true
|
|
923
|
+
},
|
|
924
|
+
ObjectExpression: {
|
|
925
|
+
consistent: false,
|
|
926
|
+
minProperties: 3,
|
|
927
|
+
multiline: true
|
|
928
|
+
},
|
|
929
|
+
ObjectPattern: {
|
|
930
|
+
consistent: false,
|
|
931
|
+
minProperties: 3,
|
|
932
|
+
multiline: true
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
]),
|
|
936
|
+
rule("@stylistic/max-len", "@stylistic", "consistency", 1, { 1: "warn", 3: "error" }, ["warn", { code: 200 }]),
|
|
937
|
+
rule("no-restricted-syntax", "eslint", "consistency", 1, { 1: "warn", 3: "error" }, [
|
|
938
|
+
"warn",
|
|
939
|
+
{
|
|
940
|
+
message: "Enums are disallowed. Consider using a union of string literals or a `const` object instead.",
|
|
941
|
+
selector: "TSEnumDeclaration"
|
|
942
|
+
}
|
|
943
|
+
]),
|
|
944
|
+
rule("@typescript-eslint/member-ordering", "@typescript-eslint", "consistency", 1, { 1: "warn", 3: "error" }),
|
|
945
|
+
// Tier 2 — best practices (workspaces moved here from tier 0)
|
|
946
|
+
rule("workspaces/no-relative-imports", "workspaces", "best-practices", 2, { 2: "off", 3: "error" }),
|
|
947
|
+
rule("workspaces/require-dependency", "workspaces", "best-practices", 2, { 2: "off", 3: "error" }),
|
|
948
|
+
rule("simple-import-sort/imports", "simple-import-sort", "best-practices", 2, { 2: "warn", 3: "error" }, ["warn"]),
|
|
949
|
+
rule("simple-import-sort/exports", "simple-import-sort", "best-practices", 2, { 2: "warn", 3: "error" }, ["warn"]),
|
|
950
|
+
rule("import-x/default", "import-x", "best-practices", 2, { 2: "off" }),
|
|
951
|
+
rule("import-x/named", "import-x", "best-practices", 2, { 2: "off" }),
|
|
952
|
+
rule("import-x/namespace", "import-x", "best-practices", 2, { 2: "off" }),
|
|
953
|
+
rule("import-x/no-unresolved", "import-x", "best-practices", 2, { 2: "off" }),
|
|
954
|
+
rule("import-x/no-absolute-path", "import-x", "best-practices", 2, { 2: "warn", 3: "error" }),
|
|
955
|
+
rule("import-x/no-cycle", "import-x", "best-practices", 2, { 2: "warn", 3: "error" }, ["warn", { maxDepth: 5 }]),
|
|
956
|
+
rule("import-x/no-deprecated", "import-x", "best-practices", 2, { 2: "off" }),
|
|
957
|
+
rule("import-x/no-named-as-default-member", "import-x", "best-practices", 2, { 2: "off" }),
|
|
958
|
+
rule("import-x/no-named-as-default", "import-x", "best-practices", 2, { 2: "off" }),
|
|
959
|
+
rule("import-x/no-restricted-paths", "import-x", "best-practices", 2, { 2: "warn", 3: "error" }),
|
|
960
|
+
rule("import-x/no-self-import", "import-x", "best-practices", 2, { 2: "warn", 3: "error" }),
|
|
961
|
+
rule("import-x/no-useless-path-segments", "import-x", "best-practices", 2, { 2: "warn", 3: "error" }),
|
|
962
|
+
rule("unicorn/consistent-class-member-order", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
963
|
+
rule("unicorn/max-nested-calls", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
964
|
+
rule("unicorn/catch-error-name", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
965
|
+
rule("unicorn/consistent-function-scoping", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
966
|
+
rule("unicorn/filename-case", "unicorn", "best-practices", 2, { 2: "off", 3: "error" }, filenameCaseRule("error")),
|
|
967
|
+
rule("unicorn/new-for-builtins", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
968
|
+
rule("unicorn/no-array-callback-reference", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
969
|
+
rule("unicorn/no-await-expression-member", "unicorn", "best-practices", 2, { 2: "off", 3: "error" }),
|
|
970
|
+
rule("unicorn/no-nested-ternary", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
971
|
+
rule("unicorn/no-null", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
972
|
+
rule("unicorn/number-literal-case", "unicorn", "best-practices", 2, { 2: "off", 3: "error" }),
|
|
973
|
+
rule("unicorn/prefer-module", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
974
|
+
rule("unicorn/prefer-top-level-await", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
975
|
+
rule("unicorn/prevent-abbreviations", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
976
|
+
rule("unicorn/name-replacements", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
977
|
+
rule("unicorn/prefer-https", "unicorn", "best-practices", 2, { 2: "off" }),
|
|
978
|
+
rule("unicorn/no-useless-undefined", "unicorn", "best-practices", 2, { 2: "warn", 3: "error" }),
|
|
979
|
+
// Tier 3 — opinionated ownership delegations
|
|
980
|
+
rule("no-extra-boolean-cast", "eslint", "opinionated", 3, { 3: "off" }),
|
|
981
|
+
rule("unicorn/no-useless-boolean-cast", "unicorn", "opinionated", 3, { 3: "off" })
|
|
982
|
+
];
|
|
983
|
+
|
|
984
|
+
// src/tiers/opinionated.ts
|
|
985
|
+
var filenameCaseRuleOptions2 = {
|
|
986
|
+
cases: {
|
|
987
|
+
camelCase: true,
|
|
988
|
+
kebabCase: true,
|
|
989
|
+
pascalCase: true
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
function filenameCaseRule2(severity) {
|
|
993
|
+
return [severity, filenameCaseRuleOptions2];
|
|
994
|
+
}
|
|
995
|
+
function unicornQueueRules2(queue, severity) {
|
|
996
|
+
return Object.fromEntries(queue.map((rule2) => [rule2, severity]));
|
|
997
|
+
}
|
|
998
|
+
function managedPromotionRules(tier) {
|
|
999
|
+
const rules = {};
|
|
1000
|
+
for (const definition of MANAGED_RULES) {
|
|
1001
|
+
const severity = definition.severityAtTier[tier];
|
|
1002
|
+
if (severity !== "error") {
|
|
1003
|
+
continue;
|
|
1004
|
+
}
|
|
1005
|
+
const priorSeverity = definition.severityAtTier[tier - 1];
|
|
1006
|
+
if (priorSeverity === severity) {
|
|
1007
|
+
continue;
|
|
1008
|
+
}
|
|
1009
|
+
rules[definition.rule] = definition.options ?? severity;
|
|
1010
|
+
}
|
|
1011
|
+
rules["unicorn/filename-case"] = filenameCaseRule2("error");
|
|
1012
|
+
rules["no-extra-boolean-cast"] = "off";
|
|
1013
|
+
rules["unicorn/no-useless-boolean-cast"] = "off";
|
|
1014
|
+
return rules;
|
|
1015
|
+
}
|
|
1016
|
+
var opinionatedLayerConfig = {
|
|
1017
|
+
files: scriptFiles,
|
|
1018
|
+
rules: {
|
|
1019
|
+
"@typescript-eslint/strict-boolean-expressions": "warn",
|
|
1020
|
+
"no-extra-boolean-cast": "off",
|
|
1021
|
+
"unicorn/filename-case": filenameCaseRule2("warn"),
|
|
1022
|
+
"unicorn/no-await-expression-member": "warn",
|
|
1023
|
+
"unicorn/no-useless-boolean-cast": "off",
|
|
1024
|
+
"unicorn/number-literal-case": "warn",
|
|
1025
|
+
"workspaces/no-relative-imports": "warn",
|
|
1026
|
+
"workspaces/require-dependency": "warn"
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
function opinionatedUnicornPresetLayerConfigForTier(tier) {
|
|
1030
|
+
return {
|
|
1031
|
+
files: scriptFiles,
|
|
1032
|
+
rules: unicornOpinionatedRuleEntries("error", tier)
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
var opinionatedUnicornPresetLayerConfig = opinionatedUnicornPresetLayerConfigForTier(3);
|
|
1036
|
+
var opinionatedUnicornV66LayerConfig = {
|
|
1037
|
+
files: scriptFiles,
|
|
1038
|
+
rules: unicornQueueRules2(unicornV66MigrationQueue, "warn")
|
|
1039
|
+
};
|
|
1040
|
+
var opinionatedPromotionRules = managedPromotionRules(3);
|
|
1041
|
+
var opinionatedPromotionLayerConfig = {
|
|
1042
|
+
files: scriptFiles,
|
|
1043
|
+
rules: opinionatedPromotionRules
|
|
1044
|
+
};
|
|
1045
|
+
var strictPromotionRules = opinionatedPromotionRules;
|
|
1046
|
+
var strictLayerConfig = opinionatedPromotionLayerConfig;
|
|
1047
|
+
var experimentalUnicornLayerConfig = {
|
|
1048
|
+
files: scriptFiles,
|
|
1049
|
+
rules: unicornQueueRules2(unicornV67MigrationQueue, "warn")
|
|
1050
|
+
};
|
|
1051
|
+
var experimentalUnicornV69LayerConfig = {
|
|
1052
|
+
files: scriptFiles,
|
|
1053
|
+
rules: unicornQueueRules2(unicornV69MigrationQueue, "warn")
|
|
1054
|
+
};
|
|
1055
|
+
var experimentalLayerConfig = experimentalUnicornLayerConfig;
|
|
1056
|
+
var experimentalPromotionRules = experimentalUnicornLayerConfig.rules;
|
|
1057
|
+
|
|
1058
|
+
// src/tiers/rule-catalog/type-checked-rules.ts
|
|
1059
|
+
import tsPlugin2 from "@typescript-eslint/eslint-plugin";
|
|
1060
|
+
function ruleNamesFromConfigs(configs) {
|
|
1061
|
+
if (!configs) return /* @__PURE__ */ new Set();
|
|
1062
|
+
return new Set(Object.keys(mergeConfigRules(Array.isArray(configs) ? configs : [configs])));
|
|
1063
|
+
}
|
|
1064
|
+
function ruleNamesFromPreset(preset) {
|
|
1065
|
+
return ruleNamesFromConfigs(preset);
|
|
1066
|
+
}
|
|
1067
|
+
function diffRuleSets(typeChecked, untyped) {
|
|
1068
|
+
const onlyTypeChecked = /* @__PURE__ */ new Set();
|
|
1069
|
+
for (const rule2 of typeChecked) {
|
|
1070
|
+
if (!untyped.has(rule2)) {
|
|
1071
|
+
onlyTypeChecked.add(rule2);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
return onlyTypeChecked;
|
|
1075
|
+
}
|
|
1076
|
+
function typescriptPresetRuleDiff() {
|
|
1077
|
+
const flatConfigs2 = tsPlugin2.configs;
|
|
1078
|
+
const recommendedTypeChecked = ruleNamesFromPreset(flatConfigs2["flat/recommended-type-checked"]);
|
|
1079
|
+
const recommended = ruleNamesFromPreset(flatConfigs2["flat/recommended"]);
|
|
1080
|
+
const stylisticTypeChecked = ruleNamesFromPreset(flatConfigs2["flat/stylistic-type-checked"]);
|
|
1081
|
+
const stylistic = ruleNamesFromPreset(flatConfigs2["flat/stylistic"]);
|
|
1082
|
+
return /* @__PURE__ */ new Set([
|
|
1083
|
+
...diffRuleSets(recommendedTypeChecked, recommended),
|
|
1084
|
+
...diffRuleSets(stylisticTypeChecked, stylistic)
|
|
1085
|
+
]);
|
|
1086
|
+
}
|
|
1087
|
+
var EXPLICIT_TYPE_CHECKED_RULES = [
|
|
1088
|
+
"@typescript-eslint/no-deprecated",
|
|
1089
|
+
"@typescript-eslint/strict-boolean-expressions"
|
|
1090
|
+
];
|
|
1091
|
+
var typeCheckedRuleNamesCache = {};
|
|
1092
|
+
function collectTypeCheckedRuleNames() {
|
|
1093
|
+
if (typeCheckedRuleNamesCache.names === void 0) {
|
|
1094
|
+
typeCheckedRuleNamesCache.names = /* @__PURE__ */ new Set([
|
|
1095
|
+
...typescriptPresetRuleDiff(),
|
|
1096
|
+
...EXPLICIT_TYPE_CHECKED_RULES
|
|
1097
|
+
]);
|
|
1098
|
+
}
|
|
1099
|
+
return typeCheckedRuleNamesCache.names;
|
|
1100
|
+
}
|
|
1101
|
+
function buildTypeCheckGateRules() {
|
|
1102
|
+
return Object.fromEntries(
|
|
1103
|
+
[...collectTypeCheckedRuleNames()].map((rule2) => [rule2, "off"])
|
|
1104
|
+
);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// src/tiers/rule-catalog/index.ts
|
|
1108
|
+
function severityForTier(definition, tier) {
|
|
1109
|
+
let resolved;
|
|
1110
|
+
for (let current = 0; current <= tier; current = current + 1) {
|
|
1111
|
+
const severity = definition.severityAtTier[current];
|
|
1112
|
+
if (severity !== void 0) {
|
|
1113
|
+
resolved = severity;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
return resolved;
|
|
1117
|
+
}
|
|
1118
|
+
function managedRulesForTier(tier, isTypeChecked) {
|
|
1119
|
+
return MANAGED_RULES.filter((definition) => definition.introducedAtTier <= tier && (!definition.isTypeCheckingRequired || isTypeChecked));
|
|
1120
|
+
}
|
|
1121
|
+
function buildManagedRulesMap(tier, isTypeChecked) {
|
|
1122
|
+
const rules = {};
|
|
1123
|
+
for (const definition of managedRulesForTier(tier, isTypeChecked)) {
|
|
1124
|
+
const severity = severityForTier(definition, tier);
|
|
1125
|
+
if (severity === void 0) {
|
|
1126
|
+
continue;
|
|
1127
|
+
}
|
|
1128
|
+
rules[definition.rule] = severity === "off" ? "off" : definition.options ?? severity;
|
|
1129
|
+
}
|
|
1130
|
+
return rules;
|
|
1131
|
+
}
|
|
1132
|
+
function buildManagedRulesLayer(tier, isTypeChecked) {
|
|
1133
|
+
return {
|
|
1134
|
+
files: scriptFiles,
|
|
1135
|
+
rules: buildManagedRulesMap(tier, isTypeChecked)
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
function buildTypeCheckGateLayer() {
|
|
1139
|
+
return {
|
|
1140
|
+
files: scriptFiles,
|
|
1141
|
+
rules: buildTypeCheckGateRules()
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
function findEnabledTypeCheckedRules(rules) {
|
|
1145
|
+
const typeCheckedRuleNames = collectTypeCheckedRuleNames();
|
|
1146
|
+
return [...typeCheckedRuleNames].filter((rule2) => {
|
|
1147
|
+
const severity = getRuleSeverity(rules[rule2]);
|
|
1148
|
+
return severity !== void 0 && severity !== "off";
|
|
1149
|
+
}).toSorted();
|
|
1150
|
+
}
|
|
1151
|
+
function categoryForTier(tier) {
|
|
1152
|
+
switch (tier) {
|
|
1153
|
+
case 0: {
|
|
1154
|
+
return "correctness";
|
|
1155
|
+
}
|
|
1156
|
+
case 1: {
|
|
1157
|
+
return "consistency";
|
|
1158
|
+
}
|
|
1159
|
+
case 2: {
|
|
1160
|
+
return "best-practices";
|
|
1161
|
+
}
|
|
1162
|
+
case 3: {
|
|
1163
|
+
return "opinionated";
|
|
1164
|
+
}
|
|
1165
|
+
case 4: {
|
|
1166
|
+
return "experimental";
|
|
1167
|
+
}
|
|
1168
|
+
default: {
|
|
1169
|
+
const unsupported = tier;
|
|
1170
|
+
throw new Error(`Unsupported lint tier ${unsupported}`);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
// src/tiers/tier-builder.ts
|
|
1176
|
+
function mergeTierConfigs(...parts) {
|
|
1177
|
+
return parts.flat();
|
|
1178
|
+
}
|
|
1179
|
+
function structuralTier0(isTypeChecked) {
|
|
1180
|
+
return mergeTierConfigs(
|
|
1181
|
+
markdownConfig,
|
|
1182
|
+
correctnessCoreConfig,
|
|
1183
|
+
isTypeChecked ? typescriptTypeCheckedCorrectnessConfig : typescriptCorrectnessConfig
|
|
1184
|
+
);
|
|
1185
|
+
}
|
|
1186
|
+
function structuralTier1(isTypeChecked) {
|
|
1187
|
+
return mergeTierConfigs(
|
|
1188
|
+
structuralTier0(isTypeChecked),
|
|
1189
|
+
[consistencyRulesConfig],
|
|
1190
|
+
isTypeChecked ? typescriptTypeCheckedConsistencyConfig : typescriptConsistencyConfig,
|
|
1191
|
+
[typescriptDelegationConfig]
|
|
1192
|
+
);
|
|
1193
|
+
}
|
|
1194
|
+
function structuralTier2(isTypeChecked) {
|
|
1195
|
+
return mergeTierConfigs(
|
|
1196
|
+
structuralTier1(isTypeChecked),
|
|
1197
|
+
bestPracticesCoreConfig,
|
|
1198
|
+
importConfig,
|
|
1199
|
+
[workspacesConfig]
|
|
1200
|
+
);
|
|
1201
|
+
}
|
|
1202
|
+
function structuralLayersForTier(tier, isTypeChecked) {
|
|
1203
|
+
switch (tier) {
|
|
1204
|
+
case 0: {
|
|
1205
|
+
return structuralTier0(isTypeChecked);
|
|
1206
|
+
}
|
|
1207
|
+
case 1: {
|
|
1208
|
+
return structuralTier1(isTypeChecked);
|
|
1209
|
+
}
|
|
1210
|
+
case 2:
|
|
1211
|
+
case 3:
|
|
1212
|
+
case 4: {
|
|
1213
|
+
return structuralTier2(isTypeChecked);
|
|
1214
|
+
}
|
|
1215
|
+
default: {
|
|
1216
|
+
const unsupported = tier;
|
|
1217
|
+
throw new Error(`Unsupported lint tier ${unsupported}`);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
function appendTypeCheckGate(configs, isTypeChecked) {
|
|
1222
|
+
if (isTypeChecked) {
|
|
1223
|
+
return configs;
|
|
1224
|
+
}
|
|
1225
|
+
return [...configs, buildTypeCheckGateLayer()];
|
|
1226
|
+
}
|
|
1227
|
+
function opinionatedLayersForTier(tier) {
|
|
1228
|
+
if (tier < 3) {
|
|
1229
|
+
return [];
|
|
1230
|
+
}
|
|
1231
|
+
const layers = [
|
|
1232
|
+
opinionatedUnicornPresetLayerConfigForTier(tier),
|
|
1233
|
+
opinionatedUnicornV66LayerConfig
|
|
1234
|
+
];
|
|
1235
|
+
if (tier >= 4) {
|
|
1236
|
+
layers.push(experimentalUnicornLayerConfig, experimentalUnicornV69LayerConfig);
|
|
1237
|
+
}
|
|
1238
|
+
return layers;
|
|
1239
|
+
}
|
|
1240
|
+
var globalIgnoresConfig = { ignores };
|
|
1241
|
+
function buildTierConfig(tier, isTypeChecked) {
|
|
1242
|
+
const configs = mergeTierConfigs(
|
|
1243
|
+
[globalIgnoresConfig],
|
|
1244
|
+
structuralLayersForTier(tier, isTypeChecked),
|
|
1245
|
+
opinionatedLayersForTier(tier),
|
|
1246
|
+
[buildManagedRulesLayer(tier, isTypeChecked)]
|
|
1247
|
+
);
|
|
1248
|
+
return appendTypeCheckGate(configs, isTypeChecked);
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// src/tiers/recommendedConfig.ts
|
|
1252
|
+
var DEFAULT_RECOMMENDED_CONFIG_OPTIONS = {
|
|
1253
|
+
isTypeChecked: true,
|
|
1254
|
+
tier: 3
|
|
1255
|
+
};
|
|
1256
|
+
var composedConfigModules = [
|
|
1257
|
+
"bestPracticesCoreConfig",
|
|
1258
|
+
"consistencyRulesConfig",
|
|
1259
|
+
"correctnessCoreConfig",
|
|
1260
|
+
"importConfig",
|
|
1261
|
+
"rulesConfig",
|
|
1262
|
+
"typescriptConfig",
|
|
1263
|
+
"typescriptConsistencyConfig",
|
|
1264
|
+
"typescriptCorrectnessConfig",
|
|
1265
|
+
"typescriptTypeCheckedConfig",
|
|
1266
|
+
"typescriptTypeCheckedConsistencyConfig",
|
|
1267
|
+
"typescriptTypeCheckedCorrectnessConfig",
|
|
1268
|
+
"unicornConfig",
|
|
1269
|
+
"workspacesConfig"
|
|
1270
|
+
];
|
|
1271
|
+
function resolveRecommendedConfigOptions(options) {
|
|
1272
|
+
return {
|
|
1273
|
+
isTypeChecked: options?.isTypeChecked ?? DEFAULT_RECOMMENDED_CONFIG_OPTIONS.isTypeChecked,
|
|
1274
|
+
tier: options?.tier ?? DEFAULT_RECOMMENDED_CONFIG_OPTIONS.tier
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
function recommendedConfig(options) {
|
|
1278
|
+
const resolved = resolveRecommendedConfigOptions(options);
|
|
1279
|
+
return buildTierConfig(resolved.tier, resolved.isTypeChecked);
|
|
1280
|
+
}
|
|
1281
|
+
function formatRecommendedConfigCall(options) {
|
|
1282
|
+
const resolved = resolveRecommendedConfigOptions(options);
|
|
1283
|
+
return `recommendedConfig({ tier: ${resolved.tier}, isTypeChecked: ${String(resolved.isTypeChecked)} })`;
|
|
1284
|
+
}
|
|
1285
|
+
function hasComposedConfigModules(source) {
|
|
1286
|
+
return composedConfigModules.some((module) => source.includes(module));
|
|
1287
|
+
}
|
|
1288
|
+
function parseRecommendedConfigOptionsLiteral(literal) {
|
|
1289
|
+
const resolved = { ...DEFAULT_RECOMMENDED_CONFIG_OPTIONS };
|
|
1290
|
+
if (literal === void 0 || literal.trim().length === 0) return resolved;
|
|
1291
|
+
const tierMatch = /tier:\s*([0-4])\b/.exec(literal);
|
|
1292
|
+
if (tierMatch !== null) {
|
|
1293
|
+
resolved.tier = Number(tierMatch[1]);
|
|
1294
|
+
}
|
|
1295
|
+
const isTypeCheckedMatch = /isTypeChecked:\s*(true|false)\b/.exec(literal);
|
|
1296
|
+
if (isTypeCheckedMatch === null) {
|
|
1297
|
+
const legacyTypeCheckedMatch = /typeChecked:\s*(true|false)\b/.exec(literal);
|
|
1298
|
+
if (legacyTypeCheckedMatch !== null) {
|
|
1299
|
+
resolved.isTypeChecked = legacyTypeCheckedMatch[1] === "true";
|
|
1300
|
+
}
|
|
1301
|
+
} else {
|
|
1302
|
+
resolved.isTypeChecked = isTypeCheckedMatch[1] === "true";
|
|
1303
|
+
}
|
|
1304
|
+
return resolved;
|
|
1305
|
+
}
|
|
1306
|
+
function parseRecommendedConfigSource(source) {
|
|
1307
|
+
const callPattern = /recommendedConfig\s*\(\s*(?:\{([^}]*)\})?\s*\)/g;
|
|
1308
|
+
const match = callPattern.exec(source);
|
|
1309
|
+
if (match === null) return void 0;
|
|
1310
|
+
const options = parseRecommendedConfigOptionsLiteral(match[1]);
|
|
1311
|
+
const configKind = hasComposedConfigModules(source) ? "custom" : "preset";
|
|
1312
|
+
return { configKind, options };
|
|
1313
|
+
}
|
|
1314
|
+
function applyRecommendedConfigTypeChecked(source, isEnabled) {
|
|
1315
|
+
const callPattern = /recommendedConfig\s*\(\s*(?:\{([^}]*)\})?\s*\)/g;
|
|
1316
|
+
return source.replaceAll(callPattern, (_match, literal) => {
|
|
1317
|
+
const options = parseRecommendedConfigOptionsLiteral(literal);
|
|
1318
|
+
options.isTypeChecked = isEnabled;
|
|
1319
|
+
return formatRecommendedConfigCall(options);
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
// src/tiers/index.ts
|
|
1324
|
+
var configTier0Correctness = recommendedConfig({ tier: 0, isTypeChecked: false });
|
|
1325
|
+
var configTier0CorrectnessTypeChecked = recommendedConfig({ tier: 0, isTypeChecked: true });
|
|
1326
|
+
var configTier1Consistency = recommendedConfig({ tier: 1, isTypeChecked: false });
|
|
1327
|
+
var configTier1ConsistencyTypeChecked = recommendedConfig({ tier: 1, isTypeChecked: true });
|
|
1328
|
+
var configTier2BestPractices = recommendedConfig({ tier: 2, isTypeChecked: false });
|
|
1329
|
+
var configTier2BestPracticesTypeChecked = recommendedConfig({ tier: 2, isTypeChecked: true });
|
|
1330
|
+
var configTier3Opinionated = recommendedConfig({ tier: 3, isTypeChecked: false });
|
|
1331
|
+
var configTier3OpinionatedTypeChecked = recommendedConfig({ tier: 3, isTypeChecked: true });
|
|
1332
|
+
var configTier4Experimental = recommendedConfig({ tier: 4, isTypeChecked: false });
|
|
1333
|
+
var configTier4ExperimentalTypeChecked = recommendedConfig({ tier: 4, isTypeChecked: true });
|
|
1334
|
+
var recommendedTypeCheckedConfig = recommendedConfig({ tier: 2, isTypeChecked: true });
|
|
1335
|
+
var config = recommendedConfig({ tier: 2, isTypeChecked: true });
|
|
1336
|
+
|
|
1337
|
+
// src/tiers/plugin-rules.ts
|
|
1338
|
+
import js2 from "@eslint/js";
|
|
1339
|
+
import json2 from "@eslint/json";
|
|
1340
|
+
import markdown2 from "@eslint/markdown";
|
|
1341
|
+
import esStylistic2 from "@stylistic/eslint-plugin";
|
|
1342
|
+
import tsPlugin3 from "@typescript-eslint/eslint-plugin";
|
|
1343
|
+
import importPlugin2 from "eslint-plugin-import-x";
|
|
1344
|
+
import simpleImportSort2 from "eslint-plugin-simple-import-sort";
|
|
1345
|
+
import unicornPlugin2 from "eslint-plugin-unicorn";
|
|
1346
|
+
import workspacesPlugin2 from "eslint-plugin-workspaces";
|
|
1347
|
+
var compareStrings2 = (left, right) => left.localeCompare(right);
|
|
1348
|
+
function sortedRuleNames(rules) {
|
|
1349
|
+
if (!rules) {
|
|
1350
|
+
return [];
|
|
1351
|
+
}
|
|
1352
|
+
return Object.keys(rules).toSorted(compareStrings2);
|
|
1353
|
+
}
|
|
1354
|
+
function sortedRuleNamesFromConfigs(configs) {
|
|
1355
|
+
if (!configs) {
|
|
1356
|
+
return [];
|
|
1357
|
+
}
|
|
1358
|
+
const merged = {};
|
|
1359
|
+
for (const entry of configs) {
|
|
1360
|
+
if (entry.rules) {
|
|
1361
|
+
Object.assign(merged, entry.rules);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
return sortedRuleNames(merged);
|
|
1365
|
+
}
|
|
1366
|
+
function pluginRuleNames(plugin) {
|
|
1367
|
+
if (!plugin.rules) {
|
|
1368
|
+
return [];
|
|
1369
|
+
}
|
|
1370
|
+
const prefix = typeof plugin.meta?.name === "string" ? plugin.meta.name.replace(/^eslint-plugin-/, "").replace(/^@eslint\//, "") : "unknown";
|
|
1371
|
+
return Object.keys(plugin.rules).toSorted(compareStrings2).map((ruleName) => `${prefix}/${ruleName}`);
|
|
1372
|
+
}
|
|
1373
|
+
function collectPluginRuleSnapshots() {
|
|
1374
|
+
const unicornRecommended = unicornPlugin2.configs["flat/recommended"];
|
|
1375
|
+
const importRecommended = importPlugin2.flatConfigs.recommended;
|
|
1376
|
+
const flatConfigs2 = tsPlugin3.configs;
|
|
1377
|
+
const workspacesRecommended = workspacesPlugin2.configs.recommended;
|
|
1378
|
+
return [
|
|
1379
|
+
{
|
|
1380
|
+
plugin: "@eslint/js",
|
|
1381
|
+
rules: sortedRuleNames(js2.configs.recommended.rules),
|
|
1382
|
+
source: "configs.recommended"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
plugin: "@eslint/json",
|
|
1386
|
+
rules: pluginRuleNames(json2),
|
|
1387
|
+
source: "plugin.rules"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
plugin: "@eslint/markdown",
|
|
1391
|
+
rules: sortedRuleNames(
|
|
1392
|
+
markdown2.configs.recommended[0]?.rules
|
|
1393
|
+
),
|
|
1394
|
+
source: "configs.recommended"
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
plugin: "@stylistic/eslint-plugin",
|
|
1398
|
+
rules: sortedRuleNames(esStylistic2.configs.recommended.rules),
|
|
1399
|
+
source: "configs.recommended"
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
plugin: "@typescript-eslint/eslint-plugin",
|
|
1403
|
+
rules: sortedRuleNamesFromConfigs(flatConfigs2["flat/recommended"]),
|
|
1404
|
+
source: "configs.flat/recommended"
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
plugin: "@typescript-eslint/eslint-plugin",
|
|
1408
|
+
rules: sortedRuleNamesFromConfigs(flatConfigs2["flat/stylistic"]),
|
|
1409
|
+
source: "configs.flat/stylistic"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
plugin: "@typescript-eslint/eslint-plugin",
|
|
1413
|
+
rules: sortedRuleNamesFromConfigs(flatConfigs2["flat/recommended-type-checked"]),
|
|
1414
|
+
source: "configs.flat/recommended-type-checked"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
plugin: "@typescript-eslint/eslint-plugin",
|
|
1418
|
+
rules: sortedRuleNamesFromConfigs(flatConfigs2["flat/stylistic-type-checked"]),
|
|
1419
|
+
source: "configs.flat/stylistic-type-checked"
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
plugin: "eslint-plugin-import-x",
|
|
1423
|
+
rules: sortedRuleNames(importRecommended.rules),
|
|
1424
|
+
source: "flatConfigs.recommended"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
plugin: "eslint-plugin-import-x",
|
|
1428
|
+
rules: sortedRuleNames(importPlugin2.flatConfigs.typescript.rules),
|
|
1429
|
+
source: "flatConfigs.typescript"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
plugin: "eslint-plugin-simple-import-sort",
|
|
1433
|
+
rules: pluginRuleNames(simpleImportSort2),
|
|
1434
|
+
source: "plugin.rules"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
plugin: "eslint-plugin-unicorn",
|
|
1438
|
+
rules: sortedRuleNames(unicornRecommended?.rules),
|
|
1439
|
+
source: "configs.flat/recommended"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
plugin: "eslint-plugin-workspaces",
|
|
1443
|
+
rules: sortedRuleNames(workspacesRecommended.rules),
|
|
1444
|
+
source: "configs.recommended"
|
|
1445
|
+
}
|
|
1446
|
+
];
|
|
1447
|
+
}
|
|
1448
|
+
function serializePluginRuleSnapshots(snapshots) {
|
|
1449
|
+
return `${JSON.stringify(snapshots, null, 2)}
|
|
1450
|
+
`;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
// src/index.ts
|
|
1454
|
+
var docsConfig = [
|
|
1455
|
+
...markdownConfig,
|
|
1456
|
+
jsonConfig,
|
|
1457
|
+
jsoncConfig,
|
|
1458
|
+
json5Config
|
|
1459
|
+
];
|
|
1460
|
+
export {
|
|
1461
|
+
DEFAULT_RECOMMENDED_CONFIG_OPTIONS,
|
|
1462
|
+
MANAGED_RULES as RULE_CATALOG,
|
|
1463
|
+
RULE_OWNERSHIP_GROUPS,
|
|
1464
|
+
applyRecommendedConfigTypeChecked,
|
|
1465
|
+
assertNoRuleOwnershipConflicts,
|
|
1466
|
+
bestPracticesCoreConfig,
|
|
1467
|
+
buildManagedRulesLayer,
|
|
1468
|
+
buildTierConfig,
|
|
1469
|
+
buildTypeCheckGateLayer,
|
|
1470
|
+
categoryForTier,
|
|
1471
|
+
collectPluginRuleSnapshots,
|
|
1472
|
+
collectTypeCheckedRuleNames,
|
|
1473
|
+
config,
|
|
1474
|
+
configTier0Correctness,
|
|
1475
|
+
configTier0CorrectnessTypeChecked,
|
|
1476
|
+
configTier1Consistency,
|
|
1477
|
+
configTier1ConsistencyTypeChecked,
|
|
1478
|
+
configTier2BestPractices,
|
|
1479
|
+
configTier2BestPracticesTypeChecked,
|
|
1480
|
+
configTier3Opinionated,
|
|
1481
|
+
configTier3OpinionatedTypeChecked,
|
|
1482
|
+
configTier4Experimental,
|
|
1483
|
+
configTier4ExperimentalTypeChecked,
|
|
1484
|
+
consistencyRulesConfig,
|
|
1485
|
+
coreConfig,
|
|
1486
|
+
correctnessCoreConfig,
|
|
1487
|
+
correctnessRulesConfig,
|
|
1488
|
+
docsConfig,
|
|
1489
|
+
experimentalLayerConfig,
|
|
1490
|
+
experimentalPromotionRules,
|
|
1491
|
+
experimentalUnicornLayerConfig,
|
|
1492
|
+
experimentalUnicornV69LayerConfig,
|
|
1493
|
+
findEnabledTypeCheckedRules,
|
|
1494
|
+
findRuleOwnershipConflicts,
|
|
1495
|
+
formatRecommendedConfigCall,
|
|
1496
|
+
getRuleSeverity,
|
|
1497
|
+
globalIgnoresConfig,
|
|
1498
|
+
ignores,
|
|
1499
|
+
importConfig,
|
|
1500
|
+
json5Config,
|
|
1501
|
+
jsonConfig,
|
|
1502
|
+
jsoncConfig,
|
|
1503
|
+
managedRulesForTier,
|
|
1504
|
+
markdownConfig,
|
|
1505
|
+
mergeConfigRules,
|
|
1506
|
+
opinionatedLayerConfig,
|
|
1507
|
+
opinionatedPromotionLayerConfig,
|
|
1508
|
+
opinionatedPromotionRules,
|
|
1509
|
+
opinionatedUnicornPresetLayerConfig,
|
|
1510
|
+
opinionatedUnicornV66LayerConfig,
|
|
1511
|
+
parseRecommendedConfigSource,
|
|
1512
|
+
recommendedConfig,
|
|
1513
|
+
recommendedTypeCheckedConfig,
|
|
1514
|
+
resolveRecommendedConfigOptions,
|
|
1515
|
+
rulesConfig,
|
|
1516
|
+
serializePluginRuleSnapshots,
|
|
1517
|
+
srcImportsConfig,
|
|
1518
|
+
strictLayerConfig,
|
|
1519
|
+
strictPromotionRules,
|
|
1520
|
+
typescriptConfig,
|
|
1521
|
+
typescriptConsistencyConfig,
|
|
1522
|
+
typescriptCorrectnessConfig,
|
|
1523
|
+
typescriptDelegationConfig,
|
|
1524
|
+
typescriptTypeCheckedConfig,
|
|
1525
|
+
typescriptTypeCheckedConsistencyConfig,
|
|
1526
|
+
typescriptTypeCheckedCorrectnessConfig,
|
|
1527
|
+
unicornConfig,
|
|
1528
|
+
unicornExperimentalMigrationQueue,
|
|
1529
|
+
unicornGloballyDisabledRules,
|
|
1530
|
+
unicornOpinionatedRules,
|
|
1531
|
+
unicornOpinionatedRulesForTier,
|
|
1532
|
+
unicornV66MigrationQueue,
|
|
1533
|
+
unicornV66NewRules,
|
|
1534
|
+
unicornV67MigrationQueue,
|
|
1535
|
+
unicornV69MigrationQueue,
|
|
1536
|
+
unicornV71MigrationQueue,
|
|
1537
|
+
workspacesConfig
|
|
1538
|
+
};
|
|
1539
|
+
//# sourceMappingURL=index.mjs.map
|