@jsse/eslint-config 0.4.9 → 0.4.12
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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cli.js +10 -6
- package/dist/index.d.ts +22 -3
- package/dist/index.js +60 -148
- package/dist/version-BbraMghN.js +39 -0
- package/package.json +18 -15
- package/dist/esm/cli.d.ts +0 -1
- package/dist/esm/cli.js +0 -121
- package/dist/esm/config-fns.d.ts +0 -138
- package/dist/esm/config-fns.js +0 -161
- package/dist/esm/configs/antfu.d.ts +0 -4
- package/dist/esm/configs/antfu.js +0 -30
- package/dist/esm/configs/command.d.ts +0 -10
- package/dist/esm/configs/command.js +0 -17
- package/dist/esm/configs/de-morgan.d.ts +0 -2
- package/dist/esm/configs/de-morgan.js +0 -9
- package/dist/esm/configs/eslint-comments.d.ts +0 -2
- package/dist/esm/configs/eslint-comments.js +0 -16
- package/dist/esm/configs/gql.d.ts +0 -2
- package/dist/esm/configs/gql.js +0 -4
- package/dist/esm/configs/ignores.d.ts +0 -2
- package/dist/esm/configs/ignores.js +0 -9
- package/dist/esm/configs/imports.d.ts +0 -2
- package/dist/esm/configs/imports.js +0 -28
- package/dist/esm/configs/javascript.d.ts +0 -6
- package/dist/esm/configs/javascript.js +0 -262
- package/dist/esm/configs/jsdoc.d.ts +0 -2
- package/dist/esm/configs/jsdoc.js +0 -31
- package/dist/esm/configs/jsonc.d.ts +0 -4
- package/dist/esm/configs/jsonc.js +0 -76
- package/dist/esm/configs/markdown.d.ts +0 -4
- package/dist/esm/configs/markdown.js +0 -122
- package/dist/esm/configs/n.d.ts +0 -2
- package/dist/esm/configs/n.js +0 -21
- package/dist/esm/configs/no-only-tests.d.ts +0 -4
- package/dist/esm/configs/no-only-tests.js +0 -31
- package/dist/esm/configs/perfectionist.d.ts +0 -7
- package/dist/esm/configs/perfectionist.js +0 -60
- package/dist/esm/configs/pnpm.d.ts +0 -2
- package/dist/esm/configs/pnpm.js +0 -34
- package/dist/esm/configs/prettier.d.ts +0 -7
- package/dist/esm/configs/prettier.js +0 -126
- package/dist/esm/configs/react.d.ts +0 -6
- package/dist/esm/configs/react.js +0 -300
- package/dist/esm/configs/sort-package-json.d.ts +0 -7
- package/dist/esm/configs/sort-package-json.js +0 -102
- package/dist/esm/configs/sort-tsconfig.d.ts +0 -14
- package/dist/esm/configs/sort-tsconfig.js +0 -135
- package/dist/esm/configs/stylistic.d.ts +0 -2
- package/dist/esm/configs/stylistic.js +0 -39
- package/dist/esm/configs/tailwind.d.ts +0 -1
- package/dist/esm/configs/tailwind.js +0 -81
- package/dist/esm/configs/toml.d.ts +0 -2
- package/dist/esm/configs/toml.js +0 -50
- package/dist/esm/configs/ts/parser.d.ts +0 -7
- package/dist/esm/configs/ts/parser.js +0 -71
- package/dist/esm/configs/ts/requires-type-checking.d.ts +0 -1
- package/dist/esm/configs/ts/requires-type-checking.js +0 -61
- package/dist/esm/configs/ts/typescript-language-options.d.ts +0 -2
- package/dist/esm/configs/ts/typescript-language-options.js +0 -22
- package/dist/esm/configs/ts/typescript-rules.d.ts +0 -11
- package/dist/esm/configs/ts/typescript-rules.js +0 -379
- package/dist/esm/configs/ts/typescript.d.ts +0 -4
- package/dist/esm/configs/ts/typescript.js +0 -123
- package/dist/esm/configs/tsdoc.d.ts +0 -2
- package/dist/esm/configs/tsdoc.js +0 -16
- package/dist/esm/configs/unicorn.d.ts +0 -2
- package/dist/esm/configs/unicorn.js +0 -114
- package/dist/esm/configs/vitest.d.ts +0 -4
- package/dist/esm/configs/vitest.js +0 -29
- package/dist/esm/configs/yml.d.ts +0 -4
- package/dist/esm/configs/yml.js +0 -51
- package/dist/esm/const.d.ts +0 -5
- package/dist/esm/const.js +0 -25
- package/dist/esm/define-config.d.ts +0 -7
- package/dist/esm/define-config.js +0 -256
- package/dist/esm/dev.d.ts +0 -4
- package/dist/esm/dev.js +0 -25
- package/dist/esm/fixable.d.ts +0 -2
- package/dist/esm/fixable.js +0 -4
- package/dist/esm/generated/fixable-rules-map.d.ts +0 -2
- package/dist/esm/generated/fixable-rules-map.js +0 -443
- package/dist/esm/generated/version.d.ts +0 -1
- package/dist/esm/generated/version.js +0 -1
- package/dist/esm/globs.d.ts +0 -25
- package/dist/esm/globs.js +0 -73
- package/dist/esm/index.d.ts +0 -9
- package/dist/esm/index.js +0 -8
- package/dist/esm/lager.d.ts +0 -32
- package/dist/esm/lager.js +0 -87
- package/dist/esm/log.d.ts +0 -2
- package/dist/esm/log.js +0 -2
- package/dist/esm/plugins-all.d.ts +0 -26
- package/dist/esm/plugins-all.js +0 -120
- package/dist/esm/plugins.d.ts +0 -1570
- package/dist/esm/plugins.js +0 -97
- package/dist/esm/presets.d.ts +0 -18
- package/dist/esm/presets.js +0 -75
- package/dist/esm/types.d.ts +0 -287
- package/dist/esm/types.js +0 -1
- package/dist/esm/utils.d.ts +0 -51
- package/dist/esm/utils.js +0 -156
- package/dist/version-DNhPWuQE.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @jsse/eslint-config
|
|
2
2
|
|
|
3
|
+
## 0.4.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- deps up
|
|
8
|
+
|
|
9
|
+
## 0.4.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f5835d3: remove old logging thing
|
|
14
|
+
|
|
15
|
+
## 0.4.10
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 5ea701f: added oxlint
|
|
20
|
+
|
|
3
21
|
## 0.4.9
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VERSION } from "./version-
|
|
1
|
+
import { DEBUG, VERSION } from "./version-BbraMghN.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import process$1 from "node:process";
|
|
4
4
|
import { EventEmitter } from "events";
|
|
@@ -572,10 +572,12 @@ var CAC = class extends EventEmitter {
|
|
|
572
572
|
}
|
|
573
573
|
};
|
|
574
574
|
const cac = (name = "") => new CAC(name);
|
|
575
|
+
var dist_default = cac;
|
|
575
576
|
|
|
576
577
|
//#endregion
|
|
577
578
|
//#region src/cli.ts
|
|
578
579
|
const cli = cac("jsselint");
|
|
580
|
+
const DEBUG$1 = DEBUG || process$1.argv.includes("-debug");
|
|
579
581
|
const CONFIG_OPTIONS_STRING = `
|
|
580
582
|
{
|
|
581
583
|
/**
|
|
@@ -626,7 +628,7 @@ export default jsse(
|
|
|
626
628
|
${CONFIG_OPTIONS_STRING}
|
|
627
629
|
);
|
|
628
630
|
`;
|
|
629
|
-
cli.command("", "default command").action(() => {
|
|
631
|
+
cli.command("", "default command ~ show help").action(() => {
|
|
630
632
|
cli.outputHelp();
|
|
631
633
|
process$1.exit(1);
|
|
632
634
|
});
|
|
@@ -661,12 +663,14 @@ cli.command("version", "echo version").action(() => {
|
|
|
661
663
|
cli.version(typeof VERSION === "string" ? VERSION : "unknown");
|
|
662
664
|
cli.help();
|
|
663
665
|
async function main(args) {
|
|
664
|
-
const argv = args ?? process$1.argv
|
|
666
|
+
const argv = args ?? process$1.argv;
|
|
665
667
|
try {
|
|
666
668
|
const parsed = cli.parse(argv, { run: false });
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
669
|
+
if (DEBUG$1) {
|
|
670
|
+
console.log("=====");
|
|
671
|
+
console.log(parsed);
|
|
672
|
+
console.log("=====");
|
|
673
|
+
}
|
|
670
674
|
await cli.runMatchedCommand();
|
|
671
675
|
} catch (error) {
|
|
672
676
|
if (error instanceof Error) {
|
package/dist/index.d.ts
CHANGED
|
@@ -4595,7 +4595,7 @@ interface MarkdownRuleOptions {
|
|
|
4595
4595
|
* Enforce heading levels increment by one
|
|
4596
4596
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
4597
4597
|
*/
|
|
4598
|
-
"markdown/heading-increment"?: Linter.RuleEntry<
|
|
4598
|
+
"markdown/heading-increment"?: Linter.RuleEntry<MarkdownHeadingIncrement>;
|
|
4599
4599
|
/**
|
|
4600
4600
|
* Disallow bare URLs
|
|
4601
4601
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md
|
|
@@ -4640,7 +4640,7 @@ interface MarkdownRuleOptions {
|
|
|
4640
4640
|
* Disallow headings without a space after the hash characters
|
|
4641
4641
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md
|
|
4642
4642
|
*/
|
|
4643
|
-
"markdown/no-missing-atx-heading-space"?: Linter.RuleEntry<
|
|
4643
|
+
"markdown/no-missing-atx-heading-space"?: Linter.RuleEntry<MarkdownNoMissingAtxHeadingSpace>;
|
|
4644
4644
|
/**
|
|
4645
4645
|
* Disallow missing label references
|
|
4646
4646
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md
|
|
@@ -4661,6 +4661,11 @@ interface MarkdownRuleOptions {
|
|
|
4661
4661
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
4662
4662
|
*/
|
|
4663
4663
|
"markdown/no-reversed-media-syntax"?: Linter.RuleEntry<[]>;
|
|
4664
|
+
/**
|
|
4665
|
+
* Disallow spaces around emphasis markers
|
|
4666
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md
|
|
4667
|
+
*/
|
|
4668
|
+
"markdown/no-space-in-emphasis"?: Linter.RuleEntry<MarkdownNoSpaceInEmphasis>;
|
|
4664
4669
|
/**
|
|
4665
4670
|
* Disallow unused definitions
|
|
4666
4671
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
|
|
@@ -4683,6 +4688,10 @@ interface MarkdownRuleOptions {
|
|
|
4683
4688
|
type MarkdownFencedCodeLanguage = [] | [{
|
|
4684
4689
|
required?: string[];
|
|
4685
4690
|
}];
|
|
4691
|
+
// ----- markdown/heading-increment -----
|
|
4692
|
+
type MarkdownHeadingIncrement = [] | [{
|
|
4693
|
+
frontmatterTitle?: string;
|
|
4694
|
+
}];
|
|
4686
4695
|
// ----- markdown/no-duplicate-definitions -----
|
|
4687
4696
|
type MarkdownNoDuplicateDefinitions = [] | [{
|
|
4688
4697
|
allowDefinitions?: string[];
|
|
@@ -4701,6 +4710,11 @@ type MarkdownNoEmptyDefinitions = [] | [{
|
|
|
4701
4710
|
// ----- markdown/no-html -----
|
|
4702
4711
|
type MarkdownNoHtml = [] | [{
|
|
4703
4712
|
allowed?: string[];
|
|
4713
|
+
allowedIgnoreCase?: boolean;
|
|
4714
|
+
}];
|
|
4715
|
+
// ----- markdown/no-missing-atx-heading-space -----
|
|
4716
|
+
type MarkdownNoMissingAtxHeadingSpace = [] | [{
|
|
4717
|
+
checkClosedHeadings?: boolean;
|
|
4704
4718
|
}];
|
|
4705
4719
|
// ----- markdown/no-missing-link-fragments -----
|
|
4706
4720
|
type MarkdownNoMissingLinkFragments = [] | [{
|
|
@@ -4711,6 +4725,10 @@ type MarkdownNoMissingLinkFragments = [] | [{
|
|
|
4711
4725
|
type MarkdownNoMultipleH1 = [] | [{
|
|
4712
4726
|
frontmatterTitle?: string;
|
|
4713
4727
|
}];
|
|
4728
|
+
// ----- markdown/no-space-in-emphasis -----
|
|
4729
|
+
type MarkdownNoSpaceInEmphasis = [] | [{
|
|
4730
|
+
checkStrikethrough?: boolean;
|
|
4731
|
+
}];
|
|
4714
4732
|
// ----- markdown/no-unused-definitions -----
|
|
4715
4733
|
type MarkdownNoUnusedDefinitions = [] | [{
|
|
4716
4734
|
allowDefinitions?: string[];
|
|
@@ -13738,6 +13756,7 @@ type OptionsConfig = {
|
|
|
13738
13756
|
type RenamePefix<T extends Record<string, unknown>, FromPref extends string, ToPref extends string> = { [K in keyof T as K extends `${FromPref}${infer Rest}` ? `${ToPref}${Rest}` : K]: T[K] };
|
|
13739
13757
|
//#endregion
|
|
13740
13758
|
//#region src/const.d.ts
|
|
13759
|
+
declare const DEBUG: boolean;
|
|
13741
13760
|
declare const SLOW_RULES: RuleName[];
|
|
13742
13761
|
//#endregion
|
|
13743
13762
|
//#region src/define-config.d.ts
|
|
@@ -13749,7 +13768,7 @@ declare function defineConfig(options?: OptionsConfig & Config, ...userConfigs:
|
|
|
13749
13768
|
type DefineConfig = typeof defineConfig;
|
|
13750
13769
|
//#endregion
|
|
13751
13770
|
//#region src/generated/version.d.ts
|
|
13752
|
-
declare const VERSION = "0.4.
|
|
13771
|
+
declare const VERSION = "0.4.12";
|
|
13753
13772
|
declare namespace globs_d_exports {
|
|
13754
13773
|
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JS_SRC_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_YAML };
|
|
13755
13774
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS, __export, __toESM } from "./chunk-CkHaCily.js";
|
|
2
|
-
import { VERSION } from "./version-
|
|
2
|
+
import { DEBUG, SLOW_RULES, VERSION } from "./version-BbraMghN.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import fs, { promises, realpathSync, statSync } from "node:fs";
|
|
5
5
|
import process$1 from "node:process";
|
|
@@ -27,30 +27,6 @@ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
|
27
27
|
import tseslint from "typescript-eslint";
|
|
28
28
|
import { fixupPluginRules } from "@eslint/compat";
|
|
29
29
|
|
|
30
|
-
//#region src/const.ts
|
|
31
|
-
const SLOW_RULES = [
|
|
32
|
-
"@typescript-eslint/no-misused-promises",
|
|
33
|
-
"@typescript-eslint/no-redeclare",
|
|
34
|
-
"@typescript-eslint/no-unsafe-assignment",
|
|
35
|
-
"@typescript-eslint/no-unsafe-call",
|
|
36
|
-
"@typescript-eslint/no-unsafe-member-access",
|
|
37
|
-
"@typescript-eslint/no-unsafe-return",
|
|
38
|
-
"import/no-duplicates",
|
|
39
|
-
"jsdoc/check-access",
|
|
40
|
-
"jsdoc/check-alignment",
|
|
41
|
-
"jsdoc/check-property-names",
|
|
42
|
-
"jsdoc/check-types",
|
|
43
|
-
"jsdoc/empty-tags",
|
|
44
|
-
"jsdoc/multiline-blocks",
|
|
45
|
-
"jsdoc/no-multi-asterisks",
|
|
46
|
-
"jsdoc/require-property-description",
|
|
47
|
-
"jsdoc/require-property-name",
|
|
48
|
-
"jsdoc/require-property",
|
|
49
|
-
"unicorn/expiring-todo-comments",
|
|
50
|
-
"unicorn/no-unnecessary-polyfills"
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
30
|
//#region node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs
|
|
55
31
|
var astralIdentifierCodes = [
|
|
56
32
|
509,
|
|
@@ -10642,7 +10618,7 @@ async function findWorkspaceDir(id = process.cwd(), options = {}) {
|
|
|
10642
10618
|
}
|
|
10643
10619
|
|
|
10644
10620
|
//#endregion
|
|
10645
|
-
//#region node_modules/.pnpm/mlly@1.
|
|
10621
|
+
//#region node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs
|
|
10646
10622
|
const BUILTIN_MODULES = new Set(builtinModules);
|
|
10647
10623
|
function normalizeSlash(path$1) {
|
|
10648
10624
|
return path$1.replace(/\\/g, "/");
|
|
@@ -10664,12 +10640,12 @@ function matchAll(regex, string, addition) {
|
|
|
10664
10640
|
return matches;
|
|
10665
10641
|
}
|
|
10666
10642
|
function clearImports(imports$1) {
|
|
10667
|
-
return (imports$1 || "").replace(
|
|
10643
|
+
return (imports$1 || "").replace(/\/\/[^\n]*\n|\/\*.*\*\//g, "").replace(/\s+/g, " ");
|
|
10668
10644
|
}
|
|
10669
10645
|
function getImportNames(cleanedImports) {
|
|
10670
|
-
const topLevelImports = cleanedImports.replace(/{
|
|
10646
|
+
const topLevelImports = cleanedImports.replace(/{[^}]*}/, "");
|
|
10671
10647
|
const namespacedImport = topLevelImports.match(/\* as \s*(\S*)/)?.[1];
|
|
10672
|
-
const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() ||
|
|
10648
|
+
const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0;
|
|
10673
10649
|
return {
|
|
10674
10650
|
namespacedImport,
|
|
10675
10651
|
defaultImport
|
|
@@ -11246,7 +11222,7 @@ function defaultGetFormatWithoutErrors(url, context) {
|
|
|
11246
11222
|
return protocolHandlers[protocol](url, context, true) || null;
|
|
11247
11223
|
}
|
|
11248
11224
|
const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
11249
|
-
const {
|
|
11225
|
+
const { ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST } = codes;
|
|
11250
11226
|
const own = {}.hasOwnProperty;
|
|
11251
11227
|
const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
|
|
11252
11228
|
const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i;
|
|
@@ -11914,7 +11890,7 @@ function normalizeid(id) {
|
|
|
11914
11890
|
if (typeof id !== "string") {
|
|
11915
11891
|
id = id.toString();
|
|
11916
11892
|
}
|
|
11917
|
-
if (/(node|data|http|https|file):/.test(id)) {
|
|
11893
|
+
if (/(?:node|data|http|https|file):/.test(id)) {
|
|
11918
11894
|
return id;
|
|
11919
11895
|
}
|
|
11920
11896
|
if (BUILTIN_MODULES.has(id)) {
|
|
@@ -11931,13 +11907,13 @@ function toDataURL(code) {
|
|
|
11931
11907
|
return `data:text/javascript;base64,${base64}`;
|
|
11932
11908
|
}
|
|
11933
11909
|
function isNodeBuiltin(id = "") {
|
|
11934
|
-
id = id.replace(/^node:/, "").split("/")[0];
|
|
11910
|
+
id = id.replace(/^node:/, "").split("/", 1)[0];
|
|
11935
11911
|
return BUILTIN_MODULES.has(id);
|
|
11936
11912
|
}
|
|
11937
11913
|
const ProtocolRegex = /^(?<proto>.{2,}?):.+$/;
|
|
11938
11914
|
function getProtocol(id) {
|
|
11939
11915
|
const proto = id.match(ProtocolRegex);
|
|
11940
|
-
return proto ? proto.groups?.proto :
|
|
11916
|
+
return proto ? proto.groups?.proto : void 0;
|
|
11941
11917
|
}
|
|
11942
11918
|
const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]);
|
|
11943
11919
|
const DEFAULT_EXTENSIONS = [
|
|
@@ -11969,7 +11945,7 @@ function _resolve$1(id, options = {}) {
|
|
|
11969
11945
|
throw new TypeError("input must be a `string` or `URL`");
|
|
11970
11946
|
}
|
|
11971
11947
|
}
|
|
11972
|
-
if (/(node|data|http|https):/.test(id)) {
|
|
11948
|
+
if (/(?:node|data|http|https):/.test(id)) {
|
|
11973
11949
|
return id;
|
|
11974
11950
|
}
|
|
11975
11951
|
if (BUILTIN_MODULES.has(id)) {
|
|
@@ -12071,7 +12047,7 @@ function parseNodeModulePath(path$1) {
|
|
|
12071
12047
|
return {
|
|
12072
12048
|
dir,
|
|
12073
12049
|
name,
|
|
12074
|
-
subpath: subpath ? `.${subpath}` :
|
|
12050
|
+
subpath: subpath ? `.${subpath}` : void 0
|
|
12075
12051
|
};
|
|
12076
12052
|
}
|
|
12077
12053
|
async function lookupNodeModuleSubpath(path$1) {
|
|
@@ -12103,7 +12079,7 @@ function _findSubpath(subpath, exports) {
|
|
|
12103
12079
|
}
|
|
12104
12080
|
function _flattenExports(exports = {}, parentSubpath = "./") {
|
|
12105
12081
|
return Object.entries(exports).flatMap(([key, value]) => {
|
|
12106
|
-
const [subpath, condition] = key.startsWith(".") ? [key.slice(1),
|
|
12082
|
+
const [subpath, condition] = key.startsWith(".") ? [key.slice(1), void 0] : ["", key];
|
|
12107
12083
|
const _subPath = joinURL(parentSubpath, subpath);
|
|
12108
12084
|
if (typeof value === "string") {
|
|
12109
12085
|
return [{
|
|
@@ -12116,16 +12092,17 @@ function _flattenExports(exports = {}, parentSubpath = "./") {
|
|
|
12116
12092
|
}
|
|
12117
12093
|
});
|
|
12118
12094
|
}
|
|
12119
|
-
const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*([\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;
|
|
12095
|
+
const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*(?:[\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;
|
|
12120
12096
|
const DYNAMIC_IMPORT_RE = /import\s*\((?<expression>(?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*)\)/gm;
|
|
12121
|
-
const IMPORT_NAMED_TYPE_RE = /(?<=\s|^|;|})import\s*type\s+([\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gm;
|
|
12122
|
-
const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?<name>[\w$]+)(?<extraNames>.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g;
|
|
12123
|
-
const EXPORT_DECAL_TYPE_RE = /\bexport\s+(?<declaration>(interface|type|declare (async function|function|let|const enum|const|enum|var|class)))\s+(?<name>[\w$]+)/g;
|
|
12124
|
-
const EXPORT_NAMED_RE = /\bexport\s*{(?<exports>[^}]+?)[\s,]*}(
|
|
12125
|
-
const EXPORT_NAMED_TYPE_RE = /\bexport\s+type\s*{(?<exports>[^}]+?)[\s,]*}(
|
|
12126
|
-
const EXPORT_NAMED_DESTRUCT = /\bexport\s+(let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm;
|
|
12127
|
-
const EXPORT_STAR_RE = /\bexport\s
|
|
12097
|
+
const IMPORT_NAMED_TYPE_RE = /(?<=\s|^|;|})import\s*type\s+(?:[\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gm;
|
|
12098
|
+
const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(?:async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?<name>[\w$]+)(?<extraNames>.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g;
|
|
12099
|
+
const EXPORT_DECAL_TYPE_RE = /\bexport\s+(?<declaration>(?:interface|type|declare (?:async function|function|let|const enum|const|enum|var|class)))\s+(?<name>[\w$]+)/g;
|
|
12100
|
+
const EXPORT_NAMED_RE = /\bexport\s*{(?<exports>[^}]+?)[\s,]*}(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
|
|
12101
|
+
const EXPORT_NAMED_TYPE_RE = /\bexport\s+type\s*{(?<exports>[^}]+?)[\s,]*}(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
|
|
12102
|
+
const EXPORT_NAMED_DESTRUCT = /\bexport\s+(?:let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm;
|
|
12103
|
+
const EXPORT_STAR_RE = /\bexport\s*\*(?:\s*as\s+(?<name>[\w$]+)\s+)?\s*(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
|
|
12128
12104
|
const EXPORT_DEFAULT_RE = /\bexport\s+default\s+(async function|function|class|true|false|\W|\d)|\bexport\s+default\s+(?<defaultName>.*)/g;
|
|
12105
|
+
const EXPORT_DEFAULT_CLASS_RE = /\bexport\s+default\s+(?<declaration>class)\s+(?<name>[\w$]+)/g;
|
|
12129
12106
|
const TYPE_RE = /^\s*?type\s/;
|
|
12130
12107
|
function findStaticImports(code) {
|
|
12131
12108
|
return _filterStatement(_tryGetLocations(code, "import"), matchAll(ESM_STATIC_IMPORT_RE, code, { type: "static" }));
|
|
@@ -12182,6 +12159,9 @@ function parseTypeImport(matched) {
|
|
|
12182
12159
|
function findExports(code) {
|
|
12183
12160
|
const declaredExports = matchAll(EXPORT_DECAL_RE, code, { type: "declaration" });
|
|
12184
12161
|
for (const declaredExport of declaredExports) {
|
|
12162
|
+
if (/^export\s+(?:async\s+)?function/.test(declaredExport.code)) {
|
|
12163
|
+
continue;
|
|
12164
|
+
}
|
|
12185
12165
|
const extraNamesStr = declaredExport.extraNames;
|
|
12186
12166
|
if (extraNamesStr) {
|
|
12187
12167
|
const extraNames = matchAll(/({.*?})|(\[.*?])|(,\s*(?<name>\w+))/g, extraNamesStr, {}).map((m$2) => m$2.name).filter(Boolean);
|
|
@@ -12199,12 +12179,14 @@ function findExports(code) {
|
|
|
12199
12179
|
type: "default",
|
|
12200
12180
|
name: "default"
|
|
12201
12181
|
});
|
|
12182
|
+
const defaultClassExports = matchAll(EXPORT_DEFAULT_CLASS_RE, code, { type: "declaration" });
|
|
12202
12183
|
const starExports = matchAll(EXPORT_STAR_RE, code, { type: "star" });
|
|
12203
12184
|
const exports = normalizeExports([
|
|
12204
12185
|
...declaredExports,
|
|
12205
12186
|
...namedExports,
|
|
12206
12187
|
...destructuredExports,
|
|
12207
12188
|
...defaultExport,
|
|
12189
|
+
...defaultClassExports,
|
|
12208
12190
|
...starExports
|
|
12209
12191
|
]);
|
|
12210
12192
|
if (exports.length === 0) {
|
|
@@ -12339,7 +12321,7 @@ function interopDefault$1(sourceModule, opts = {}) {
|
|
|
12339
12321
|
return sourceModule;
|
|
12340
12322
|
}
|
|
12341
12323
|
const defaultValue = sourceModule.default;
|
|
12342
|
-
if (defaultValue ===
|
|
12324
|
+
if (defaultValue === void 0 || defaultValue === null) {
|
|
12343
12325
|
return sourceModule;
|
|
12344
12326
|
}
|
|
12345
12327
|
const _defaultType = typeof defaultValue;
|
|
@@ -12361,7 +12343,7 @@ function interopDefault$1(sourceModule, opts = {}) {
|
|
|
12361
12343
|
}
|
|
12362
12344
|
return defaultValue;
|
|
12363
12345
|
}
|
|
12364
|
-
const EVAL_ESM_IMPORT_RE = /(?<=import .* from ["'])
|
|
12346
|
+
const EVAL_ESM_IMPORT_RE = /(?<=import .* from ["'])[^"']+(?=["'])|(?<=export .* from ["'])[^"']+(?=["'])|(?<=import\s*["'])[^"']+(?=["'])|(?<=import\s*\(["'])[^"']+(?=["']\))/g;
|
|
12365
12347
|
async function loadModule(id, options = {}) {
|
|
12366
12348
|
const url = await resolve(id, options);
|
|
12367
12349
|
const code = await loadURL(url);
|
|
@@ -12402,11 +12384,11 @@ async function resolveImports(code, options) {
|
|
|
12402
12384
|
}
|
|
12403
12385
|
resolved.set(id, url);
|
|
12404
12386
|
}));
|
|
12405
|
-
const re$2 = new RegExp(uniqueImports.map((index) => `(
|
|
12387
|
+
const re$2 = new RegExp(uniqueImports.map((index) => `(?:${index})`).join("|"), "g");
|
|
12406
12388
|
return code.replace(re$2, (id) => resolved.get(id));
|
|
12407
12389
|
}
|
|
12408
|
-
const ESM_RE = /([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
|
|
12409
|
-
const CJS_RE = /([\s;]|^)(module
|
|
12390
|
+
const ESM_RE = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
|
|
12391
|
+
const CJS_RE = /(?:[\s;]|^)(?:module\.exports\b|exports\.\w|require\s*\(|global\.\w)/m;
|
|
12410
12392
|
const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
|
|
12411
12393
|
const BUILTIN_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
12412
12394
|
".mjs",
|
|
@@ -12470,7 +12452,7 @@ async function isValidNodeImport(id, _options = {}) {
|
|
|
12470
12452
|
if (package_?.type === "module") {
|
|
12471
12453
|
return true;
|
|
12472
12454
|
}
|
|
12473
|
-
if (/\.(
|
|
12455
|
+
if (/\.(?:\w+-)?esm?(?:-\w+)?\.js$|\/esm?\//.test(resolvedPath)) {
|
|
12474
12456
|
return false;
|
|
12475
12457
|
}
|
|
12476
12458
|
const code = options.code || await promises.readFile(resolvedPath, "utf8").catch(() => {}) || "";
|
|
@@ -12478,7 +12460,7 @@ async function isValidNodeImport(id, _options = {}) {
|
|
|
12478
12460
|
}
|
|
12479
12461
|
|
|
12480
12462
|
//#endregion
|
|
12481
|
-
//#region node_modules/.pnpm/quansync@0.2.
|
|
12463
|
+
//#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs
|
|
12482
12464
|
const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
|
|
12483
12465
|
var QuansyncError = class extends Error {
|
|
12484
12466
|
constructor(message = "Unexpected promise in sync context") {
|
|
@@ -12572,11 +12554,11 @@ const getIsAsync = quansync$1({
|
|
|
12572
12554
|
});
|
|
12573
12555
|
|
|
12574
12556
|
//#endregion
|
|
12575
|
-
//#region node_modules/.pnpm/quansync@0.2.
|
|
12557
|
+
//#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/macro.mjs
|
|
12576
12558
|
const quansync = quansync$1;
|
|
12577
12559
|
|
|
12578
12560
|
//#endregion
|
|
12579
|
-
//#region node_modules/.pnpm/local-pkg@1.1.
|
|
12561
|
+
//#region node_modules/.pnpm/local-pkg@1.1.2/node_modules/local-pkg/dist/index.mjs
|
|
12580
12562
|
const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
12581
12563
|
async function findUp$1(name, { cwd: cwd$1 = process$1.cwd(), type = "file", stopAt } = {}) {
|
|
12582
12564
|
let directory = path.resolve(toPath(cwd$1) ?? "");
|
|
@@ -12709,76 +12691,12 @@ const isPackageListedSync = isPackageListed.sync;
|
|
|
12709
12691
|
//#endregion
|
|
12710
12692
|
//#region src/lager.ts
|
|
12711
12693
|
const dbg = Debug("jsse:eslint-config");
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
fatal: 60
|
|
12719
|
-
};
|
|
12720
|
-
function isLagerLevel(level) {
|
|
12721
|
-
return level === "trace" || level === "debug" || level === "info" || level === "warn" || level === "error" || level === "fatal";
|
|
12722
|
-
}
|
|
12723
|
-
var Lager = class {
|
|
12724
|
-
_level = "info";
|
|
12725
|
-
id = "lager";
|
|
12726
|
-
levelNo = LAGER_LEVELS[this._level];
|
|
12727
|
-
prefix = "";
|
|
12728
|
-
constructor(options) {
|
|
12729
|
-
const { level, id, prefix } = {
|
|
12730
|
-
level: "info",
|
|
12731
|
-
id: "lager",
|
|
12732
|
-
prefix: "@jsse/eslint-config",
|
|
12733
|
-
...options
|
|
12734
|
-
};
|
|
12735
|
-
this.id = id;
|
|
12736
|
-
this._level = isLagerLevel(level) ? level : "info";
|
|
12737
|
-
this.levelNo = LAGER_LEVELS[this._level];
|
|
12738
|
-
this.prefix = prefix;
|
|
12739
|
-
this.log = this.log.bind(this);
|
|
12740
|
-
this.debug = this.debug.bind(this);
|
|
12741
|
-
}
|
|
12742
|
-
get level() {
|
|
12743
|
-
return this._level;
|
|
12744
|
-
}
|
|
12745
|
-
set level(level) {
|
|
12746
|
-
this._level = level;
|
|
12747
|
-
this.levelNo = LAGER_LEVELS[level];
|
|
12748
|
-
}
|
|
12749
|
-
log(...args) {
|
|
12750
|
-
console.log(this.prefix, ...args);
|
|
12751
|
-
}
|
|
12752
|
-
trace(...args) {
|
|
12753
|
-
if (this.levelNo <= LAGER_LEVELS.trace) {
|
|
12754
|
-
console.trace(this.prefix, ...args);
|
|
12755
|
-
}
|
|
12756
|
-
}
|
|
12757
|
-
debug(...args) {
|
|
12758
|
-
if (this.levelNo <= LAGER_LEVELS.debug) {
|
|
12759
|
-
console.debug(this.prefix, ...args);
|
|
12760
|
-
}
|
|
12761
|
-
}
|
|
12762
|
-
info(...args) {
|
|
12763
|
-
if (this.levelNo <= LAGER_LEVELS.info) {
|
|
12764
|
-
console.info(this.prefix, ...args);
|
|
12765
|
-
}
|
|
12766
|
-
}
|
|
12767
|
-
warn(...args) {
|
|
12768
|
-
if (this.levelNo <= LAGER_LEVELS.warn) {
|
|
12769
|
-
console.warn(this.prefix, ...args);
|
|
12770
|
-
}
|
|
12771
|
-
}
|
|
12772
|
-
error(...args) {
|
|
12773
|
-
if (this.levelNo <= LAGER_LEVELS.error) {
|
|
12774
|
-
console.error(this.prefix, ...args);
|
|
12775
|
-
}
|
|
12776
|
-
}
|
|
12777
|
-
};
|
|
12778
|
-
|
|
12779
|
-
//#endregion
|
|
12780
|
-
//#region src/log.ts
|
|
12781
|
-
const log = new Lager();
|
|
12694
|
+
function enableDbg() {
|
|
12695
|
+
const currentNamespaces = Debug.namespaces;
|
|
12696
|
+
const current = typeof currentNamespaces === "string" ? currentNamespaces : undefined;
|
|
12697
|
+
Debug.enable([current, "jsse:eslint-config"].filter((ns) => ns !== undefined).join(","));
|
|
12698
|
+
dbg("Debugging enabled for @jsse/eslint-config");
|
|
12699
|
+
}
|
|
12782
12700
|
|
|
12783
12701
|
//#endregion
|
|
12784
12702
|
//#region src/utils.ts
|
|
@@ -12857,15 +12775,17 @@ const parserPlain = {
|
|
|
12857
12775
|
function turnOffRules(configs, off) {
|
|
12858
12776
|
if (off.length > 0) {
|
|
12859
12777
|
for (const rule of off) {
|
|
12860
|
-
|
|
12778
|
+
dbg(`turning-off: ${rule}`);
|
|
12861
12779
|
}
|
|
12862
12780
|
const currentlyActiveRules = new Set();
|
|
12863
12781
|
for (const config of configs) {
|
|
12864
|
-
for (const rule of Object.keys(config.rules ?? {}))
|
|
12782
|
+
for (const rule of Object.keys(config.rules ?? {})) {
|
|
12783
|
+
currentlyActiveRules.add(rule);
|
|
12784
|
+
}
|
|
12865
12785
|
}
|
|
12866
12786
|
for (const rule of off) {
|
|
12867
12787
|
if (!currentlyActiveRules.has(rule)) {
|
|
12868
|
-
|
|
12788
|
+
dbg(`Rule \`${rule}\` is not active in the current config, you can remove it from the off list`);
|
|
12869
12789
|
}
|
|
12870
12790
|
}
|
|
12871
12791
|
for (const config of configs) {
|
|
@@ -18440,14 +18360,6 @@ const flatConfigProps = [
|
|
|
18440
18360
|
"rules",
|
|
18441
18361
|
"settings"
|
|
18442
18362
|
];
|
|
18443
|
-
const DEBUG = [
|
|
18444
|
-
"1",
|
|
18445
|
-
"true",
|
|
18446
|
-
"t",
|
|
18447
|
-
"on",
|
|
18448
|
-
"yes",
|
|
18449
|
-
"y"
|
|
18450
|
-
].includes(process$1.env.DEBUG ?? "");
|
|
18451
18363
|
function defaultOptions() {
|
|
18452
18364
|
const typescriptExists = isPackageExists("typescript");
|
|
18453
18365
|
return {
|
|
@@ -18499,27 +18411,27 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
18499
18411
|
const normalizedOptions = normalizeOptions(options);
|
|
18500
18412
|
const { command: enableCommand, componentExts, debug, gitignore: enableGitignore, isInEditor: isInEditor$1, jsonc: enableJsonc, markdown: enableMarkdown, off, overrides = {}, pnpm: enablePnpm, prettier: enablePrettier, react: enableReact, reportUnusedDisableDirectives, rootId, stylistic: stylisticOptions, tailwind: tailwindOptions, test: enableTest, tsPrefix, typeAware, typescript: typescriptOptions, yaml: enableYaml } = normalizedOptions;
|
|
18501
18413
|
if (debug || process$1.argv.includes("--debug")) {
|
|
18502
|
-
|
|
18414
|
+
enableDbg();
|
|
18503
18415
|
}
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18416
|
+
dbg("@jsse/eslint-config debug=true");
|
|
18417
|
+
dbg("@jsse/eslint-config isInEditor: %O", isInEditor$1);
|
|
18418
|
+
dbg("@jsse/eslint-config enableTypeScript: %O", typescriptOptions);
|
|
18419
|
+
dbg("@jsse/eslint-config normalizedOptions: %O", normalizedOptions);
|
|
18508
18420
|
const configs = [];
|
|
18509
18421
|
if (enableGitignore) {
|
|
18510
18422
|
if (typeof enableGitignore === "boolean") {
|
|
18511
18423
|
if (fs.existsSync(".gitignore")) {
|
|
18512
18424
|
configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r$3) => {
|
|
18513
18425
|
const res = r$3();
|
|
18514
|
-
|
|
18426
|
+
dbg("Using eslint-config-flat-gitignore res: %O", res);
|
|
18515
18427
|
return [res];
|
|
18516
18428
|
}));
|
|
18517
18429
|
}
|
|
18518
18430
|
} else {
|
|
18519
18431
|
configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r$3) => {
|
|
18520
|
-
|
|
18432
|
+
dbg("Using eslint-config-flat-gitignore: %O", r$3);
|
|
18521
18433
|
const res = r$3(enableGitignore);
|
|
18522
|
-
|
|
18434
|
+
dbg("Using eslint-config-flat-gitignore: %O", res);
|
|
18523
18435
|
return [res];
|
|
18524
18436
|
}));
|
|
18525
18437
|
}
|
|
@@ -18596,7 +18508,7 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
18596
18508
|
}), sortPackageJson(), sortTsconfig({ extendTsconfigGlobs: normalizedOptions.extendTsconfigLintGlobs }));
|
|
18597
18509
|
}
|
|
18598
18510
|
if (tailwindOptions) {
|
|
18599
|
-
console.error("Tailwind configuration is
|
|
18511
|
+
console.error("Tailwind configuration is deprecated...");
|
|
18600
18512
|
}
|
|
18601
18513
|
if (normalizedOptions.prettier) {
|
|
18602
18514
|
configs.push(prettier());
|
|
@@ -18640,17 +18552,17 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
18640
18552
|
}
|
|
18641
18553
|
}
|
|
18642
18554
|
if (normalizedOptions.preReturn) {
|
|
18643
|
-
|
|
18555
|
+
dbg("Running preReturn");
|
|
18644
18556
|
const preReturned = normalizedOptions.preReturn(combinedConfigs);
|
|
18645
18557
|
if (preReturned instanceof Promise) {
|
|
18646
18558
|
const res = await preReturned;
|
|
18647
|
-
|
|
18648
|
-
|
|
18559
|
+
dbg("preReturn finished");
|
|
18560
|
+
dbg("final config", res);
|
|
18649
18561
|
return res;
|
|
18650
18562
|
} else {
|
|
18651
18563
|
const res = preReturned;
|
|
18652
|
-
|
|
18653
|
-
|
|
18564
|
+
dbg("preReturn finished");
|
|
18565
|
+
dbg("final config", res);
|
|
18654
18566
|
return res;
|
|
18655
18567
|
}
|
|
18656
18568
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
|
|
3
|
+
//#region src/const.ts
|
|
4
|
+
const DEBUG = [
|
|
5
|
+
"1",
|
|
6
|
+
"true",
|
|
7
|
+
"t",
|
|
8
|
+
"on",
|
|
9
|
+
"yes",
|
|
10
|
+
"y"
|
|
11
|
+
].includes(process.env.DEBUG ?? "");
|
|
12
|
+
const SLOW_RULES = [
|
|
13
|
+
"@typescript-eslint/no-misused-promises",
|
|
14
|
+
"@typescript-eslint/no-redeclare",
|
|
15
|
+
"@typescript-eslint/no-unsafe-assignment",
|
|
16
|
+
"@typescript-eslint/no-unsafe-call",
|
|
17
|
+
"@typescript-eslint/no-unsafe-member-access",
|
|
18
|
+
"@typescript-eslint/no-unsafe-return",
|
|
19
|
+
"import/no-duplicates",
|
|
20
|
+
"jsdoc/check-access",
|
|
21
|
+
"jsdoc/check-alignment",
|
|
22
|
+
"jsdoc/check-property-names",
|
|
23
|
+
"jsdoc/check-types",
|
|
24
|
+
"jsdoc/empty-tags",
|
|
25
|
+
"jsdoc/multiline-blocks",
|
|
26
|
+
"jsdoc/no-multi-asterisks",
|
|
27
|
+
"jsdoc/require-property-description",
|
|
28
|
+
"jsdoc/require-property-name",
|
|
29
|
+
"jsdoc/require-property",
|
|
30
|
+
"unicorn/expiring-todo-comments",
|
|
31
|
+
"unicorn/no-unnecessary-polyfills"
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/generated/version.ts
|
|
36
|
+
const VERSION = "0.4.12";
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { DEBUG, SLOW_RULES, VERSION };
|