@storm-software/eslint 0.169.101 → 0.169.103
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 +1 -1
- package/dist/{chunk-L3LWC2Q2.js → chunk-H3RCHNCA.js} +1 -1
- package/dist/{chunk-UVJN4TQE.js → chunk-HGKDUUP5.js} +2 -2
- package/dist/{chunk-SHDRQRAZ.js → chunk-KD3E54TD.js} +3 -3
- package/dist/{chunk-PWQ34SJ2.js → chunk-PKXKXCCD.js} +1 -1
- package/dist/{chunk-UDXTXTFI.js → chunk-Q25MSM3K.js} +2 -2
- package/dist/{chunk-A32JZBPO.js → chunk-RSOBNZB3.js} +1 -1
- package/dist/chunk-SMKQOITJ.js +43 -0
- package/dist/{chunk-T4LUMNGJ.js → chunk-V4HRYKCY.js} +1 -1
- package/dist/{chunk-IWQLEJ77.js → chunk-VWADAV3Y.js} +1 -1
- package/dist/preset.cjs +78 -30
- package/dist/preset.js +12 -20
- package/dist/types.d.cts +38 -2
- package/dist/types.d.ts +38 -2
- package/dist/types.js +1 -1
- package/dist/utils/banner-plugin.js +4 -4
- package/dist/utils/combine.js +1 -1
- package/dist/utils/constants.js +2 -2
- package/dist/utils/correct-paths.js +2 -2
- package/dist/utils/find-workspace-root.js +3 -3
- package/dist/utils/format-config.js +2 -2
- package/dist/utils/get-file-banner.js +3 -3
- package/dist/utils/helpers.cjs +1 -1
- package/dist/utils/helpers.js +2 -2
- package/dist/utils/index.js +3 -3
- package/dist/utils/tsconfig-path.cjs +161 -16
- package/dist/utils/tsconfig-path.d.cts +3 -2
- package/dist/utils/tsconfig-path.d.ts +3 -2
- package/dist/utils/tsconfig-path.js +4 -3
- package/package.json +16 -16
- package/dist/chunk-DJ2ZXQYV.js +0 -27
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { correctPaths } from './chunk-
|
|
2
|
-
import { init_esm_shims } from './chunk-
|
|
1
|
+
import { correctPaths } from './chunk-V4HRYKCY.js';
|
|
2
|
+
import { init_esm_shims } from './chunk-PKXKXCCD.js';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getFileBanner } from './chunk-
|
|
2
|
-
import { GLOB_SRC } from './chunk-
|
|
3
|
-
import { init_esm_shims } from './chunk-
|
|
1
|
+
import { getFileBanner } from './chunk-Q25MSM3K.js';
|
|
2
|
+
import { GLOB_SRC } from './chunk-H3RCHNCA.js';
|
|
3
|
+
import { init_esm_shims } from './chunk-PKXKXCCD.js';
|
|
4
4
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
5
5
|
import os from 'node:os';
|
|
6
6
|
|
|
@@ -30,7 +30,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
var init_esm_shims = __esm({
|
|
33
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
33
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__a9cefbd35e33069f17719a3a61e5a32e/node_modules/tsup/assets/esm_shims.js"() {
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ACRONYMS_LIST } from './chunk-
|
|
2
|
-
import { init_esm_shims } from './chunk-
|
|
1
|
+
import { ACRONYMS_LIST } from './chunk-H3RCHNCA.js';
|
|
2
|
+
import { init_esm_shims } from './chunk-PKXKXCCD.js';
|
|
3
3
|
|
|
4
4
|
// src/utils/get-file-banner.ts
|
|
5
5
|
init_esm_shims();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { findWorkspaceRoot } from './chunk-HGKDUUP5.js';
|
|
2
|
+
import { relative, joinPaths } from './chunk-V4HRYKCY.js';
|
|
3
|
+
import { init_esm_shims } from './chunk-PKXKXCCD.js';
|
|
4
|
+
import { existsSync, statSync } from 'node:fs';
|
|
5
|
+
|
|
6
|
+
// src/utils/tsconfig-path.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
function getTsConfigPath(tsconfigPath, type = "app") {
|
|
9
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
10
|
+
if (tsconfigPath && existsSync(tsconfigPath) && statSync(tsconfigPath).isFile()) {
|
|
11
|
+
return relative(workspaceRoot, tsconfigPath);
|
|
12
|
+
}
|
|
13
|
+
let result = checkTsConfigPath(process.cwd());
|
|
14
|
+
if (result) {
|
|
15
|
+
return relative(workspaceRoot, joinPaths(process.cwd(), result));
|
|
16
|
+
}
|
|
17
|
+
result = checkTsConfigPath(workspaceRoot);
|
|
18
|
+
if (result) {
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
console.warn(
|
|
22
|
+
`No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
23
|
+
);
|
|
24
|
+
return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : `tsconfig.${type}.json`;
|
|
25
|
+
}
|
|
26
|
+
function checkTsConfigPath(root) {
|
|
27
|
+
if (existsSync(joinPaths(root, "tsconfig.json"))) {
|
|
28
|
+
return "tsconfig.json";
|
|
29
|
+
} else if (existsSync(joinPaths(root, "tsconfig.base.json"))) {
|
|
30
|
+
return "tsconfig.base.json";
|
|
31
|
+
} else if (existsSync(joinPaths(root, "tsconfig.app.json"))) {
|
|
32
|
+
return "tsconfig.app.json";
|
|
33
|
+
} else if (existsSync(joinPaths(root, "tsconfig.lib.json"))) {
|
|
34
|
+
return "tsconfig.lib.json";
|
|
35
|
+
} else if (existsSync(joinPaths(root, "tsconfig.eslint.json"))) {
|
|
36
|
+
return "tsconfig.eslint.json";
|
|
37
|
+
} else if (existsSync(joinPaths(root, "tsconfig.lint.json"))) {
|
|
38
|
+
return "tsconfig.lint.json";
|
|
39
|
+
}
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { checkTsConfigPath, getTsConfigPath };
|
package/dist/preset.cjs
CHANGED
|
@@ -112,10 +112,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
112
112
|
mod
|
|
113
113
|
));
|
|
114
114
|
|
|
115
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
115
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__a9cefbd35e33069f17719a3a61e5a32e/node_modules/tsup/assets/cjs_shims.js
|
|
116
116
|
var getImportMetaUrl, importMetaUrl;
|
|
117
117
|
var init_cjs_shims = __esm({
|
|
118
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
118
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__a9cefbd35e33069f17719a3a61e5a32e/node_modules/tsup/assets/cjs_shims.js"() {
|
|
119
119
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
120
120
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
121
121
|
}
|
|
@@ -941,6 +941,7 @@ function normalizeWindowsPath(input = "") {
|
|
|
941
941
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
942
942
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
943
943
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
944
|
+
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
944
945
|
var correctPaths = function(path) {
|
|
945
946
|
if (!path || path.length === 0) {
|
|
946
947
|
return ".";
|
|
@@ -991,6 +992,30 @@ var joinPaths = function(...segments) {
|
|
|
991
992
|
}
|
|
992
993
|
return correctPaths(path);
|
|
993
994
|
};
|
|
995
|
+
function cwd() {
|
|
996
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
997
|
+
return process.cwd().replace(/\\/g, "/");
|
|
998
|
+
}
|
|
999
|
+
return "/";
|
|
1000
|
+
}
|
|
1001
|
+
var resolve = function(...arguments_) {
|
|
1002
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
1003
|
+
let resolvedPath = "";
|
|
1004
|
+
let resolvedAbsolute = false;
|
|
1005
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
1006
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
1007
|
+
if (!path || path.length === 0) {
|
|
1008
|
+
continue;
|
|
1009
|
+
}
|
|
1010
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
1011
|
+
resolvedAbsolute = isAbsolute(path);
|
|
1012
|
+
}
|
|
1013
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
1014
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
1015
|
+
return `/${resolvedPath}`;
|
|
1016
|
+
}
|
|
1017
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
1018
|
+
};
|
|
994
1019
|
function normalizeString(path, allowAboveRoot) {
|
|
995
1020
|
let res = "";
|
|
996
1021
|
let lastSegmentLength = 0;
|
|
@@ -1053,6 +1078,22 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
1053
1078
|
var isAbsolute = function(p) {
|
|
1054
1079
|
return _IS_ABSOLUTE_RE.test(p);
|
|
1055
1080
|
};
|
|
1081
|
+
var relative = function(from, to) {
|
|
1082
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
1083
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
1084
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
1085
|
+
return _to.join("/");
|
|
1086
|
+
}
|
|
1087
|
+
const _fromCopy = [..._from];
|
|
1088
|
+
for (const segment of _fromCopy) {
|
|
1089
|
+
if (_to[0] !== segment) {
|
|
1090
|
+
break;
|
|
1091
|
+
}
|
|
1092
|
+
_from.shift();
|
|
1093
|
+
_to.shift();
|
|
1094
|
+
}
|
|
1095
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
1096
|
+
};
|
|
1056
1097
|
|
|
1057
1098
|
// src/utils/find-workspace-root.ts
|
|
1058
1099
|
init_cjs_shims();
|
|
@@ -1731,7 +1772,7 @@ init_cjs_shims();
|
|
|
1731
1772
|
// src/plugins.ts
|
|
1732
1773
|
init_cjs_shims();
|
|
1733
1774
|
|
|
1734
|
-
// ../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=
|
|
1775
|
+
// ../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=72dcde755c336eeca3e6170de1106fd85ecb66171e060788f80_a0e867e2fdd5e61b2177f27f7d5585ff/node_modules/eslint-plugin-pnpm/dist/index.mjs
|
|
1735
1776
|
init_cjs_shims();
|
|
1736
1777
|
var name = "eslint-plugin-pnpm";
|
|
1737
1778
|
var version = "0.3.0";
|
|
@@ -8622,24 +8663,39 @@ init_cjs_shims();
|
|
|
8622
8663
|
|
|
8623
8664
|
// src/utils/tsconfig-path.ts
|
|
8624
8665
|
init_cjs_shims();
|
|
8625
|
-
function getTsConfigPath(tsconfigPath
|
|
8626
|
-
|
|
8666
|
+
function getTsConfigPath(tsconfigPath, type = "app") {
|
|
8667
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
8627
8668
|
if (tsconfigPath && fs.existsSync(tsconfigPath) && fs.statSync(tsconfigPath).isFile()) {
|
|
8628
|
-
|
|
8629
|
-
} else if (tsconfigPath === workspaceRoot && fs.existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
8630
|
-
result = "tsconfig.base.json";
|
|
8631
|
-
} else if (fs.existsSync(joinPaths(tsconfigPath, "tsconfig.app.json"))) {
|
|
8632
|
-
result = "tsconfig.app.json";
|
|
8633
|
-
} else if (fs.existsSync(joinPaths(tsconfigPath, "tsconfig.lib.json"))) {
|
|
8634
|
-
result = "tsconfig.lib.json";
|
|
8635
|
-
} else if (fs.existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
8636
|
-
result = "tsconfig.base.json";
|
|
8637
|
-
} else {
|
|
8638
|
-
console.warn(
|
|
8639
|
-
`No tsconfig.json found${tsconfigPath !== "./" ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
8640
|
-
);
|
|
8669
|
+
return relative(workspaceRoot, tsconfigPath);
|
|
8641
8670
|
}
|
|
8642
|
-
|
|
8671
|
+
let result = checkTsConfigPath(process.cwd());
|
|
8672
|
+
if (result) {
|
|
8673
|
+
return relative(workspaceRoot, joinPaths(process.cwd(), result));
|
|
8674
|
+
}
|
|
8675
|
+
result = checkTsConfigPath(workspaceRoot);
|
|
8676
|
+
if (result) {
|
|
8677
|
+
return result;
|
|
8678
|
+
}
|
|
8679
|
+
console.warn(
|
|
8680
|
+
`No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
8681
|
+
);
|
|
8682
|
+
return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : `tsconfig.${type}.json`;
|
|
8683
|
+
}
|
|
8684
|
+
function checkTsConfigPath(root) {
|
|
8685
|
+
if (fs.existsSync(joinPaths(root, "tsconfig.json"))) {
|
|
8686
|
+
return "tsconfig.json";
|
|
8687
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.base.json"))) {
|
|
8688
|
+
return "tsconfig.base.json";
|
|
8689
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.app.json"))) {
|
|
8690
|
+
return "tsconfig.app.json";
|
|
8691
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.lib.json"))) {
|
|
8692
|
+
return "tsconfig.lib.json";
|
|
8693
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.eslint.json"))) {
|
|
8694
|
+
return "tsconfig.eslint.json";
|
|
8695
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.lint.json"))) {
|
|
8696
|
+
return "tsconfig.lint.json";
|
|
8697
|
+
}
|
|
8698
|
+
return void 0;
|
|
8643
8699
|
}
|
|
8644
8700
|
|
|
8645
8701
|
// src/configs/typescript.ts
|
|
@@ -8662,11 +8718,7 @@ async function typescript(options = {}) {
|
|
|
8662
8718
|
`${GLOB_MARKDOWN}/**`,
|
|
8663
8719
|
GLOB_ASTRO_TS
|
|
8664
8720
|
];
|
|
8665
|
-
const
|
|
8666
|
-
const tsconfigPath = getTsConfigPath(
|
|
8667
|
-
options?.tsconfigPath || workspaceRoot,
|
|
8668
|
-
workspaceRoot
|
|
8669
|
-
);
|
|
8721
|
+
const tsconfigPath = getTsConfigPath(options?.tsconfigPath, type);
|
|
8670
8722
|
const typeAwareRules = {
|
|
8671
8723
|
"dot-notation": "off",
|
|
8672
8724
|
"no-implied-eval": "off",
|
|
@@ -8709,7 +8761,7 @@ async function typescript(options = {}) {
|
|
|
8709
8761
|
allowDefaultProject: ["./*.js", "./*.ts"],
|
|
8710
8762
|
defaultProject: tsconfigPath
|
|
8711
8763
|
},
|
|
8712
|
-
tsconfigRootDir:
|
|
8764
|
+
tsconfigRootDir: findWorkspaceRoot()
|
|
8713
8765
|
} : {},
|
|
8714
8766
|
...parserOptions
|
|
8715
8767
|
}
|
|
@@ -9162,10 +9214,6 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
9162
9214
|
}
|
|
9163
9215
|
}
|
|
9164
9216
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|
|
9165
|
-
let tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
|
|
9166
|
-
if (!tsconfigPath) {
|
|
9167
|
-
tsconfigPath = getTsConfigPath();
|
|
9168
|
-
}
|
|
9169
9217
|
configs3.push(
|
|
9170
9218
|
ignores(options.ignores),
|
|
9171
9219
|
javascript({
|
|
@@ -9251,7 +9299,7 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
9251
9299
|
react({
|
|
9252
9300
|
...typescriptOptions,
|
|
9253
9301
|
overrides: getOverrides(options, "react"),
|
|
9254
|
-
tsconfigPath
|
|
9302
|
+
tsconfigPath: "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0
|
|
9255
9303
|
})
|
|
9256
9304
|
);
|
|
9257
9305
|
}
|
package/dist/preset.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { isInEditorEnv, interopDefault, ensurePackages, renameRules, parserPlain, isPackageInScope } from './chunk-
|
|
2
|
-
import { getTsConfigPath } from './chunk-
|
|
3
|
-
import { banner_plugin_default } from './chunk-
|
|
4
|
-
import { getFileBanner } from './chunk-
|
|
5
|
-
import { GLOB_EXCLUDE, GLOB_TS, GLOB_TSX, GLOB_JSX, GLOB_MARKDOWN, GLOB_ASTRO_TS, GLOB_SRC, GLOB_TESTS, GLOB_ASTRO, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_YAML, GLOB_TOML, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_CSS, GLOB_POSTCSS, GLOB_SCSS, GLOB_LESS, GLOB_HTML, GLOB_XML, GLOB_SVG, GLOB_GRAPHQL, GLOB_SRC_EXT } from './chunk-
|
|
6
|
-
import { findWorkspaceRoot } from './chunk-
|
|
7
|
-
import { joinPaths } from './chunk-
|
|
8
|
-
import { __commonJS, init_esm_shims, __toESM } from './chunk-
|
|
1
|
+
import { isInEditorEnv, interopDefault, ensurePackages, renameRules, parserPlain, isPackageInScope } from './chunk-VWADAV3Y.js';
|
|
2
|
+
import { getTsConfigPath } from './chunk-SMKQOITJ.js';
|
|
3
|
+
import { banner_plugin_default } from './chunk-KD3E54TD.js';
|
|
4
|
+
import { getFileBanner } from './chunk-Q25MSM3K.js';
|
|
5
|
+
import { GLOB_EXCLUDE, GLOB_TS, GLOB_TSX, GLOB_JSX, GLOB_MARKDOWN, GLOB_ASTRO_TS, GLOB_SRC, GLOB_TESTS, GLOB_ASTRO, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_YAML, GLOB_TOML, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_CSS, GLOB_POSTCSS, GLOB_SCSS, GLOB_LESS, GLOB_HTML, GLOB_XML, GLOB_SVG, GLOB_GRAPHQL, GLOB_SRC_EXT } from './chunk-H3RCHNCA.js';
|
|
6
|
+
import { findWorkspaceRoot } from './chunk-HGKDUUP5.js';
|
|
7
|
+
import { joinPaths } from './chunk-V4HRYKCY.js';
|
|
8
|
+
import { __commonJS, init_esm_shims, __toESM } from './chunk-PKXKXCCD.js';
|
|
9
9
|
import * as __import__microsoft_tsdocConfig from '@microsoft/tsdoc-config';
|
|
10
10
|
import * as __import_path from 'path';
|
|
11
11
|
import * as __import_fs from 'fs';
|
|
@@ -1211,7 +1211,7 @@ init_esm_shims();
|
|
|
1211
1211
|
// src/plugins.ts
|
|
1212
1212
|
init_esm_shims();
|
|
1213
1213
|
|
|
1214
|
-
// ../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=
|
|
1214
|
+
// ../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=72dcde755c336eeca3e6170de1106fd85ecb66171e060788f80_a0e867e2fdd5e61b2177f27f7d5585ff/node_modules/eslint-plugin-pnpm/dist/index.mjs
|
|
1215
1215
|
init_esm_shims();
|
|
1216
1216
|
var name = "eslint-plugin-pnpm";
|
|
1217
1217
|
var version = "0.3.0";
|
|
@@ -7714,11 +7714,7 @@ async function typescript(options = {}) {
|
|
|
7714
7714
|
`${GLOB_MARKDOWN}/**`,
|
|
7715
7715
|
GLOB_ASTRO_TS
|
|
7716
7716
|
];
|
|
7717
|
-
const
|
|
7718
|
-
const tsconfigPath = getTsConfigPath(
|
|
7719
|
-
options?.tsconfigPath || workspaceRoot,
|
|
7720
|
-
workspaceRoot
|
|
7721
|
-
);
|
|
7717
|
+
const tsconfigPath = getTsConfigPath(options?.tsconfigPath, type);
|
|
7722
7718
|
const typeAwareRules = {
|
|
7723
7719
|
"dot-notation": "off",
|
|
7724
7720
|
"no-implied-eval": "off",
|
|
@@ -7761,7 +7757,7 @@ async function typescript(options = {}) {
|
|
|
7761
7757
|
allowDefaultProject: ["./*.js", "./*.ts"],
|
|
7762
7758
|
defaultProject: tsconfigPath
|
|
7763
7759
|
},
|
|
7764
|
-
tsconfigRootDir:
|
|
7760
|
+
tsconfigRootDir: findWorkspaceRoot()
|
|
7765
7761
|
} : {},
|
|
7766
7762
|
...parserOptions
|
|
7767
7763
|
}
|
|
@@ -8214,10 +8210,6 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
8214
8210
|
}
|
|
8215
8211
|
}
|
|
8216
8212
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|
|
8217
|
-
let tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
|
|
8218
|
-
if (!tsconfigPath) {
|
|
8219
|
-
tsconfigPath = getTsConfigPath();
|
|
8220
|
-
}
|
|
8221
8213
|
configs3.push(
|
|
8222
8214
|
ignores(options.ignores),
|
|
8223
8215
|
javascript({
|
|
@@ -8303,7 +8295,7 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
8303
8295
|
react({
|
|
8304
8296
|
...typescriptOptions,
|
|
8305
8297
|
overrides: getOverrides(options, "react"),
|
|
8306
|
-
tsconfigPath
|
|
8298
|
+
tsconfigPath: "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0
|
|
8307
8299
|
})
|
|
8308
8300
|
);
|
|
8309
8301
|
}
|
package/dist/types.d.cts
CHANGED
|
@@ -967,6 +967,10 @@ Backward pagination arguments
|
|
|
967
967
|
* Use dprint to format code
|
|
968
968
|
*/
|
|
969
969
|
'format/dprint'?: Linter.RuleEntry<FormatDprint>
|
|
970
|
+
/**
|
|
971
|
+
* Use oxfmt to format code
|
|
972
|
+
*/
|
|
973
|
+
'format/oxfmt'?: Linter.RuleEntry<FormatOxfmt>
|
|
970
974
|
/**
|
|
971
975
|
* Use Prettier to format code
|
|
972
976
|
*/
|
|
@@ -3202,11 +3206,11 @@ Backward pagination arguments
|
|
|
3202
3206
|
/**
|
|
3203
3207
|
* An eslint rule that does pattern matching against an entire file
|
|
3204
3208
|
*/
|
|
3205
|
-
'no-secrets/no-pattern-match'?: Linter.RuleEntry<
|
|
3209
|
+
'no-secrets/no-pattern-match'?: Linter.RuleEntry<NoSecretsNoPatternMatch>
|
|
3206
3210
|
/**
|
|
3207
3211
|
* An eslint rule that looks for possible leftover secrets in code
|
|
3208
3212
|
*/
|
|
3209
|
-
'no-secrets/no-secrets'?: Linter.RuleEntry<
|
|
3213
|
+
'no-secrets/no-secrets'?: Linter.RuleEntry<NoSecretsNoSecrets>
|
|
3210
3214
|
/**
|
|
3211
3215
|
* Disallow assignments where both sides are exactly the same
|
|
3212
3216
|
* @see https://eslint.org/docs/latest/rules/no-self-assign
|
|
@@ -8505,6 +8509,10 @@ type FormatDprint = []|[{
|
|
|
8505
8509
|
plugins?: unknown[]
|
|
8506
8510
|
[k: string]: unknown | undefined
|
|
8507
8511
|
}]
|
|
8512
|
+
// ----- format/oxfmt -----
|
|
8513
|
+
type FormatOxfmt = []|[{
|
|
8514
|
+
[k: string]: unknown | undefined
|
|
8515
|
+
}]
|
|
8508
8516
|
// ----- format/prettier -----
|
|
8509
8517
|
type FormatPrettier = []|[{
|
|
8510
8518
|
parser: string
|
|
@@ -10881,6 +10889,34 @@ type NoRestrictedSyntax = (string | {
|
|
|
10881
10889
|
})[]
|
|
10882
10890
|
// ----- no-return-assign -----
|
|
10883
10891
|
type NoReturnAssign = []|[("except-parens" | "always")]
|
|
10892
|
+
// ----- no-secrets/no-pattern-match -----
|
|
10893
|
+
type NoSecretsNoPatternMatch = {
|
|
10894
|
+
|
|
10895
|
+
patterns: {
|
|
10896
|
+
|
|
10897
|
+
[k: string]: (string | {}) | undefined
|
|
10898
|
+
}
|
|
10899
|
+
}[]
|
|
10900
|
+
// ----- no-secrets/no-secrets -----
|
|
10901
|
+
type NoSecretsNoSecrets = {
|
|
10902
|
+
|
|
10903
|
+
tolerance: number
|
|
10904
|
+
|
|
10905
|
+
ignoreModules: boolean
|
|
10906
|
+
|
|
10907
|
+
ignoreCase: boolean
|
|
10908
|
+
|
|
10909
|
+
ignoreContent: ((string | {}) | (string | {})[])
|
|
10910
|
+
|
|
10911
|
+
ignoreIdentifiers: ((string | {}) | (string | {})[])
|
|
10912
|
+
|
|
10913
|
+
additionalDelimiters: ((string | {}) | (string | {})[])
|
|
10914
|
+
|
|
10915
|
+
additionalRegexes: {
|
|
10916
|
+
|
|
10917
|
+
[k: string]: (string | {}) | undefined
|
|
10918
|
+
}
|
|
10919
|
+
}[]
|
|
10884
10920
|
// ----- no-self-assign -----
|
|
10885
10921
|
type NoSelfAssign = []|[{
|
|
10886
10922
|
props?: boolean
|
package/dist/types.d.ts
CHANGED
|
@@ -967,6 +967,10 @@ Backward pagination arguments
|
|
|
967
967
|
* Use dprint to format code
|
|
968
968
|
*/
|
|
969
969
|
'format/dprint'?: Linter.RuleEntry<FormatDprint>
|
|
970
|
+
/**
|
|
971
|
+
* Use oxfmt to format code
|
|
972
|
+
*/
|
|
973
|
+
'format/oxfmt'?: Linter.RuleEntry<FormatOxfmt>
|
|
970
974
|
/**
|
|
971
975
|
* Use Prettier to format code
|
|
972
976
|
*/
|
|
@@ -3202,11 +3206,11 @@ Backward pagination arguments
|
|
|
3202
3206
|
/**
|
|
3203
3207
|
* An eslint rule that does pattern matching against an entire file
|
|
3204
3208
|
*/
|
|
3205
|
-
'no-secrets/no-pattern-match'?: Linter.RuleEntry<
|
|
3209
|
+
'no-secrets/no-pattern-match'?: Linter.RuleEntry<NoSecretsNoPatternMatch>
|
|
3206
3210
|
/**
|
|
3207
3211
|
* An eslint rule that looks for possible leftover secrets in code
|
|
3208
3212
|
*/
|
|
3209
|
-
'no-secrets/no-secrets'?: Linter.RuleEntry<
|
|
3213
|
+
'no-secrets/no-secrets'?: Linter.RuleEntry<NoSecretsNoSecrets>
|
|
3210
3214
|
/**
|
|
3211
3215
|
* Disallow assignments where both sides are exactly the same
|
|
3212
3216
|
* @see https://eslint.org/docs/latest/rules/no-self-assign
|
|
@@ -8505,6 +8509,10 @@ type FormatDprint = []|[{
|
|
|
8505
8509
|
plugins?: unknown[]
|
|
8506
8510
|
[k: string]: unknown | undefined
|
|
8507
8511
|
}]
|
|
8512
|
+
// ----- format/oxfmt -----
|
|
8513
|
+
type FormatOxfmt = []|[{
|
|
8514
|
+
[k: string]: unknown | undefined
|
|
8515
|
+
}]
|
|
8508
8516
|
// ----- format/prettier -----
|
|
8509
8517
|
type FormatPrettier = []|[{
|
|
8510
8518
|
parser: string
|
|
@@ -10881,6 +10889,34 @@ type NoRestrictedSyntax = (string | {
|
|
|
10881
10889
|
})[]
|
|
10882
10890
|
// ----- no-return-assign -----
|
|
10883
10891
|
type NoReturnAssign = []|[("except-parens" | "always")]
|
|
10892
|
+
// ----- no-secrets/no-pattern-match -----
|
|
10893
|
+
type NoSecretsNoPatternMatch = {
|
|
10894
|
+
|
|
10895
|
+
patterns: {
|
|
10896
|
+
|
|
10897
|
+
[k: string]: (string | {}) | undefined
|
|
10898
|
+
}
|
|
10899
|
+
}[]
|
|
10900
|
+
// ----- no-secrets/no-secrets -----
|
|
10901
|
+
type NoSecretsNoSecrets = {
|
|
10902
|
+
|
|
10903
|
+
tolerance: number
|
|
10904
|
+
|
|
10905
|
+
ignoreModules: boolean
|
|
10906
|
+
|
|
10907
|
+
ignoreCase: boolean
|
|
10908
|
+
|
|
10909
|
+
ignoreContent: ((string | {}) | (string | {})[])
|
|
10910
|
+
|
|
10911
|
+
ignoreIdentifiers: ((string | {}) | (string | {})[])
|
|
10912
|
+
|
|
10913
|
+
additionalDelimiters: ((string | {}) | (string | {})[])
|
|
10914
|
+
|
|
10915
|
+
additionalRegexes: {
|
|
10916
|
+
|
|
10917
|
+
[k: string]: (string | {}) | undefined
|
|
10918
|
+
}
|
|
10919
|
+
}[]
|
|
10884
10920
|
// ----- no-self-assign -----
|
|
10885
10921
|
type NoSelfAssign = []|[{
|
|
10886
10922
|
props?: boolean
|
package/dist/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { banner_plugin_default as default } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { banner_plugin_default as default } from '../chunk-KD3E54TD.js';
|
|
2
|
+
import '../chunk-Q25MSM3K.js';
|
|
3
|
+
import '../chunk-H3RCHNCA.js';
|
|
4
|
+
import '../chunk-PKXKXCCD.js';
|
package/dist/utils/combine.js
CHANGED
package/dist/utils/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from '../chunk-H3RCHNCA.js';
|
|
2
|
+
import '../chunk-PKXKXCCD.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from '../chunk-V4HRYKCY.js';
|
|
2
|
+
import '../chunk-PKXKXCCD.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { findWorkspaceRoot, findWorkspaceRootSafe } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { findWorkspaceRoot, findWorkspaceRootSafe } from '../chunk-HGKDUUP5.js';
|
|
2
|
+
import '../chunk-V4HRYKCY.js';
|
|
3
|
+
import '../chunk-PKXKXCCD.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { formatConfig } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { formatConfig } from '../chunk-RSOBNZB3.js';
|
|
2
|
+
import '../chunk-PKXKXCCD.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { getFileBanner } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { getFileBanner } from '../chunk-Q25MSM3K.js';
|
|
2
|
+
import '../chunk-H3RCHNCA.js';
|
|
3
|
+
import '../chunk-PKXKXCCD.js';
|
package/dist/utils/helpers.cjs
CHANGED
|
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
8
8
|
|
|
9
9
|
var process__default = /*#__PURE__*/_interopDefault(process);
|
|
10
10
|
|
|
11
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
11
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__a9cefbd35e33069f17719a3a61e5a32e/node_modules/tsup/assets/cjs_shims.js
|
|
12
12
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
13
13
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
14
14
|
var scopeUrl = url.fileURLToPath(new URL(".", importMetaUrl));
|
package/dist/utils/helpers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules } from '../chunk-VWADAV3Y.js';
|
|
2
|
+
import '../chunk-PKXKXCCD.js';
|
package/dist/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from '../chunk-
|
|
2
|
-
export { formatConfig } from '../chunk-
|
|
3
|
-
import { init_esm_shims } from '../chunk-
|
|
1
|
+
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from '../chunk-H3RCHNCA.js';
|
|
2
|
+
export { formatConfig } from '../chunk-RSOBNZB3.js';
|
|
3
|
+
import { init_esm_shims } from '../chunk-PKXKXCCD.js';
|
|
4
4
|
|
|
5
5
|
// src/utils/index.ts
|
|
6
6
|
init_esm_shims();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var fs = require('fs');
|
|
4
|
+
var path = require('path');
|
|
4
5
|
|
|
5
6
|
// src/utils/tsconfig-path.ts
|
|
6
7
|
|
|
@@ -15,6 +16,7 @@ function normalizeWindowsPath(input = "") {
|
|
|
15
16
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
16
17
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
17
18
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
19
|
+
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
18
20
|
var correctPaths = function(path) {
|
|
19
21
|
if (!path || path.length === 0) {
|
|
20
22
|
return ".";
|
|
@@ -65,6 +67,30 @@ var joinPaths = function(...segments) {
|
|
|
65
67
|
}
|
|
66
68
|
return correctPaths(path);
|
|
67
69
|
};
|
|
70
|
+
function cwd() {
|
|
71
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
72
|
+
return process.cwd().replace(/\\/g, "/");
|
|
73
|
+
}
|
|
74
|
+
return "/";
|
|
75
|
+
}
|
|
76
|
+
var resolve = function(...arguments_) {
|
|
77
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
78
|
+
let resolvedPath = "";
|
|
79
|
+
let resolvedAbsolute = false;
|
|
80
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
81
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
82
|
+
if (!path || path.length === 0) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
86
|
+
resolvedAbsolute = isAbsolute(path);
|
|
87
|
+
}
|
|
88
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
89
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
90
|
+
return `/${resolvedPath}`;
|
|
91
|
+
}
|
|
92
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
93
|
+
};
|
|
68
94
|
function normalizeString(path, allowAboveRoot) {
|
|
69
95
|
let res = "";
|
|
70
96
|
let lastSegmentLength = 0;
|
|
@@ -127,26 +153,145 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
127
153
|
var isAbsolute = function(p) {
|
|
128
154
|
return _IS_ABSOLUTE_RE.test(p);
|
|
129
155
|
};
|
|
156
|
+
var relative = function(from, to) {
|
|
157
|
+
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
158
|
+
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
159
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
160
|
+
return _to.join("/");
|
|
161
|
+
}
|
|
162
|
+
const _fromCopy = [..._from];
|
|
163
|
+
for (const segment of _fromCopy) {
|
|
164
|
+
if (_to[0] !== segment) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
_from.shift();
|
|
168
|
+
_to.shift();
|
|
169
|
+
}
|
|
170
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
171
|
+
};
|
|
172
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
173
|
+
var depth = 0;
|
|
174
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
175
|
+
const _startPath = startPath ?? process.cwd();
|
|
176
|
+
if (endDirectoryNames.some(
|
|
177
|
+
(endDirName) => fs.existsSync(path.join(_startPath, endDirName))
|
|
178
|
+
)) {
|
|
179
|
+
return _startPath;
|
|
180
|
+
}
|
|
181
|
+
if (endFileNames.some((endFileName) => fs.existsSync(path.join(_startPath, endFileName)))) {
|
|
182
|
+
return _startPath;
|
|
183
|
+
}
|
|
184
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
185
|
+
const parent = path.join(_startPath, "..");
|
|
186
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
187
|
+
}
|
|
188
|
+
return void 0;
|
|
189
|
+
}
|
|
190
|
+
var rootFiles = [
|
|
191
|
+
"storm-workspace.json",
|
|
192
|
+
"storm-workspace.json",
|
|
193
|
+
"storm-workspace.yaml",
|
|
194
|
+
"storm-workspace.yml",
|
|
195
|
+
"storm-workspace.js",
|
|
196
|
+
"storm-workspace.ts",
|
|
197
|
+
".storm-workspace.json",
|
|
198
|
+
".storm-workspace.yaml",
|
|
199
|
+
".storm-workspace.yml",
|
|
200
|
+
".storm-workspace.js",
|
|
201
|
+
".storm-workspace.ts",
|
|
202
|
+
"lerna.json",
|
|
203
|
+
"nx.json",
|
|
204
|
+
"turbo.json",
|
|
205
|
+
"npm-workspace.json",
|
|
206
|
+
"yarn-workspace.json",
|
|
207
|
+
"pnpm-workspace.json",
|
|
208
|
+
"npm-workspace.yaml",
|
|
209
|
+
"yarn-workspace.yaml",
|
|
210
|
+
"pnpm-workspace.yaml",
|
|
211
|
+
"npm-workspace.yml",
|
|
212
|
+
"yarn-workspace.yml",
|
|
213
|
+
"pnpm-workspace.yml",
|
|
214
|
+
"npm-lock.json",
|
|
215
|
+
"yarn-lock.json",
|
|
216
|
+
"pnpm-lock.json",
|
|
217
|
+
"npm-lock.yaml",
|
|
218
|
+
"yarn-lock.yaml",
|
|
219
|
+
"pnpm-lock.yaml",
|
|
220
|
+
"npm-lock.yml",
|
|
221
|
+
"yarn-lock.yml",
|
|
222
|
+
"pnpm-lock.yml",
|
|
223
|
+
"bun.lockb"
|
|
224
|
+
];
|
|
225
|
+
var rootDirectories = [
|
|
226
|
+
".storm-workspace",
|
|
227
|
+
".nx",
|
|
228
|
+
".github",
|
|
229
|
+
".vscode",
|
|
230
|
+
".verdaccio"
|
|
231
|
+
];
|
|
232
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
233
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
234
|
+
return correctPaths(
|
|
235
|
+
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
return correctPaths(
|
|
239
|
+
findFolderUp(
|
|
240
|
+
process.cwd(),
|
|
241
|
+
rootFiles,
|
|
242
|
+
rootDirectories
|
|
243
|
+
)
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
247
|
+
const result = findWorkspaceRootSafe();
|
|
248
|
+
if (!result) {
|
|
249
|
+
throw new Error(
|
|
250
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
251
|
+
${rootFiles.join(
|
|
252
|
+
"\n"
|
|
253
|
+
)}
|
|
254
|
+
Path: ${process.cwd()}`
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
return result;
|
|
258
|
+
}
|
|
130
259
|
|
|
131
260
|
// src/utils/tsconfig-path.ts
|
|
132
|
-
function getTsConfigPath(tsconfigPath
|
|
133
|
-
|
|
261
|
+
function getTsConfigPath(tsconfigPath, type = "app") {
|
|
262
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
134
263
|
if (tsconfigPath && fs.existsSync(tsconfigPath) && fs.statSync(tsconfigPath).isFile()) {
|
|
135
|
-
|
|
136
|
-
} else if (tsconfigPath === workspaceRoot && fs.existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
137
|
-
result = "tsconfig.base.json";
|
|
138
|
-
} else if (fs.existsSync(joinPaths(tsconfigPath, "tsconfig.app.json"))) {
|
|
139
|
-
result = "tsconfig.app.json";
|
|
140
|
-
} else if (fs.existsSync(joinPaths(tsconfigPath, "tsconfig.lib.json"))) {
|
|
141
|
-
result = "tsconfig.lib.json";
|
|
142
|
-
} else if (fs.existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
143
|
-
result = "tsconfig.base.json";
|
|
144
|
-
} else {
|
|
145
|
-
console.warn(
|
|
146
|
-
`No tsconfig.json found${tsconfigPath !== "./" ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
147
|
-
);
|
|
264
|
+
return relative(workspaceRoot, tsconfigPath);
|
|
148
265
|
}
|
|
149
|
-
|
|
266
|
+
let result = checkTsConfigPath(process.cwd());
|
|
267
|
+
if (result) {
|
|
268
|
+
return relative(workspaceRoot, joinPaths(process.cwd(), result));
|
|
269
|
+
}
|
|
270
|
+
result = checkTsConfigPath(workspaceRoot);
|
|
271
|
+
if (result) {
|
|
272
|
+
return result;
|
|
273
|
+
}
|
|
274
|
+
console.warn(
|
|
275
|
+
`No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
276
|
+
);
|
|
277
|
+
return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : `tsconfig.${type}.json`;
|
|
278
|
+
}
|
|
279
|
+
function checkTsConfigPath(root) {
|
|
280
|
+
if (fs.existsSync(joinPaths(root, "tsconfig.json"))) {
|
|
281
|
+
return "tsconfig.json";
|
|
282
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.base.json"))) {
|
|
283
|
+
return "tsconfig.base.json";
|
|
284
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.app.json"))) {
|
|
285
|
+
return "tsconfig.app.json";
|
|
286
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.lib.json"))) {
|
|
287
|
+
return "tsconfig.lib.json";
|
|
288
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.eslint.json"))) {
|
|
289
|
+
return "tsconfig.eslint.json";
|
|
290
|
+
} else if (fs.existsSync(joinPaths(root, "tsconfig.lint.json"))) {
|
|
291
|
+
return "tsconfig.lint.json";
|
|
292
|
+
}
|
|
293
|
+
return void 0;
|
|
150
294
|
}
|
|
151
295
|
|
|
296
|
+
exports.checkTsConfigPath = checkTsConfigPath;
|
|
152
297
|
exports.getTsConfigPath = getTsConfigPath;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
declare function getTsConfigPath(tsconfigPath?: string,
|
|
1
|
+
declare function getTsConfigPath(tsconfigPath?: string, type?: "app" | "lib"): string;
|
|
2
|
+
declare function checkTsConfigPath(root: string): string | undefined;
|
|
2
3
|
|
|
3
|
-
export { getTsConfigPath };
|
|
4
|
+
export { checkTsConfigPath, getTsConfigPath };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
declare function getTsConfigPath(tsconfigPath?: string,
|
|
1
|
+
declare function getTsConfigPath(tsconfigPath?: string, type?: "app" | "lib"): string;
|
|
2
|
+
declare function checkTsConfigPath(root: string): string | undefined;
|
|
2
3
|
|
|
3
|
-
export { getTsConfigPath };
|
|
4
|
+
export { checkTsConfigPath, getTsConfigPath };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { getTsConfigPath } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { checkTsConfigPath, getTsConfigPath } from '../chunk-SMKQOITJ.js';
|
|
2
|
+
import '../chunk-HGKDUUP5.js';
|
|
3
|
+
import '../chunk-V4HRYKCY.js';
|
|
4
|
+
import '../chunk-PKXKXCCD.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.169.
|
|
3
|
+
"version": "0.169.103",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"keywords": [
|
|
@@ -138,19 +138,19 @@
|
|
|
138
138
|
"@antfu/install-pkg": "^1.1.0",
|
|
139
139
|
"@clack/prompts": "^0.10.1",
|
|
140
140
|
"@cspell/eslint-plugin": "^8.19.4",
|
|
141
|
-
"@eslint/eslintrc": "^3.3.
|
|
141
|
+
"@eslint/eslintrc": "^3.3.4",
|
|
142
142
|
"@eslint/markdown": "^6.6.0",
|
|
143
143
|
"@nx/eslint-plugin": "22.5.1",
|
|
144
|
-
"@storm-software/config": "^1.135.
|
|
145
|
-
"@storm-software/config-tools": "^1.189.
|
|
144
|
+
"@storm-software/config": "^1.135.16",
|
|
145
|
+
"@storm-software/config-tools": "^1.189.15",
|
|
146
146
|
"@stylistic/eslint-plugin": "^4.4.1",
|
|
147
|
-
"@typescript-eslint/eslint-plugin": "^8.56.
|
|
148
|
-
"@typescript-eslint/parser": "^8.56.
|
|
149
|
-
"@typescript-eslint/utils": "^8.56.
|
|
147
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
148
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
149
|
+
"@typescript-eslint/utils": "^8.56.1",
|
|
150
150
|
"@vitest/eslint-plugin": "^1.6.9",
|
|
151
151
|
"chalk": "^4.1.2",
|
|
152
152
|
"defu": "6.1.4",
|
|
153
|
-
"eslint-config-flat-gitignore": "^2.1
|
|
153
|
+
"eslint-config-flat-gitignore": "^2.2.1",
|
|
154
154
|
"eslint-config-prettier": "^10.1.8",
|
|
155
155
|
"eslint-flat-config-utils": "^2.1.4",
|
|
156
156
|
"eslint-merge-processors": "^2.0.0",
|
|
@@ -161,10 +161,10 @@
|
|
|
161
161
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
162
162
|
"eslint-plugin-markdown": "^5.1.0",
|
|
163
163
|
"eslint-plugin-markdownlint": "^0.6.0",
|
|
164
|
-
"eslint-plugin-mdx": "^3.
|
|
164
|
+
"eslint-plugin-mdx": "^3.7.0",
|
|
165
165
|
"eslint-plugin-n": "^17.24.0",
|
|
166
166
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
167
|
-
"eslint-plugin-no-secrets": "^2.
|
|
167
|
+
"eslint-plugin-no-secrets": "^2.3.3",
|
|
168
168
|
"eslint-plugin-paths": "^1.1.0",
|
|
169
169
|
"eslint-plugin-perfectionist": "^4.15.1",
|
|
170
170
|
"eslint-plugin-pnpm": "0.3.0",
|
|
@@ -195,13 +195,13 @@
|
|
|
195
195
|
"@stylistic/eslint-plugin-migrate": "^4.4.1",
|
|
196
196
|
"@types/eslint": "^9.6.1",
|
|
197
197
|
"@types/eslint__js": "^8.42.3",
|
|
198
|
-
"@types/node": "^25.3.
|
|
198
|
+
"@types/node": "^25.3.5",
|
|
199
199
|
"@unocss/eslint-plugin": "^65.5.0",
|
|
200
200
|
"astro-eslint-parser": "^1.3.0",
|
|
201
201
|
"esbuild": "^0.25.12",
|
|
202
|
-
"eslint": "^9.39.
|
|
202
|
+
"eslint": "^9.39.3",
|
|
203
203
|
"eslint-plugin-astro": "^1.6.0",
|
|
204
|
-
"eslint-plugin-format": "^1.
|
|
204
|
+
"eslint-plugin-format": "^1.5.0",
|
|
205
205
|
"eslint-plugin-import-zod": "^1.2.1",
|
|
206
206
|
"eslint-plugin-react-compiler": "19.0.0-beta-21e868a-20250216",
|
|
207
207
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"eslint-plugin-relay": "^1.8.3",
|
|
211
211
|
"eslint-plugin-storybook": "^0.11.6",
|
|
212
212
|
"eslint-typegen": "^1.0.0",
|
|
213
|
-
"graphql": "^16.
|
|
213
|
+
"graphql": "^16.13.1",
|
|
214
214
|
"prettier-plugin-astro": "^0.14.1",
|
|
215
215
|
"tsup": "8.4.0",
|
|
216
216
|
"tsx": "^4.21.0",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"@storm-software/tsdoc": "*",
|
|
226
226
|
"@unocss/eslint-plugin": ">=0.50.0",
|
|
227
227
|
"astro-eslint-parser": "^1.0.2",
|
|
228
|
-
"eslint": "^9.39.
|
|
228
|
+
"eslint": "^9.39.3",
|
|
229
229
|
"eslint-plugin-astro": "^1.2.0",
|
|
230
230
|
"eslint-plugin-format": ">=0.1.0",
|
|
231
231
|
"eslint-plugin-import-zod": "^1.2.0",
|
|
@@ -239,5 +239,5 @@
|
|
|
239
239
|
"prettier-plugin-astro": "^0.14.0"
|
|
240
240
|
},
|
|
241
241
|
"publishConfig": { "access": "public" },
|
|
242
|
-
"gitHead": "
|
|
242
|
+
"gitHead": "5cbd6520f38fa8c4ce52cbde401bf6566f73b927"
|
|
243
243
|
}
|
package/dist/chunk-DJ2ZXQYV.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { joinPaths } from './chunk-T4LUMNGJ.js';
|
|
2
|
-
import { init_esm_shims } from './chunk-PWQ34SJ2.js';
|
|
3
|
-
import { existsSync, statSync } from 'node:fs';
|
|
4
|
-
|
|
5
|
-
// src/utils/tsconfig-path.ts
|
|
6
|
-
init_esm_shims();
|
|
7
|
-
function getTsConfigPath(tsconfigPath = "./", workspaceRoot = "./") {
|
|
8
|
-
let result = "tsconfig.json";
|
|
9
|
-
if (tsconfigPath && existsSync(tsconfigPath) && statSync(tsconfigPath).isFile()) {
|
|
10
|
-
result = tsconfigPath;
|
|
11
|
-
} else if (tsconfigPath === workspaceRoot && existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
12
|
-
result = "tsconfig.base.json";
|
|
13
|
-
} else if (existsSync(joinPaths(tsconfigPath, "tsconfig.app.json"))) {
|
|
14
|
-
result = "tsconfig.app.json";
|
|
15
|
-
} else if (existsSync(joinPaths(tsconfigPath, "tsconfig.lib.json"))) {
|
|
16
|
-
result = "tsconfig.lib.json";
|
|
17
|
-
} else if (existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
18
|
-
result = "tsconfig.base.json";
|
|
19
|
-
} else {
|
|
20
|
-
console.warn(
|
|
21
|
-
`No tsconfig.json found${tsconfigPath !== "./" ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { getTsConfigPath };
|