@jsse/eslint-config 0.4.11 → 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 +6 -0
- package/dist/cli.js +2 -1
- package/dist/index.d.ts +21 -3
- package/dist/index.js +32 -26
- package/dist/{version-Cmu7XVG1.js → version-BbraMghN.js} +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEBUG, 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,6 +572,7 @@ 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
|
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[];
|
|
@@ -13750,7 +13768,7 @@ declare function defineConfig(options?: OptionsConfig & Config, ...userConfigs:
|
|
|
13750
13768
|
type DefineConfig = typeof defineConfig;
|
|
13751
13769
|
//#endregion
|
|
13752
13770
|
//#region src/generated/version.d.ts
|
|
13753
|
-
declare const VERSION = "0.4.
|
|
13771
|
+
declare const VERSION = "0.4.12";
|
|
13754
13772
|
declare namespace globs_d_exports {
|
|
13755
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 };
|
|
13756
13774
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS, __export, __toESM } from "./chunk-CkHaCily.js";
|
|
2
|
-
import { DEBUG, SLOW_RULES, 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";
|
|
@@ -10618,7 +10618,7 @@ async function findWorkspaceDir(id = process.cwd(), options = {}) {
|
|
|
10618
10618
|
}
|
|
10619
10619
|
|
|
10620
10620
|
//#endregion
|
|
10621
|
-
//#region node_modules/.pnpm/mlly@1.
|
|
10621
|
+
//#region node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs
|
|
10622
10622
|
const BUILTIN_MODULES = new Set(builtinModules);
|
|
10623
10623
|
function normalizeSlash(path$1) {
|
|
10624
10624
|
return path$1.replace(/\\/g, "/");
|
|
@@ -10640,12 +10640,12 @@ function matchAll(regex, string, addition) {
|
|
|
10640
10640
|
return matches;
|
|
10641
10641
|
}
|
|
10642
10642
|
function clearImports(imports$1) {
|
|
10643
|
-
return (imports$1 || "").replace(
|
|
10643
|
+
return (imports$1 || "").replace(/\/\/[^\n]*\n|\/\*.*\*\//g, "").replace(/\s+/g, " ");
|
|
10644
10644
|
}
|
|
10645
10645
|
function getImportNames(cleanedImports) {
|
|
10646
|
-
const topLevelImports = cleanedImports.replace(/{
|
|
10646
|
+
const topLevelImports = cleanedImports.replace(/{[^}]*}/, "");
|
|
10647
10647
|
const namespacedImport = topLevelImports.match(/\* as \s*(\S*)/)?.[1];
|
|
10648
|
-
const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() ||
|
|
10648
|
+
const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0;
|
|
10649
10649
|
return {
|
|
10650
10650
|
namespacedImport,
|
|
10651
10651
|
defaultImport
|
|
@@ -11222,7 +11222,7 @@ function defaultGetFormatWithoutErrors(url, context) {
|
|
|
11222
11222
|
return protocolHandlers[protocol](url, context, true) || null;
|
|
11223
11223
|
}
|
|
11224
11224
|
const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
11225
|
-
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;
|
|
11226
11226
|
const own = {}.hasOwnProperty;
|
|
11227
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;
|
|
11228
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;
|
|
@@ -11890,7 +11890,7 @@ function normalizeid(id) {
|
|
|
11890
11890
|
if (typeof id !== "string") {
|
|
11891
11891
|
id = id.toString();
|
|
11892
11892
|
}
|
|
11893
|
-
if (/(node|data|http|https|file):/.test(id)) {
|
|
11893
|
+
if (/(?:node|data|http|https|file):/.test(id)) {
|
|
11894
11894
|
return id;
|
|
11895
11895
|
}
|
|
11896
11896
|
if (BUILTIN_MODULES.has(id)) {
|
|
@@ -11907,13 +11907,13 @@ function toDataURL(code) {
|
|
|
11907
11907
|
return `data:text/javascript;base64,${base64}`;
|
|
11908
11908
|
}
|
|
11909
11909
|
function isNodeBuiltin(id = "") {
|
|
11910
|
-
id = id.replace(/^node:/, "").split("/")[0];
|
|
11910
|
+
id = id.replace(/^node:/, "").split("/", 1)[0];
|
|
11911
11911
|
return BUILTIN_MODULES.has(id);
|
|
11912
11912
|
}
|
|
11913
11913
|
const ProtocolRegex = /^(?<proto>.{2,}?):.+$/;
|
|
11914
11914
|
function getProtocol(id) {
|
|
11915
11915
|
const proto = id.match(ProtocolRegex);
|
|
11916
|
-
return proto ? proto.groups?.proto :
|
|
11916
|
+
return proto ? proto.groups?.proto : void 0;
|
|
11917
11917
|
}
|
|
11918
11918
|
const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]);
|
|
11919
11919
|
const DEFAULT_EXTENSIONS = [
|
|
@@ -11945,7 +11945,7 @@ function _resolve$1(id, options = {}) {
|
|
|
11945
11945
|
throw new TypeError("input must be a `string` or `URL`");
|
|
11946
11946
|
}
|
|
11947
11947
|
}
|
|
11948
|
-
if (/(node|data|http|https):/.test(id)) {
|
|
11948
|
+
if (/(?:node|data|http|https):/.test(id)) {
|
|
11949
11949
|
return id;
|
|
11950
11950
|
}
|
|
11951
11951
|
if (BUILTIN_MODULES.has(id)) {
|
|
@@ -12047,7 +12047,7 @@ function parseNodeModulePath(path$1) {
|
|
|
12047
12047
|
return {
|
|
12048
12048
|
dir,
|
|
12049
12049
|
name,
|
|
12050
|
-
subpath: subpath ? `.${subpath}` :
|
|
12050
|
+
subpath: subpath ? `.${subpath}` : void 0
|
|
12051
12051
|
};
|
|
12052
12052
|
}
|
|
12053
12053
|
async function lookupNodeModuleSubpath(path$1) {
|
|
@@ -12079,7 +12079,7 @@ function _findSubpath(subpath, exports) {
|
|
|
12079
12079
|
}
|
|
12080
12080
|
function _flattenExports(exports = {}, parentSubpath = "./") {
|
|
12081
12081
|
return Object.entries(exports).flatMap(([key, value]) => {
|
|
12082
|
-
const [subpath, condition] = key.startsWith(".") ? [key.slice(1),
|
|
12082
|
+
const [subpath, condition] = key.startsWith(".") ? [key.slice(1), void 0] : ["", key];
|
|
12083
12083
|
const _subPath = joinURL(parentSubpath, subpath);
|
|
12084
12084
|
if (typeof value === "string") {
|
|
12085
12085
|
return [{
|
|
@@ -12092,16 +12092,17 @@ function _flattenExports(exports = {}, parentSubpath = "./") {
|
|
|
12092
12092
|
}
|
|
12093
12093
|
});
|
|
12094
12094
|
}
|
|
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;
|
|
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;
|
|
12096
12096
|
const DYNAMIC_IMPORT_RE = /import\s*\((?<expression>(?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*)\)/gm;
|
|
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,]*}(
|
|
12101
|
-
const EXPORT_NAMED_TYPE_RE = /\bexport\s+type\s*{(?<exports>[^}]+?)[\s,]*}(
|
|
12102
|
-
const EXPORT_NAMED_DESTRUCT = /\bexport\s+(let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm;
|
|
12103
|
-
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;
|
|
12104
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;
|
|
12105
12106
|
const TYPE_RE = /^\s*?type\s/;
|
|
12106
12107
|
function findStaticImports(code) {
|
|
12107
12108
|
return _filterStatement(_tryGetLocations(code, "import"), matchAll(ESM_STATIC_IMPORT_RE, code, { type: "static" }));
|
|
@@ -12158,6 +12159,9 @@ function parseTypeImport(matched) {
|
|
|
12158
12159
|
function findExports(code) {
|
|
12159
12160
|
const declaredExports = matchAll(EXPORT_DECAL_RE, code, { type: "declaration" });
|
|
12160
12161
|
for (const declaredExport of declaredExports) {
|
|
12162
|
+
if (/^export\s+(?:async\s+)?function/.test(declaredExport.code)) {
|
|
12163
|
+
continue;
|
|
12164
|
+
}
|
|
12161
12165
|
const extraNamesStr = declaredExport.extraNames;
|
|
12162
12166
|
if (extraNamesStr) {
|
|
12163
12167
|
const extraNames = matchAll(/({.*?})|(\[.*?])|(,\s*(?<name>\w+))/g, extraNamesStr, {}).map((m$2) => m$2.name).filter(Boolean);
|
|
@@ -12175,12 +12179,14 @@ function findExports(code) {
|
|
|
12175
12179
|
type: "default",
|
|
12176
12180
|
name: "default"
|
|
12177
12181
|
});
|
|
12182
|
+
const defaultClassExports = matchAll(EXPORT_DEFAULT_CLASS_RE, code, { type: "declaration" });
|
|
12178
12183
|
const starExports = matchAll(EXPORT_STAR_RE, code, { type: "star" });
|
|
12179
12184
|
const exports = normalizeExports([
|
|
12180
12185
|
...declaredExports,
|
|
12181
12186
|
...namedExports,
|
|
12182
12187
|
...destructuredExports,
|
|
12183
12188
|
...defaultExport,
|
|
12189
|
+
...defaultClassExports,
|
|
12184
12190
|
...starExports
|
|
12185
12191
|
]);
|
|
12186
12192
|
if (exports.length === 0) {
|
|
@@ -12315,7 +12321,7 @@ function interopDefault$1(sourceModule, opts = {}) {
|
|
|
12315
12321
|
return sourceModule;
|
|
12316
12322
|
}
|
|
12317
12323
|
const defaultValue = sourceModule.default;
|
|
12318
|
-
if (defaultValue ===
|
|
12324
|
+
if (defaultValue === void 0 || defaultValue === null) {
|
|
12319
12325
|
return sourceModule;
|
|
12320
12326
|
}
|
|
12321
12327
|
const _defaultType = typeof defaultValue;
|
|
@@ -12337,7 +12343,7 @@ function interopDefault$1(sourceModule, opts = {}) {
|
|
|
12337
12343
|
}
|
|
12338
12344
|
return defaultValue;
|
|
12339
12345
|
}
|
|
12340
|
-
const EVAL_ESM_IMPORT_RE = /(?<=import .* from ["'])
|
|
12346
|
+
const EVAL_ESM_IMPORT_RE = /(?<=import .* from ["'])[^"']+(?=["'])|(?<=export .* from ["'])[^"']+(?=["'])|(?<=import\s*["'])[^"']+(?=["'])|(?<=import\s*\(["'])[^"']+(?=["']\))/g;
|
|
12341
12347
|
async function loadModule(id, options = {}) {
|
|
12342
12348
|
const url = await resolve(id, options);
|
|
12343
12349
|
const code = await loadURL(url);
|
|
@@ -12378,11 +12384,11 @@ async function resolveImports(code, options) {
|
|
|
12378
12384
|
}
|
|
12379
12385
|
resolved.set(id, url);
|
|
12380
12386
|
}));
|
|
12381
|
-
const re$2 = new RegExp(uniqueImports.map((index) => `(
|
|
12387
|
+
const re$2 = new RegExp(uniqueImports.map((index) => `(?:${index})`).join("|"), "g");
|
|
12382
12388
|
return code.replace(re$2, (id) => resolved.get(id));
|
|
12383
12389
|
}
|
|
12384
|
-
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;
|
|
12385
|
-
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;
|
|
12386
12392
|
const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
|
|
12387
12393
|
const BUILTIN_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
12388
12394
|
".mjs",
|
|
@@ -12446,7 +12452,7 @@ async function isValidNodeImport(id, _options = {}) {
|
|
|
12446
12452
|
if (package_?.type === "module") {
|
|
12447
12453
|
return true;
|
|
12448
12454
|
}
|
|
12449
|
-
if (/\.(
|
|
12455
|
+
if (/\.(?:\w+-)?esm?(?:-\w+)?\.js$|\/esm?\//.test(resolvedPath)) {
|
|
12450
12456
|
return false;
|
|
12451
12457
|
}
|
|
12452
12458
|
const code = options.code || await promises.readFile(resolvedPath, "utf8").catch(() => {}) || "";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.12",
|
|
5
5
|
"description": "@jsse/eslint-config ~ WYSIWYG",
|
|
6
6
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
64
64
|
"@eslint/compat": "^1.3.2",
|
|
65
|
-
"@eslint/js": "~9.
|
|
66
|
-
"@eslint/markdown": "^7.
|
|
65
|
+
"@eslint/js": "~9.34.0",
|
|
66
|
+
"@eslint/markdown": "^7.2.0",
|
|
67
67
|
"@stylistic/eslint-plugin": "5.2.3",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
69
|
-
"@typescript-eslint/parser": "^8.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.41.0",
|
|
70
70
|
"@vitest/eslint-plugin": "^1.3.4",
|
|
71
71
|
"debug": "^4.4.1",
|
|
72
72
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"eslint-plugin-yml": "^1.18.0",
|
|
92
92
|
"jsonc-eslint-parser": "^2.4.0",
|
|
93
93
|
"toml-eslint-parser": "^0.10.0",
|
|
94
|
-
"typescript-eslint": "^8.
|
|
94
|
+
"typescript-eslint": "^8.41.0",
|
|
95
95
|
"yaml-eslint-parser": "^1.3.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@biomejs/biome": "2.2.
|
|
98
|
+
"@biomejs/biome": "2.2.2",
|
|
99
99
|
"@changesets/cli": "^2.29.6",
|
|
100
100
|
"@jsse/prettier-config": "^1.0.0",
|
|
101
101
|
"@jsse/tsconfig": "^0.3.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@types/fs-extra": "^11.0.4",
|
|
104
104
|
"@types/node": "^24.3.0",
|
|
105
105
|
"cac": "^6.7.14",
|
|
106
|
-
"eslint": "^9.
|
|
106
|
+
"eslint": "^9.34.0",
|
|
107
107
|
"eslint-flat-config-utils": "^2.1.1",
|
|
108
108
|
"eslint-typegen": "^2.3.0",
|
|
109
109
|
"execa": "~9.6.0",
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
"fs-extra": "^11.3.1",
|
|
112
112
|
"globals": "^16.3.0",
|
|
113
113
|
"local-pkg": "^1.1.2",
|
|
114
|
-
"oxlint": "^1.
|
|
114
|
+
"oxlint": "^1.13.0",
|
|
115
115
|
"picocolors": "^1.1.1",
|
|
116
116
|
"prettier": "^3.6.2",
|
|
117
117
|
"react": "~19.1.1",
|
|
118
118
|
"rimraf": "^6.0.1",
|
|
119
|
-
"tsdown": "^0.14.
|
|
120
|
-
"tsx": "^4.20.
|
|
121
|
-
"typescript": "~5.
|
|
119
|
+
"tsdown": "^0.14.2",
|
|
120
|
+
"tsx": "^4.20.5",
|
|
121
|
+
"typescript": "~5.9.2",
|
|
122
122
|
"vitest": "^3.2.4"
|
|
123
123
|
},
|
|
124
124
|
"prettier": "@jsse/prettier-config",
|