@brnshkr/config 0.0.1-alpha.13 → 0.0.1-alpha.15
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/README.md +9 -3
- package/dist/eslint/index.d.mts +1184 -1639
- package/dist/eslint/index.mjs +233 -159
- package/dist/scripts/eslint.mjs +2 -4
- package/dist/scripts/stylelint.mjs +2 -4
- package/dist/shared.mjs +76 -241
- package/dist/stylelint/index.d.mts +3 -3
- package/dist/stylelint/index.mjs +85 -59
- package/package.json +74 -90
package/dist/eslint/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as objectAssign, d as objectFromEntries, f as objectKeys, h as version, i as resolvePackagesSharedAsynchronously, l as objectEntries, m as packageOrganizationUpper, n as GLOB_IGNORES, o as ESLINT_PACKAGES, p as packageOrganization, r as isModuleEnabledByDefault, t as QUOTES, u as objectFreeze } from "../shared.mjs";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
3
|
import jsEslint from "@eslint/js";
|
|
4
4
|
import confusingBrowserGlobals from "confusing-browser-globals";
|
|
5
5
|
import globals from "globals";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
|
|
9
|
-
//#region src/js/eslint/types/scopes.ts
|
|
8
|
+
//#region ../src/js/eslint/types/scopes.ts
|
|
10
9
|
const MAIN_SCOPES = {
|
|
11
10
|
[packageOrganizationUpper]: "builtin",
|
|
12
11
|
COMMENTS: "comments",
|
|
@@ -42,9 +41,8 @@ const SUB_SCOPES = {
|
|
|
42
41
|
SETUP: "setup",
|
|
43
42
|
UNNAMED: "unnamed"
|
|
44
43
|
};
|
|
45
|
-
|
|
46
44
|
//#endregion
|
|
47
|
-
//#region src/js/eslint/utils/config.ts
|
|
45
|
+
//#region ../src/js/eslint/utils/config.ts
|
|
48
46
|
const buildConfigName = (mainScope, subScope) => [
|
|
49
47
|
packageOrganization,
|
|
50
48
|
mainScope,
|
|
@@ -85,9 +83,8 @@ const ensureNamesForSyncAdditionalConfigs = (additionalConfigs) => {
|
|
|
85
83
|
return validConfigs;
|
|
86
84
|
};
|
|
87
85
|
const getUserConfigs = (resolvedOptions, additionalConfigs) => [getGlobalAdditionalConfig(resolvedOptions), ...ensureNamesForSyncAdditionalConfigs(additionalConfigs)];
|
|
88
|
-
|
|
89
86
|
//#endregion
|
|
90
|
-
//#region src/js/eslint/utils/globs.ts
|
|
87
|
+
//#region ../src/js/eslint/utils/globs.ts
|
|
91
88
|
const GLOB_CJS = "**/*.cjs";
|
|
92
89
|
const GLOB_TS = "**/*.?(c|m)ts?(x)";
|
|
93
90
|
const GLOB_DTS = "**/*.d.?(c|m)ts";
|
|
@@ -120,9 +117,8 @@ const GLOB_TEST_FILES = [
|
|
|
120
117
|
"**/*.bench.?(c|m)[jt]s",
|
|
121
118
|
"**/*.benchmark.?(c|m)[jt]s"
|
|
122
119
|
];
|
|
123
|
-
|
|
124
120
|
//#endregion
|
|
125
|
-
//#region src/js/eslint/configs/builtin.ts
|
|
121
|
+
//#region ../src/js/eslint/configs/builtin.ts
|
|
126
122
|
const FILE_TYPE_MAP = {
|
|
127
123
|
".json": "json",
|
|
128
124
|
".css": "css",
|
|
@@ -147,17 +143,17 @@ const requireImportAttributesRule = {
|
|
|
147
143
|
[MESSAGE_ID_WRONG_TYPE_VALUE]: "Import attribute 'type' for '{{ file }}' must be '{{ expectedValue }}'."
|
|
148
144
|
}
|
|
149
145
|
},
|
|
150
|
-
create: (context) => ({ ImportDeclaration: (node
|
|
151
|
-
const sourceValue = node
|
|
146
|
+
create: (context) => ({ ImportDeclaration: (node) => {
|
|
147
|
+
const sourceValue = node.source.value;
|
|
152
148
|
const extensionIndex = sourceValue.lastIndexOf(".");
|
|
153
149
|
if (extensionIndex === -1) return;
|
|
154
150
|
const extension = sourceValue.slice(extensionIndex).toLowerCase();
|
|
155
151
|
const expectedValue = FILE_TYPE_MAP[extension];
|
|
156
152
|
if (expectedValue === void 0) return;
|
|
157
|
-
const { attributes } = node
|
|
153
|
+
const { attributes } = node;
|
|
158
154
|
if (attributes.length === 0) {
|
|
159
155
|
context.report({
|
|
160
|
-
node
|
|
156
|
+
node,
|
|
161
157
|
messageId: MESSAGE_ID_MISSING_WITH_KEYWORD,
|
|
162
158
|
data: {
|
|
163
159
|
extension,
|
|
@@ -169,13 +165,13 @@ const requireImportAttributesRule = {
|
|
|
169
165
|
const typeProperty = attributes.find((attribute) => attribute.key.type === "Identifier" && "name" in attribute.key && attribute.key.name === "type" || attribute.key.type === "Literal" && "value" in attribute.key && attribute.key.value === "type");
|
|
170
166
|
if (!typeProperty) {
|
|
171
167
|
context.report({
|
|
172
|
-
node
|
|
168
|
+
node,
|
|
173
169
|
messageId: MESSAGE_ID_MISSING_TYPE_PROPERTY
|
|
174
170
|
});
|
|
175
171
|
return;
|
|
176
172
|
}
|
|
177
173
|
if (typeProperty.value.value !== expectedValue) context.report({
|
|
178
|
-
node
|
|
174
|
+
node,
|
|
179
175
|
messageId: MESSAGE_ID_WRONG_TYPE_VALUE,
|
|
180
176
|
data: {
|
|
181
177
|
expectedValue,
|
|
@@ -201,9 +197,100 @@ const builtin = () => [{
|
|
|
201
197
|
rules: RULES
|
|
202
198
|
}];
|
|
203
199
|
const builtinConfig = { [packageOrganization]: builtin };
|
|
204
|
-
|
|
205
200
|
//#endregion
|
|
206
|
-
//#region src/js/eslint/
|
|
201
|
+
//#region ../src/js/eslint/utils/module.ts
|
|
202
|
+
const MODULES = {
|
|
203
|
+
[packageOrganization]: { name: packageOrganization },
|
|
204
|
+
comments: {
|
|
205
|
+
name: "comments",
|
|
206
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_ESLINT_COMMENTS] }
|
|
207
|
+
},
|
|
208
|
+
css: {
|
|
209
|
+
name: "css",
|
|
210
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_CSS] }
|
|
211
|
+
},
|
|
212
|
+
gitignore: {
|
|
213
|
+
name: "gitignore",
|
|
214
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_FLAT_CONFIG_GITIGNORE] }
|
|
215
|
+
},
|
|
216
|
+
import: {
|
|
217
|
+
name: "import",
|
|
218
|
+
packages: {
|
|
219
|
+
requiredAny: [ESLINT_PACKAGES.ESLINT_PLUGIN_IMPORT_X, ESLINT_PACKAGES.ESLINT_PLUGIN_ANTFU],
|
|
220
|
+
optional: [ESLINT_PACKAGES.ESLINT_IMPORT_RESOVLER_TYPESCRIPT]
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
javascript: {
|
|
224
|
+
name: "javascript",
|
|
225
|
+
packages: { optional: [ESLINT_PACKAGES.ESLINT_PLUGIN_ANTFU, ESLINT_PACKAGES.ESLINT_PLUGIN_UNUSED_IMPORTS] }
|
|
226
|
+
},
|
|
227
|
+
jsdoc: {
|
|
228
|
+
name: "jsdoc",
|
|
229
|
+
packages: {
|
|
230
|
+
requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_JSDOC],
|
|
231
|
+
optional: [ESLINT_PACKAGES.ESLINT_PLUGIN_JSDOC_PROCESSOR]
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
json: {
|
|
235
|
+
name: "json",
|
|
236
|
+
packages: {
|
|
237
|
+
requiredAll: [ESLINT_PACKAGES.ESLINT_JSON],
|
|
238
|
+
optional: [ESLINT_PACKAGES.ESLINT_PLUGIN_JSONC]
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
markdown: {
|
|
242
|
+
name: "markdown",
|
|
243
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_MARKDOWN, ESLINT_PACKAGES.ESLINT_MERGE_PROCESSORS] }
|
|
244
|
+
},
|
|
245
|
+
node: {
|
|
246
|
+
name: "node",
|
|
247
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_N] }
|
|
248
|
+
},
|
|
249
|
+
perfectionist: {
|
|
250
|
+
name: "perfectionist",
|
|
251
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_PERFECTIONIST] }
|
|
252
|
+
},
|
|
253
|
+
regexp: {
|
|
254
|
+
name: "regexp",
|
|
255
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_REGEXP] }
|
|
256
|
+
},
|
|
257
|
+
style: {
|
|
258
|
+
name: "style",
|
|
259
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_STYLISTIC] }
|
|
260
|
+
},
|
|
261
|
+
svelte: {
|
|
262
|
+
name: "svelte",
|
|
263
|
+
packages: { requiredAll: [ESLINT_PACKAGES.SVELTE, ESLINT_PACKAGES.ESLINT_PLUGIN_SVELTE] }
|
|
264
|
+
},
|
|
265
|
+
test: {
|
|
266
|
+
name: "test",
|
|
267
|
+
packages: { requiredAll: [ESLINT_PACKAGES.VITEST_ESLINT_PLUGIN] }
|
|
268
|
+
},
|
|
269
|
+
toml: {
|
|
270
|
+
name: "toml",
|
|
271
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_TOML] }
|
|
272
|
+
},
|
|
273
|
+
typescript: {
|
|
274
|
+
name: "typescript",
|
|
275
|
+
packages: { requiredAll: [ESLINT_PACKAGES.TYPESCRIPT, ESLINT_PACKAGES.TYPESCRIPT_ESLINT] }
|
|
276
|
+
},
|
|
277
|
+
unicorn: {
|
|
278
|
+
name: "unicorn",
|
|
279
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_UNICORN] }
|
|
280
|
+
},
|
|
281
|
+
yaml: {
|
|
282
|
+
name: "yaml",
|
|
283
|
+
packages: { requiredAll: [ESLINT_PACKAGES.ESLINT_PLUGIN_YML] }
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
const resolvePackages = async (moduleInfo, type) => resolvePackagesSharedAsynchronously(moduleInfo, type);
|
|
287
|
+
const enabledStates = {};
|
|
288
|
+
const isModuleEnabled = (moduleInfo) => enabledStates[moduleInfo.name] ?? isModuleEnabledByDefault(moduleInfo);
|
|
289
|
+
const setModuleEnabled = (moduleInfo, state) => {
|
|
290
|
+
enabledStates[moduleInfo.name] = state;
|
|
291
|
+
};
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region ../src/js/eslint/configs/comments.ts
|
|
207
294
|
const comments = async () => {
|
|
208
295
|
const { requiredAll: [pluginComments] } = await resolvePackages(MODULES.comments);
|
|
209
296
|
if (!pluginComments) return [];
|
|
@@ -222,9 +309,8 @@ const comments = async () => {
|
|
|
222
309
|
}
|
|
223
310
|
}];
|
|
224
311
|
};
|
|
225
|
-
|
|
226
312
|
//#endregion
|
|
227
|
-
//#region src/js/eslint/configs/css.ts
|
|
313
|
+
//#region ../src/js/eslint/configs/css.ts
|
|
228
314
|
const css = async () => {
|
|
229
315
|
const { requiredAll: [pluginCss] } = await resolvePackages(MODULES.css);
|
|
230
316
|
if (!pluginCss) return [];
|
|
@@ -243,9 +329,8 @@ const css = async () => {
|
|
|
243
329
|
}
|
|
244
330
|
}];
|
|
245
331
|
};
|
|
246
|
-
|
|
247
332
|
//#endregion
|
|
248
|
-
//#region src/js/eslint/configs/gitignore.ts
|
|
333
|
+
//#region ../src/js/eslint/configs/gitignore.ts
|
|
249
334
|
const gitignore = async (options) => {
|
|
250
335
|
const { requiredAll: [pluginGitignore] } = await resolvePackages(MODULES.gitignore);
|
|
251
336
|
if (!pluginGitignore) return [];
|
|
@@ -254,16 +339,14 @@ const gitignore = async (options) => {
|
|
|
254
339
|
...options
|
|
255
340
|
})];
|
|
256
341
|
};
|
|
257
|
-
|
|
258
342
|
//#endregion
|
|
259
|
-
//#region src/js/eslint/configs/ignores.ts
|
|
343
|
+
//#region ../src/js/eslint/configs/ignores.ts
|
|
260
344
|
const ignores = (customIgnores = []) => [{
|
|
261
345
|
name: buildConfigName(MAIN_SCOPES.IGNORES, SUB_SCOPES.BASE),
|
|
262
346
|
ignores: [...GLOB_IGNORES, ...customIgnores]
|
|
263
347
|
}];
|
|
264
|
-
|
|
265
348
|
//#endregion
|
|
266
|
-
//#region src/js/eslint/configs/import.ts
|
|
349
|
+
//#region ../src/js/eslint/configs/import.ts
|
|
267
350
|
const imports = async () => {
|
|
268
351
|
const { requiredAny: [pluginImport, pluginAntfu], optional: [importResovlerTypescript] } = await resolvePackages(MODULES.import);
|
|
269
352
|
const plugins = {};
|
|
@@ -372,9 +455,8 @@ const imports = async () => {
|
|
|
372
455
|
}
|
|
373
456
|
}];
|
|
374
457
|
};
|
|
375
|
-
|
|
376
458
|
//#endregion
|
|
377
|
-
//#region src/js/eslint/configs/javascript.ts
|
|
459
|
+
//#region ../src/js/eslint/configs/javascript.ts
|
|
378
460
|
const javascript = async () => {
|
|
379
461
|
const { optional: [pluginAntfu, pluginUnusedImports] } = await resolvePackages(MODULES.javascript);
|
|
380
462
|
const plugins = {};
|
|
@@ -387,7 +469,7 @@ const javascript = async () => {
|
|
|
387
469
|
if (pluginUnusedImports) {
|
|
388
470
|
plugins["unused"] = pluginUnusedImports;
|
|
389
471
|
pluginRules["unused/no-unused-imports"] = "error";
|
|
390
|
-
pluginRules["unused/no-unused-vars"] =
|
|
472
|
+
pluginRules["unused/no-unused-vars"] = "error";
|
|
391
473
|
}
|
|
392
474
|
return [{
|
|
393
475
|
name: buildConfigName(MAIN_SCOPES.JAVASCRIPT, SUB_SCOPES.SETUP),
|
|
@@ -565,14 +647,12 @@ const javascript = async () => {
|
|
|
565
647
|
"no-shadow": "error",
|
|
566
648
|
"no-template-curly-in-string": "error",
|
|
567
649
|
"no-throw-literal": "error",
|
|
568
|
-
"no-unassigned-vars": "error",
|
|
569
650
|
"no-underscore-dangle": "error",
|
|
570
651
|
"no-unmodified-loop-condition": "error",
|
|
571
652
|
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
|
|
572
653
|
"no-unreachable-loop": "error",
|
|
573
654
|
"no-unused-expressions": "error",
|
|
574
655
|
"no-use-before-define": "error",
|
|
575
|
-
"no-useless-assignment": "error",
|
|
576
656
|
"no-useless-call": "error",
|
|
577
657
|
"no-useless-computed-key": "error",
|
|
578
658
|
"no-useless-concat": "error",
|
|
@@ -604,7 +684,6 @@ const javascript = async () => {
|
|
|
604
684
|
"prefer-rest-params": "error",
|
|
605
685
|
"prefer-spread": "error",
|
|
606
686
|
"prefer-template": "error",
|
|
607
|
-
"preserve-caught-error": "error",
|
|
608
687
|
radix: "error",
|
|
609
688
|
"require-atomic-updates": "error",
|
|
610
689
|
"require-await": "error",
|
|
@@ -619,9 +698,8 @@ const javascript = async () => {
|
|
|
619
698
|
}
|
|
620
699
|
}];
|
|
621
700
|
};
|
|
622
|
-
|
|
623
701
|
//#endregion
|
|
624
|
-
//#region src/js/eslint/configs/typescript.ts
|
|
702
|
+
//#region ../src/js/eslint/configs/typescript.ts
|
|
625
703
|
const DEFAULT_TYPE_AWARE_IGNORES = [`${GLOB_MD}/**`];
|
|
626
704
|
const getTsEslintParserIfExists = async () => {
|
|
627
705
|
const isTypescriptModuleEnabled = isModuleEnabled(MODULES.typescript);
|
|
@@ -632,17 +710,17 @@ const getTsEslintParserIfExists = async () => {
|
|
|
632
710
|
}
|
|
633
711
|
return parser;
|
|
634
712
|
};
|
|
635
|
-
const resolveTypeAwareOptions = (resolvedOptions, files, ignores
|
|
713
|
+
const resolveTypeAwareOptions = (resolvedOptions, files, ignores) => {
|
|
636
714
|
const typeAwareOptions = typeof resolvedOptions.typeAware === "object" ? resolvedOptions.typeAware : {
|
|
637
715
|
ignores: DEFAULT_TYPE_AWARE_IGNORES,
|
|
638
716
|
tsconfig: typeof resolvedOptions.typeAware === "string" ? resolvedOptions.typeAware : void 0
|
|
639
717
|
};
|
|
640
718
|
typeAwareOptions.files = [...new Set([...typeAwareOptions.files ?? [], ...files])];
|
|
641
|
-
typeAwareOptions.ignores = [...new Set([...typeAwareOptions.ignores ?? [], ...ignores
|
|
719
|
+
typeAwareOptions.ignores = [...new Set([...typeAwareOptions.ignores ?? [], ...ignores])];
|
|
642
720
|
return typeAwareOptions;
|
|
643
721
|
};
|
|
644
|
-
const extractRelevantRules = (configs
|
|
645
|
-
for (const config of configs
|
|
722
|
+
const extractRelevantRules = (configs, key) => {
|
|
723
|
+
for (const config of configs) if (config.name === `typescript-eslint/${key}` && config.rules) return renameRules(config.rules, { "@typescript-eslint": "ts" });
|
|
646
724
|
throw new Error(`Expected key "${key}" to be contained in given config.`);
|
|
647
725
|
};
|
|
648
726
|
const getNamingConvention = (isTypeAware) => {
|
|
@@ -731,6 +809,7 @@ const getNamingConvention = (isTypeAware) => {
|
|
|
731
809
|
const typescript = async (options) => {
|
|
732
810
|
const { requiredAll: [isTypescriptInstalled, tsEslint] } = await resolvePackages(MODULES.typescript);
|
|
733
811
|
if (!isTypescriptInstalled || !tsEslint) return [];
|
|
812
|
+
const { optional: [, pluginUnusedImports] } = await resolvePackages(MODULES.javascript);
|
|
734
813
|
const cwd = process.cwd();
|
|
735
814
|
let hasTsConfig = false;
|
|
736
815
|
try {
|
|
@@ -743,14 +822,14 @@ const typescript = async (options) => {
|
|
|
743
822
|
typeAware: hasTsConfig,
|
|
744
823
|
...options
|
|
745
824
|
};
|
|
746
|
-
const ignores
|
|
825
|
+
const ignores = resolvedOptions.ignores ?? [];
|
|
747
826
|
const files = [...new Set([...resolvedOptions.extraFileExtensions.map((extension) => `**/*.${extension}`), ...resolvedOptions.files ?? GLOB_SCRIPT_FILES])];
|
|
748
827
|
const hasEnabledTypeAwareness = resolvedOptions.typeAware !== false;
|
|
749
|
-
const typeAwareOptions = hasEnabledTypeAwareness ? resolveTypeAwareOptions(resolvedOptions, files, ignores
|
|
828
|
+
const typeAwareOptions = hasEnabledTypeAwareness ? resolveTypeAwareOptions(resolvedOptions, files, ignores) : {};
|
|
750
829
|
const createParserConfig = (isTypeAware) => ({
|
|
751
830
|
name: buildConfigName(MAIN_SCOPES.TYPESCRIPT, `${SUB_SCOPES.PARSER}${isTypeAware ? "-type-aware" : ""}`),
|
|
752
831
|
files: isTypeAware ? typeAwareOptions.files : files,
|
|
753
|
-
ignores: isTypeAware ? typeAwareOptions.ignores : ignores
|
|
832
|
+
ignores: isTypeAware ? typeAwareOptions.ignores : ignores,
|
|
754
833
|
languageOptions: {
|
|
755
834
|
parser: tsEslint.parser,
|
|
756
835
|
parserOptions: {
|
|
@@ -766,7 +845,7 @@ const typescript = async (options) => {
|
|
|
766
845
|
const createRulesConfig = (isTypeAware) => ({
|
|
767
846
|
name: buildConfigName(MAIN_SCOPES.TYPESCRIPT, `${SUB_SCOPES.RULES}${isTypeAware ? "-type-aware" : ""}`),
|
|
768
847
|
files: isTypeAware ? typeAwareOptions.files : files,
|
|
769
|
-
ignores: isTypeAware ? typeAwareOptions.ignores : ignores
|
|
848
|
+
ignores: isTypeAware ? typeAwareOptions.ignores : ignores,
|
|
770
849
|
rules: {
|
|
771
850
|
"ts/naming-convention": getNamingConvention(isTypeAware),
|
|
772
851
|
...isTypeAware ? {
|
|
@@ -790,6 +869,7 @@ const typescript = async (options) => {
|
|
|
790
869
|
...extractRelevantRules(tsEslint.configs.recommended, "recommended"),
|
|
791
870
|
...extractRelevantRules(tsEslint.configs.strict, "strict"),
|
|
792
871
|
...extractRelevantRules(tsEslint.configs.stylistic, "stylistic"),
|
|
872
|
+
...pluginUnusedImports ? { "ts/no-unused-vars": "off" } : void 0,
|
|
793
873
|
"ts/consistent-type-assertions": ["error", { assertionStyle: "angle-bracket" }],
|
|
794
874
|
"ts/consistent-type-imports": "error",
|
|
795
875
|
"ts/member-ordering": "error",
|
|
@@ -817,7 +897,7 @@ const typescript = async (options) => {
|
|
|
817
897
|
{
|
|
818
898
|
name: buildConfigName(MAIN_SCOPES.TYPESCRIPT, `${SUB_SCOPES.RULES}-typescript`),
|
|
819
899
|
files: [GLOB_TS],
|
|
820
|
-
ignores: typeAwareOptions.ignores ?? ignores
|
|
900
|
+
ignores: typeAwareOptions.ignores ?? ignores,
|
|
821
901
|
rules: {
|
|
822
902
|
"ts/explicit-function-return-type": "error",
|
|
823
903
|
"ts/explicit-member-accessibility": "error"
|
|
@@ -825,9 +905,8 @@ const typescript = async (options) => {
|
|
|
825
905
|
}
|
|
826
906
|
].filter(Boolean);
|
|
827
907
|
};
|
|
828
|
-
|
|
829
908
|
//#endregion
|
|
830
|
-
//#region src/js/eslint/configs/jsdoc.ts
|
|
909
|
+
//#region ../src/js/eslint/configs/jsdoc.ts
|
|
831
910
|
const jsdoc = async () => {
|
|
832
911
|
const { requiredAll: [pluginJsdoc], optional: [getJsdocProcessorPlugin] } = await resolvePackages(MODULES.jsdoc);
|
|
833
912
|
if (!pluginJsdoc) return [];
|
|
@@ -979,7 +1058,8 @@ const jsdoc = async () => {
|
|
|
979
1058
|
"any",
|
|
980
1059
|
{
|
|
981
1060
|
maxBlockLines: 1,
|
|
982
|
-
startLines: 1
|
|
1061
|
+
startLines: 1,
|
|
1062
|
+
startLinesWithNoTags: 0
|
|
983
1063
|
}
|
|
984
1064
|
],
|
|
985
1065
|
"jsdoc/text-escaping": ["error", { escapeHTML: true }],
|
|
@@ -1011,9 +1091,8 @@ const jsdoc = async () => {
|
|
|
1011
1091
|
}] : []
|
|
1012
1092
|
].filter(Boolean);
|
|
1013
1093
|
};
|
|
1014
|
-
|
|
1015
1094
|
//#endregion
|
|
1016
|
-
//#region src/js/eslint/configs/json.ts
|
|
1095
|
+
//#region ../src/js/eslint/configs/json.ts
|
|
1017
1096
|
const TSCONFIG_FILES = ["**/tsconfig.json", "**/tsconfig.*.json"];
|
|
1018
1097
|
const JSON_FILES_TO_TREAT_AS_JSONC = [...TSCONFIG_FILES, ".vscode/**/*.json"];
|
|
1019
1098
|
const LANGUAGE_TO_GLOB_MAP = {
|
|
@@ -1021,9 +1100,9 @@ const LANGUAGE_TO_GLOB_MAP = {
|
|
|
1021
1100
|
jsonc: [GLOB_JSONC, ...JSON_FILES_TO_TREAT_AS_JSONC],
|
|
1022
1101
|
json5: [GLOB_JSON5]
|
|
1023
1102
|
};
|
|
1024
|
-
const extractAllRules = (configs
|
|
1103
|
+
const extractAllRules = (configs) => {
|
|
1025
1104
|
const rules = {};
|
|
1026
|
-
for (const config of configs
|
|
1105
|
+
for (const config of configs) if (config.rules) objectAssign(rules, config.rules);
|
|
1027
1106
|
return rules;
|
|
1028
1107
|
};
|
|
1029
1108
|
const getJsoncSortConfigs = () => [
|
|
@@ -1450,7 +1529,7 @@ const getJsoncSortConfigs = () => [
|
|
|
1450
1529
|
}
|
|
1451
1530
|
];
|
|
1452
1531
|
const json = async () => {
|
|
1453
|
-
const { requiredAll: [pluginJson], optional: [pluginJsonc
|
|
1532
|
+
const { requiredAll: [pluginJson], optional: [pluginJsonc] } = await resolvePackages(MODULES.json);
|
|
1454
1533
|
if (!pluginJson) return [];
|
|
1455
1534
|
const createRulesConfig = (language) => ({
|
|
1456
1535
|
name: buildConfigName(MAIN_SCOPES.JSON, `${SUB_SCOPES.RULES}-${language}`),
|
|
@@ -1459,17 +1538,20 @@ const json = async () => {
|
|
|
1459
1538
|
...language === "json" ? { ignores: JSON_FILES_TO_TREAT_AS_JSONC } : void 0,
|
|
1460
1539
|
rules: {
|
|
1461
1540
|
...pluginJson.configs.recommended.rules,
|
|
1462
|
-
...pluginJsonc ? extractAllRules(pluginJsonc.configs[`
|
|
1541
|
+
...pluginJsonc ? extractAllRules(pluginJsonc.configs[`recommended-with-${language}`]) : void 0,
|
|
1463
1542
|
...pluginJsonc ? {
|
|
1464
1543
|
"jsonc/array-bracket-newline": ["error", "consistent"],
|
|
1465
1544
|
"jsonc/array-bracket-spacing": "error",
|
|
1466
1545
|
"jsonc/comma-style": "error",
|
|
1467
|
-
"jsonc/indent": ["error",
|
|
1546
|
+
"jsonc/indent": ["error", 2],
|
|
1468
1547
|
"jsonc/key-spacing": "error",
|
|
1469
|
-
"jsonc/no-irregular-whitespace": "error",
|
|
1470
1548
|
"jsonc/no-octal-escape": "error",
|
|
1471
1549
|
"jsonc/object-curly-newline": "error",
|
|
1472
|
-
"jsonc/object-curly-spacing": [
|
|
1550
|
+
"jsonc/object-curly-spacing": [
|
|
1551
|
+
"error",
|
|
1552
|
+
"always",
|
|
1553
|
+
{ emptyObjects: "never" }
|
|
1554
|
+
],
|
|
1473
1555
|
"jsonc/object-property-newline": "error",
|
|
1474
1556
|
"jsonc/quotes": ["error", "double"]
|
|
1475
1557
|
} : void 0
|
|
@@ -1486,26 +1568,16 @@ const json = async () => {
|
|
|
1486
1568
|
name: buildConfigName(MAIN_SCOPES.JSON, SUB_SCOPES.SETUP),
|
|
1487
1569
|
plugins
|
|
1488
1570
|
},
|
|
1489
|
-
parserJsonc ? {
|
|
1490
|
-
name: buildConfigName(MAIN_SCOPES.JSON, SUB_SCOPES.PARSER),
|
|
1491
|
-
files: [
|
|
1492
|
-
GLOB_JSON,
|
|
1493
|
-
GLOB_JSONC,
|
|
1494
|
-
GLOB_JSON5
|
|
1495
|
-
],
|
|
1496
|
-
languageOptions: { parser: parserJsonc }
|
|
1497
|
-
} : void 0,
|
|
1498
1571
|
createRulesConfig("json"),
|
|
1499
1572
|
createRulesConfig("jsonc"),
|
|
1500
|
-
|
|
1501
|
-
|
|
1573
|
+
createRulesConfig("json5"),
|
|
1574
|
+
...jsoncSortConfigs
|
|
1502
1575
|
].filter(Boolean);
|
|
1503
1576
|
};
|
|
1504
|
-
|
|
1505
1577
|
//#endregion
|
|
1506
|
-
//#region src/js/eslint/configs/markdown.ts
|
|
1507
|
-
const extractRelevantValues = (identifier, configs
|
|
1508
|
-
for (const config of configs
|
|
1578
|
+
//#region ../src/js/eslint/configs/markdown.ts
|
|
1579
|
+
const extractRelevantValues = (identifier, configs, key) => {
|
|
1580
|
+
for (const config of configs) if (config.name === `markdown/${key}` && config[identifier] !== void 0 && config[identifier] !== null) return config[identifier];
|
|
1509
1581
|
throw new Error(`Expected key "${key}" to be contained in given config.`);
|
|
1510
1582
|
};
|
|
1511
1583
|
const markdown = async (options) => {
|
|
@@ -1579,9 +1651,8 @@ const markdown = async (options) => {
|
|
|
1579
1651
|
}
|
|
1580
1652
|
];
|
|
1581
1653
|
};
|
|
1582
|
-
|
|
1583
1654
|
//#endregion
|
|
1584
|
-
//#region src/js/eslint/configs/node.ts
|
|
1655
|
+
//#region ../src/js/eslint/configs/node.ts
|
|
1585
1656
|
const node = async (options) => {
|
|
1586
1657
|
const { requiredAll: [pluginNode] } = await resolvePackages(MODULES.node);
|
|
1587
1658
|
if (!pluginNode) return [];
|
|
@@ -1605,9 +1676,11 @@ const node = async (options) => {
|
|
|
1605
1676
|
"node/no-sync": "error",
|
|
1606
1677
|
"node/prefer-global/buffer": "error",
|
|
1607
1678
|
"node/prefer-global/console": "error",
|
|
1679
|
+
"node/prefer-global/crypto": "error",
|
|
1608
1680
|
"node/prefer-global/process": "error",
|
|
1609
1681
|
"node/prefer-global/text-decoder": "error",
|
|
1610
1682
|
"node/prefer-global/text-encoder": "error",
|
|
1683
|
+
"node/prefer-global/timers": "error",
|
|
1611
1684
|
"node/prefer-global/url-search-params": "error",
|
|
1612
1685
|
"node/prefer-global/url": "error",
|
|
1613
1686
|
"node/prefer-node-protocol": "error",
|
|
@@ -1616,9 +1689,8 @@ const node = async (options) => {
|
|
|
1616
1689
|
}
|
|
1617
1690
|
}];
|
|
1618
1691
|
};
|
|
1619
|
-
|
|
1620
1692
|
//#endregion
|
|
1621
|
-
//#region src/js/eslint/configs/unicorn.ts
|
|
1693
|
+
//#region ../src/js/eslint/configs/unicorn.ts
|
|
1622
1694
|
const FILE_NAMES_TO_IGNORE = [
|
|
1623
1695
|
"ACKNOWLEDGMENTS.md",
|
|
1624
1696
|
"ADOPTERS.md",
|
|
@@ -1713,9 +1785,8 @@ const unicorn = async () => {
|
|
|
1713
1785
|
}
|
|
1714
1786
|
}];
|
|
1715
1787
|
};
|
|
1716
|
-
|
|
1717
1788
|
//#endregion
|
|
1718
|
-
//#region src/js/eslint/configs/overrides.ts
|
|
1789
|
+
//#region ../src/js/eslint/configs/overrides.ts
|
|
1719
1790
|
const jsOverrides = [{
|
|
1720
1791
|
name: buildConfigName(MAIN_SCOPES.OVERRIDES, `${MAIN_SCOPES.JAVASCRIPT}/scripts`),
|
|
1721
1792
|
files: ["scripts/**/*.?(c)js"],
|
|
@@ -1792,7 +1863,9 @@ const jsdocOverrides = isModuleEnabled(MODULES.jsdoc) ? [{
|
|
|
1792
1863
|
"style/eol-last": "off",
|
|
1793
1864
|
"style/no-multiple-empty-lines": "off",
|
|
1794
1865
|
"ts/no-unused-expressions": "off",
|
|
1795
|
-
"ts/no-unused-vars": "off"
|
|
1866
|
+
"ts/no-unused-vars": "off",
|
|
1867
|
+
"unused/no-unused-imports": "off",
|
|
1868
|
+
"unused/no-unused-vars": "off"
|
|
1796
1869
|
}
|
|
1797
1870
|
}, {
|
|
1798
1871
|
name: buildConfigName(MAIN_SCOPES.OVERRIDES, `${MAIN_SCOPES.JSDOC}/default-expressions`),
|
|
@@ -1865,9 +1938,8 @@ const overrides = () => [
|
|
|
1865
1938
|
}
|
|
1866
1939
|
}
|
|
1867
1940
|
];
|
|
1868
|
-
|
|
1869
1941
|
//#endregion
|
|
1870
|
-
//#region src/js/eslint/configs/perfectionist.ts
|
|
1942
|
+
//#region ../src/js/eslint/configs/perfectionist.ts
|
|
1871
1943
|
const perfectionist = async () => {
|
|
1872
1944
|
const { requiredAll: [pluginPerfectionist] } = await resolvePackages(MODULES.perfectionist);
|
|
1873
1945
|
if (!pluginPerfectionist) return [];
|
|
@@ -1887,9 +1959,8 @@ const perfectionist = async () => {
|
|
|
1887
1959
|
}
|
|
1888
1960
|
}];
|
|
1889
1961
|
};
|
|
1890
|
-
|
|
1891
1962
|
//#endregion
|
|
1892
|
-
//#region src/js/eslint/configs/regexp.ts
|
|
1963
|
+
//#region ../src/js/eslint/configs/regexp.ts
|
|
1893
1964
|
const regexp = async () => {
|
|
1894
1965
|
const { requiredAll: [pluginRegExp] } = await resolvePackages(MODULES.regexp);
|
|
1895
1966
|
if (!pluginRegExp) return [];
|
|
@@ -1939,16 +2010,15 @@ const regexp = async () => {
|
|
|
1939
2010
|
}
|
|
1940
2011
|
}];
|
|
1941
2012
|
};
|
|
1942
|
-
|
|
1943
2013
|
//#endregion
|
|
1944
|
-
//#region src/js/eslint/configs/style.ts
|
|
2014
|
+
//#region ../src/js/eslint/configs/style.ts
|
|
1945
2015
|
const style = async () => {
|
|
1946
2016
|
const { requiredAll: [pluginStyle] } = await resolvePackages(MODULES.style);
|
|
1947
2017
|
if (!pluginStyle) return [];
|
|
1948
2018
|
const styleConfig = pluginStyle.configs.customize({
|
|
1949
2019
|
jsx: true,
|
|
1950
2020
|
semi: true,
|
|
1951
|
-
indent:
|
|
2021
|
+
indent: 2,
|
|
1952
2022
|
quotes: QUOTES,
|
|
1953
2023
|
quoteProps: "as-needed",
|
|
1954
2024
|
arrowParens: true,
|
|
@@ -1967,6 +2037,20 @@ const style = async () => {
|
|
|
1967
2037
|
...renameRules(styleConfig.rules, { "@stylistic": "style" }),
|
|
1968
2038
|
"style/array-bracket-newline": ["error", "consistent"],
|
|
1969
2039
|
"style/array-element-newline": ["error", "consistent"],
|
|
2040
|
+
"style/exp-jsx-props-style": ["error", {
|
|
2041
|
+
singleLine: { maxItems: 3 },
|
|
2042
|
+
multiLine: {
|
|
2043
|
+
minItems: 2,
|
|
2044
|
+
maxItemsPerLine: 1
|
|
2045
|
+
}
|
|
2046
|
+
}],
|
|
2047
|
+
"style/exp-list-style": ["error", {
|
|
2048
|
+
singleLine: {
|
|
2049
|
+
spacing: "never",
|
|
2050
|
+
maxItems: 3
|
|
2051
|
+
},
|
|
2052
|
+
multiLine: { minItems: 1 }
|
|
2053
|
+
}],
|
|
1970
2054
|
"style/function-call-argument-newline": ["error", "consistent"],
|
|
1971
2055
|
"style/function-call-spacing": "error",
|
|
1972
2056
|
"style/function-paren-newline": ["error", "multiline-arguments"],
|
|
@@ -1979,7 +2063,7 @@ const style = async () => {
|
|
|
1979
2063
|
"style/implicit-arrow-linebreak": "error",
|
|
1980
2064
|
"style/indent": [
|
|
1981
2065
|
"error",
|
|
1982
|
-
|
|
2066
|
+
2,
|
|
1983
2067
|
{
|
|
1984
2068
|
...indentRuleConfig,
|
|
1985
2069
|
offsetTernaryExpressions: false
|
|
@@ -1988,6 +2072,10 @@ const style = async () => {
|
|
|
1988
2072
|
"style/jsx-child-element-spacing": "error",
|
|
1989
2073
|
"style/jsx-pascal-case": "error",
|
|
1990
2074
|
"style/jsx-self-closing-comp": "error",
|
|
2075
|
+
"style/jsx-newline": ["error", {
|
|
2076
|
+
prevent: true,
|
|
2077
|
+
allowMultilines: true
|
|
2078
|
+
}],
|
|
1991
2079
|
"style/line-comment-position": "error",
|
|
1992
2080
|
"style/linebreak-style": "error",
|
|
1993
2081
|
"style/lines-around-comment": ["error", {
|
|
@@ -2003,8 +2091,8 @@ const style = async () => {
|
|
|
2003
2091
|
allowTypeStart: true
|
|
2004
2092
|
}],
|
|
2005
2093
|
"style/max-len": ["error", {
|
|
2006
|
-
code:
|
|
2007
|
-
tabWidth:
|
|
2094
|
+
code: 120,
|
|
2095
|
+
tabWidth: 2,
|
|
2008
2096
|
ignoreUrls: true,
|
|
2009
2097
|
ignoreStrings: true,
|
|
2010
2098
|
ignoreComments: true
|
|
@@ -2243,11 +2331,10 @@ const style = async () => {
|
|
|
2243
2331
|
}
|
|
2244
2332
|
}];
|
|
2245
2333
|
};
|
|
2246
|
-
|
|
2247
2334
|
//#endregion
|
|
2248
|
-
//#region src/js/eslint/configs/svelte.ts
|
|
2249
|
-
const extractRelevantConfig = (configs
|
|
2250
|
-
for (const config of configs
|
|
2335
|
+
//#region ../src/js/eslint/configs/svelte.ts
|
|
2336
|
+
const extractRelevantConfig = (configs, key) => {
|
|
2337
|
+
for (const config of configs) if (config.name === `svelte:${key}` && config.rules) return config;
|
|
2251
2338
|
throw new Error(`Expected key "${key}" to be contained in given config.`);
|
|
2252
2339
|
};
|
|
2253
2340
|
const svelte = async () => {
|
|
@@ -2262,7 +2349,7 @@ const svelte = async () => {
|
|
|
2262
2349
|
name: buildConfigName(MAIN_SCOPES.SVELTE, SUB_SCOPES.PARSER),
|
|
2263
2350
|
files: [GLOB_SVELTE, GLOB_SVELTE_SCRIPT],
|
|
2264
2351
|
languageOptions: {
|
|
2265
|
-
parser: extractRelevantConfig(pluginSvelte.configs
|
|
2352
|
+
parser: extractRelevantConfig(pluginSvelte.configs.base, "base:setup-for-svelte").languageOptions?.["parser"],
|
|
2266
2353
|
parserOptions: {
|
|
2267
2354
|
extraFileExtensions: [".svelte"],
|
|
2268
2355
|
parser: await getTsEslintParserIfExists()
|
|
@@ -2278,7 +2365,7 @@ const svelte = async () => {
|
|
|
2278
2365
|
name: buildConfigName(MAIN_SCOPES.SVELTE, SUB_SCOPES.RULES),
|
|
2279
2366
|
files: [GLOB_SVELTE, GLOB_SVELTE_SCRIPT],
|
|
2280
2367
|
rules: {
|
|
2281
|
-
...extractRelevantConfig(pluginSvelte.configs
|
|
2368
|
+
...extractRelevantConfig(pluginSvelte.configs.recommended, "recommended:rules").rules,
|
|
2282
2369
|
"svelte/block-lang": ["error", {
|
|
2283
2370
|
enforceScriptPresent: false,
|
|
2284
2371
|
enforceStylePresent: false,
|
|
@@ -2306,7 +2393,7 @@ const svelte = async () => {
|
|
|
2306
2393
|
void: "never"
|
|
2307
2394
|
}],
|
|
2308
2395
|
"style/indent": "off",
|
|
2309
|
-
"svelte/indent": ["error", { indent:
|
|
2396
|
+
"svelte/indent": ["error", { indent: 2 }],
|
|
2310
2397
|
"svelte/max-attributes-per-line": ["error", {
|
|
2311
2398
|
multiline: 1,
|
|
2312
2399
|
singleline: 3
|
|
@@ -2342,9 +2429,8 @@ const svelte = async () => {
|
|
|
2342
2429
|
}
|
|
2343
2430
|
];
|
|
2344
2431
|
};
|
|
2345
|
-
|
|
2346
2432
|
//#endregion
|
|
2347
|
-
//#region src/js/eslint/configs/test.ts
|
|
2433
|
+
//#region ../src/js/eslint/configs/test.ts
|
|
2348
2434
|
const test = async () => {
|
|
2349
2435
|
const { requiredAll: [pluginVitest] } = await resolvePackages(MODULES.test);
|
|
2350
2436
|
if (!pluginVitest) return [];
|
|
@@ -2403,75 +2489,65 @@ const test = async () => {
|
|
|
2403
2489
|
}
|
|
2404
2490
|
}];
|
|
2405
2491
|
};
|
|
2406
|
-
|
|
2407
2492
|
//#endregion
|
|
2408
|
-
//#region src/js/eslint/configs/toml.ts
|
|
2493
|
+
//#region ../src/js/eslint/configs/toml.ts
|
|
2409
2494
|
const toml = async () => {
|
|
2410
|
-
const { requiredAll: [pluginToml
|
|
2411
|
-
if (!pluginToml
|
|
2412
|
-
return [
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
"toml/indent": ["error", INDENT],
|
|
2430
|
-
"toml/no-mixed-type-in-array": "error"
|
|
2431
|
-
}
|
|
2495
|
+
const { requiredAll: [pluginToml] } = await resolvePackages(MODULES.toml);
|
|
2496
|
+
if (!pluginToml) return [];
|
|
2497
|
+
return [{
|
|
2498
|
+
name: buildConfigName(MAIN_SCOPES.TOML, SUB_SCOPES.SETUP),
|
|
2499
|
+
plugins: { toml: pluginToml }
|
|
2500
|
+
}, {
|
|
2501
|
+
name: buildConfigName(MAIN_SCOPES.TOML, SUB_SCOPES.RULES),
|
|
2502
|
+
files: [GLOB_TOML],
|
|
2503
|
+
language: "toml/toml",
|
|
2504
|
+
rules: {
|
|
2505
|
+
...pluginToml.configs.standard[2]?.rules,
|
|
2506
|
+
"toml/array-bracket-spacing": ["error", "never"],
|
|
2507
|
+
"toml/indent": ["error", 2],
|
|
2508
|
+
"toml/inline-table-curly-spacing": [
|
|
2509
|
+
"error",
|
|
2510
|
+
"always",
|
|
2511
|
+
{ emptyObjects: "never" }
|
|
2512
|
+
],
|
|
2513
|
+
"toml/no-mixed-type-in-array": "error"
|
|
2432
2514
|
}
|
|
2433
|
-
];
|
|
2515
|
+
}];
|
|
2434
2516
|
};
|
|
2435
|
-
|
|
2436
2517
|
//#endregion
|
|
2437
|
-
//#region src/js/eslint/configs/yaml.ts
|
|
2518
|
+
//#region ../src/js/eslint/configs/yaml.ts
|
|
2438
2519
|
const yaml = async () => {
|
|
2439
|
-
const { requiredAll: [pluginYaml
|
|
2440
|
-
if (!pluginYaml
|
|
2441
|
-
return [
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
prefer: QUOTES
|
|
2466
|
-
}],
|
|
2467
|
-
"yaml/require-string-key": "error"
|
|
2468
|
-
}
|
|
2520
|
+
const { requiredAll: [pluginYaml] } = await resolvePackages(MODULES.yaml);
|
|
2521
|
+
if (!pluginYaml) return [];
|
|
2522
|
+
return [{
|
|
2523
|
+
name: buildConfigName(MAIN_SCOPES.YAML, SUB_SCOPES.SETUP),
|
|
2524
|
+
plugins: { yaml: pluginYaml }
|
|
2525
|
+
}, {
|
|
2526
|
+
name: buildConfigName(MAIN_SCOPES.YAML, SUB_SCOPES.RULES),
|
|
2527
|
+
files: [GLOB_YAML],
|
|
2528
|
+
language: "yaml/yaml",
|
|
2529
|
+
rules: {
|
|
2530
|
+
...renameRules(pluginYaml.configs.standard[2]?.rules, { yml: "yaml" }),
|
|
2531
|
+
"yaml/block-mapping-colon-indicator-newline": ["error", "never"],
|
|
2532
|
+
"yaml/file-extension": "error",
|
|
2533
|
+
"yaml/flow-mapping-curly-spacing": [
|
|
2534
|
+
"error",
|
|
2535
|
+
"always",
|
|
2536
|
+
{ emptyObjects: "never" }
|
|
2537
|
+
],
|
|
2538
|
+
"yaml/indent": ["error", 2],
|
|
2539
|
+
"yaml/no-multiple-empty-lines": "error",
|
|
2540
|
+
"yaml/no-trailing-zeros": "error",
|
|
2541
|
+
"yaml/quotes": ["error", {
|
|
2542
|
+
avoidEscape: true,
|
|
2543
|
+
prefer: QUOTES
|
|
2544
|
+
}],
|
|
2545
|
+
"yaml/require-string-key": "error"
|
|
2469
2546
|
}
|
|
2470
|
-
];
|
|
2547
|
+
}];
|
|
2471
2548
|
};
|
|
2472
|
-
|
|
2473
2549
|
//#endregion
|
|
2474
|
-
//#region src/js/eslint/configs/index.ts
|
|
2550
|
+
//#region ../src/js/eslint/configs/index.ts
|
|
2475
2551
|
const configs = {
|
|
2476
2552
|
[packageOrganization]: builtinConfig[packageOrganization],
|
|
2477
2553
|
comments,
|
|
@@ -2495,9 +2571,8 @@ const configs = {
|
|
|
2495
2571
|
unicorn,
|
|
2496
2572
|
yaml
|
|
2497
2573
|
};
|
|
2498
|
-
|
|
2499
2574
|
//#endregion
|
|
2500
|
-
//#region src/js/eslint/index.ts
|
|
2575
|
+
//#region ../src/js/eslint/index.ts
|
|
2501
2576
|
const getConfig = (optionsAndGlobalConfig, ...additionalConfigs) => {
|
|
2502
2577
|
const resolvedOptions = {
|
|
2503
2578
|
[packageOrganization]: isModuleEnabledByDefault(MODULES[packageOrganization]),
|
|
@@ -2567,6 +2642,5 @@ const getConfig = (optionsAndGlobalConfig, ...additionalConfigs) => {
|
|
|
2567
2642
|
return composer;
|
|
2568
2643
|
};
|
|
2569
2644
|
var eslint_default = getConfig();
|
|
2570
|
-
|
|
2571
2645
|
//#endregion
|
|
2572
|
-
export { eslint_default as default, getConfig };
|
|
2646
|
+
export { eslint_default as default, getConfig };
|