@storm-software/eslint 0.148.19 → 0.148.21
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-DKJ6VCEL.js → chunk-2AFQKKSX.js} +91 -63
- package/dist/{chunk-G4SCUHQO.js → chunk-5ALLOW52.js} +2 -5
- package/dist/{chunk-D3EN5HD2.js → chunk-DLORY5AL.js} +4 -6
- package/dist/{chunk-SZFP4QOA.js → chunk-HO6DXXZX.js} +24 -45
- package/dist/{chunk-G7QVU75O.js → chunk-RU7GXBCG.js} +30 -42
- package/dist/{chunk-7JRBTALJ.js → chunk-WYU7W4UW.js} +21 -13
- package/dist/{chunk-FTXILLLE.js → chunk-Z2ZQTZDC.js} +2 -6
- package/dist/preset.js +603 -1147
- package/dist/utils/banner-plugin.js +2 -3
- package/dist/utils/combine.js +0 -5
- package/dist/utils/constants.js +0 -1
- package/dist/utils/correct-paths.js +1 -2
- package/dist/utils/find-workspace-root.js +2 -3
- package/dist/utils/format-config.js +1 -2
- package/dist/utils/get-file-banner.js +1 -2
- package/dist/utils/helpers.js +1 -2
- package/dist/utils/index.js +1 -2
- package/dist/utils/tsconfig-path.js +2 -3
- package/package.json +1 -1
- package/dist/chunk-SHUYVCID.js +0 -6
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
correctPaths
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
__name
|
|
6
|
-
} from "./chunk-SHUYVCID.js";
|
|
3
|
+
} from "./chunk-RU7GXBCG.js";
|
|
7
4
|
|
|
8
5
|
// src/utils/find-workspace-root.ts
|
|
9
6
|
import { existsSync } from "node:fs";
|
|
@@ -12,7 +9,9 @@ var MAX_PATH_SEARCH_DEPTH = 30;
|
|
|
12
9
|
var depth = 0;
|
|
13
10
|
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
14
11
|
const _startPath = startPath ?? process.cwd();
|
|
15
|
-
if (endDirectoryNames.some(
|
|
12
|
+
if (endDirectoryNames.some(
|
|
13
|
+
(endDirName) => existsSync(join(_startPath, endDirName))
|
|
14
|
+
)) {
|
|
16
15
|
return _startPath;
|
|
17
16
|
}
|
|
18
17
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
@@ -24,7 +23,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
24
23
|
}
|
|
25
24
|
return void 0;
|
|
26
25
|
}
|
|
27
|
-
__name(findFolderUp, "findFolderUp");
|
|
28
26
|
var rootFiles = [
|
|
29
27
|
"storm-workspace.json",
|
|
30
28
|
"storm-workspace.json",
|
|
@@ -69,21 +67,31 @@ var rootDirectories = [
|
|
|
69
67
|
];
|
|
70
68
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
71
69
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
72
|
-
return correctPaths(
|
|
70
|
+
return correctPaths(
|
|
71
|
+
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
72
|
+
);
|
|
73
73
|
}
|
|
74
|
-
return correctPaths(
|
|
74
|
+
return correctPaths(
|
|
75
|
+
findFolderUp(
|
|
76
|
+
pathInsideMonorepo ?? process.cwd(),
|
|
77
|
+
rootFiles,
|
|
78
|
+
rootDirectories
|
|
79
|
+
)
|
|
80
|
+
);
|
|
75
81
|
}
|
|
76
|
-
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
77
82
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
78
83
|
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
79
84
|
if (!result) {
|
|
80
|
-
throw new Error(
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
throw new Error(
|
|
86
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
87
|
+
${rootFiles.join(
|
|
88
|
+
"\n"
|
|
89
|
+
)}
|
|
90
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
91
|
+
);
|
|
83
92
|
}
|
|
84
93
|
return result;
|
|
85
94
|
}
|
|
86
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
87
95
|
|
|
88
96
|
export {
|
|
89
97
|
findWorkspaceRootSafe,
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-SHUYVCID.js";
|
|
4
|
-
|
|
5
1
|
// src/utils/format-config.ts
|
|
6
|
-
var formatConfig =
|
|
2
|
+
var formatConfig = (name, config = []) => {
|
|
7
3
|
return config.map((config2, index) => {
|
|
8
4
|
if (!config2 || config2.name) {
|
|
9
5
|
return config2 ?? {};
|
|
@@ -17,7 +13,7 @@ var formatConfig = /* @__PURE__ */ __name((name, config = []) => {
|
|
|
17
13
|
}
|
|
18
14
|
};
|
|
19
15
|
});
|
|
20
|
-
}
|
|
16
|
+
};
|
|
21
17
|
|
|
22
18
|
export {
|
|
23
19
|
formatConfig
|