@storm-software/eslint 0.170.154 → 0.170.156

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.
@@ -1,196 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var fs = require('fs');
4
- var path = require('path');
3
+ var node_fs = require('node:fs');
4
+ var node_path = require('node:path');
5
+ var findWorkspaceRoot = require('./find-workspace-root');
5
6
 
6
- // src/utils/package-manager.ts
7
-
8
- // src/utils/correct-paths.ts
9
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
10
- function normalizeWindowsPath(input = "") {
11
- if (!input) {
12
- return input;
13
- }
14
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
15
- }
16
- var _UNC_REGEX = /^[/\\]{2}/;
17
- var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
18
- var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
19
- var correctPaths = function(path) {
20
- if (!path || path.length === 0) {
21
- return ".";
22
- }
23
- path = normalizeWindowsPath(path);
24
- const isUNCPath = path.match(_UNC_REGEX);
25
- const isPathAbsolute = isAbsolute(path);
26
- const trailingSeparator = path[path.length - 1] === "/";
27
- path = normalizeString(path, !isPathAbsolute);
28
- if (path.length === 0) {
29
- if (isPathAbsolute) {
30
- return "/";
31
- }
32
- return trailingSeparator ? "./" : ".";
33
- }
34
- if (trailingSeparator) {
35
- path += "/";
36
- }
37
- if (_DRIVE_LETTER_RE.test(path)) {
38
- path += "/";
39
- }
40
- if (isUNCPath) {
41
- if (!isPathAbsolute) {
42
- return `//./${path}`;
43
- }
44
- return `//${path}`;
45
- }
46
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
47
- };
48
- function normalizeString(path, allowAboveRoot) {
49
- let res = "";
50
- let lastSegmentLength = 0;
51
- let lastSlash = -1;
52
- let dots = 0;
53
- let char = null;
54
- for (let index = 0; index <= path.length; ++index) {
55
- if (index < path.length) {
56
- char = path[index];
57
- } else if (char === "/") {
58
- break;
59
- } else {
60
- char = "/";
61
- }
62
- if (char === "/") {
63
- if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
64
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
65
- if (res.length > 2) {
66
- const lastSlashIndex = res.lastIndexOf("/");
67
- if (lastSlashIndex === -1) {
68
- res = "";
69
- lastSegmentLength = 0;
70
- } else {
71
- res = res.slice(0, lastSlashIndex);
72
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
73
- }
74
- lastSlash = index;
75
- dots = 0;
76
- continue;
77
- } else if (res.length > 0) {
78
- res = "";
79
- lastSegmentLength = 0;
80
- lastSlash = index;
81
- dots = 0;
82
- continue;
83
- }
84
- }
85
- if (allowAboveRoot) {
86
- res += res.length > 0 ? "/.." : "..";
87
- lastSegmentLength = 2;
88
- }
89
- } else {
90
- if (res.length > 0) {
91
- res += `/${path.slice(lastSlash + 1, index)}`;
92
- } else {
93
- res = path.slice(lastSlash + 1, index);
94
- }
95
- lastSegmentLength = index - lastSlash - 1;
96
- }
97
- lastSlash = index;
98
- dots = 0;
99
- } else if (char === "." && dots !== -1) {
100
- ++dots;
101
- } else {
102
- dots = -1;
103
- }
104
- }
105
- return res;
106
- }
107
- var isAbsolute = function(p) {
108
- return _IS_ABSOLUTE_RE.test(p);
109
- };
110
-
111
- // src/utils/find-workspace-root.ts
112
- var MAX_PATH_SEARCH_DEPTH = 30;
113
- var depth = 0;
114
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
115
- const _startPath = startPath ?? process.cwd();
116
- if (endDirectoryNames.some(
117
- (endDirName) => fs.existsSync(path.join(_startPath, endDirName))
118
- )) {
119
- return _startPath;
120
- }
121
- if (endFileNames.some((endFileName) => fs.existsSync(path.join(_startPath, endFileName)))) {
122
- return _startPath;
123
- }
124
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
125
- const parent = path.join(_startPath, "..");
126
- return findFolderUp(parent, endFileNames, endDirectoryNames);
127
- }
128
- return void 0;
129
- }
130
- var rootFiles = [
131
- "storm-workspace.json",
132
- "storm-workspace.json",
133
- "storm-workspace.yaml",
134
- "storm-workspace.yml",
135
- "storm-workspace.js",
136
- "storm-workspace.ts",
137
- ".storm-workspace.json",
138
- ".storm-workspace.yaml",
139
- ".storm-workspace.yml",
140
- ".storm-workspace.js",
141
- ".storm-workspace.ts",
142
- "lerna.json",
143
- "nx.json",
144
- "turbo.json",
145
- "npm-workspace.json",
146
- "yarn-workspace.json",
147
- "pnpm-workspace.json",
148
- "npm-workspace.yaml",
149
- "yarn-workspace.yaml",
150
- "pnpm-workspace.yaml",
151
- "npm-workspace.yml",
152
- "yarn-workspace.yml",
153
- "pnpm-workspace.yml",
154
- "npm-lock.json",
155
- "yarn-lock.json",
156
- "pnpm-lock.json",
157
- "npm-lock.yaml",
158
- "yarn-lock.yaml",
159
- "pnpm-lock.yaml",
160
- "npm-lock.yml",
161
- "yarn-lock.yml",
162
- "pnpm-lock.yml",
163
- "bun.lockb"
164
- ];
165
- var rootDirectories = [
166
- ".storm-workspace",
167
- ".nx",
168
- ".github",
169
- ".vscode",
170
- ".verdaccio"
171
- ];
172
- function findWorkspaceRootSafe(pathInsideMonorepo) {
173
- if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
174
- return correctPaths(
175
- process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
176
- );
177
- }
178
- return correctPaths(
179
- findFolderUp(
180
- process.cwd(),
181
- rootFiles,
182
- rootDirectories
183
- )
184
- );
185
- }
186
-
187
- // src/utils/package-manager.ts
188
7
  function detectPackageManager() {
189
- const workspaceRoot = findWorkspaceRootSafe() ?? process.cwd();
190
- if (fs.existsSync(path.join(workspaceRoot, "bun.lockb")) || fs.existsSync(path.join(workspaceRoot, "bun.lock")) || fs.existsSync(path.join(workspaceRoot, "bunfig.toml")) || fs.existsSync(path.join(workspaceRoot, "bunfig.yml"))) {
8
+ const workspaceRoot = findWorkspaceRoot.findWorkspaceRootSafe() ?? process.cwd();
9
+ if (node_fs.existsSync(node_path.join(workspaceRoot, "bun.lockb")) || node_fs.existsSync(node_path.join(workspaceRoot, "bun.lock")) || node_fs.existsSync(node_path.join(workspaceRoot, "bunfig.toml")) || node_fs.existsSync(node_path.join(workspaceRoot, "bunfig.yml"))) {
191
10
  return "bun";
192
11
  }
193
- if (fs.existsSync(path.join(workspaceRoot, "pnpm-lock.yaml")) || fs.existsSync(path.join(workspaceRoot, "pnpm-lock.yml")) || fs.existsSync(path.join(workspaceRoot, "pnpm-workpace.yaml"))) {
12
+ if (node_fs.existsSync(node_path.join(workspaceRoot, "pnpm-lock.yaml")) || node_fs.existsSync(node_path.join(workspaceRoot, "pnpm-lock.yml")) || node_fs.existsSync(node_path.join(workspaceRoot, "pnpm-workpace.yaml"))) {
194
13
  return "pnpm";
195
14
  }
196
15
  return "npm";
@@ -1,4 +1,16 @@
1
- export { detectPackageManager } from '../chunk-S56TF5J2.js';
2
- import '../chunk-HHXJGKW3.js';
3
- import '../chunk-ZODAKOU6.js';
4
- import '../chunk-DQLHUNSU.js';
1
+ import { existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { findWorkspaceRootSafe } from './find-workspace-root';
4
+
5
+ function detectPackageManager() {
6
+ const workspaceRoot = findWorkspaceRootSafe() ?? process.cwd();
7
+ if (existsSync(join(workspaceRoot, "bun.lockb")) || existsSync(join(workspaceRoot, "bun.lock")) || existsSync(join(workspaceRoot, "bunfig.toml")) || existsSync(join(workspaceRoot, "bunfig.yml"))) {
8
+ return "bun";
9
+ }
10
+ if (existsSync(join(workspaceRoot, "pnpm-lock.yaml")) || existsSync(join(workspaceRoot, "pnpm-lock.yml")) || existsSync(join(workspaceRoot, "pnpm-workpace.yaml"))) {
11
+ return "pnpm";
12
+ }
13
+ return "npm";
14
+ }
15
+
16
+ export { detectPackageManager };
@@ -1,275 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var fs = require('fs');
4
- var path = require('path');
3
+ var node_fs = require('node:fs');
4
+ var correctPaths = require('./correct-paths');
5
+ var findWorkspaceRoot = require('./find-workspace-root');
5
6
 
6
- // src/utils/tsconfig.ts
7
-
8
- // src/utils/correct-paths.ts
9
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
10
- function normalizeWindowsPath(input = "") {
11
- if (!input) {
12
- return input;
13
- }
14
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
15
- }
16
- var _UNC_REGEX = /^[/\\]{2}/;
17
- var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
18
- var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
19
- var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
20
- var correctPaths = function(path) {
21
- if (!path || path.length === 0) {
22
- return ".";
23
- }
24
- path = normalizeWindowsPath(path);
25
- const isUNCPath = path.match(_UNC_REGEX);
26
- const isPathAbsolute = isAbsolute(path);
27
- const trailingSeparator = path[path.length - 1] === "/";
28
- path = normalizeString(path, !isPathAbsolute);
29
- if (path.length === 0) {
30
- if (isPathAbsolute) {
31
- return "/";
32
- }
33
- return trailingSeparator ? "./" : ".";
34
- }
35
- if (trailingSeparator) {
36
- path += "/";
37
- }
38
- if (_DRIVE_LETTER_RE.test(path)) {
39
- path += "/";
40
- }
41
- if (isUNCPath) {
42
- if (!isPathAbsolute) {
43
- return `//./${path}`;
44
- }
45
- return `//${path}`;
46
- }
47
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
48
- };
49
- var joinPaths = function(...segments) {
50
- let path = "";
51
- for (const seg of segments) {
52
- if (!seg) {
53
- continue;
54
- }
55
- if (path.length > 0) {
56
- const pathTrailing = path[path.length - 1] === "/";
57
- const segLeading = seg[0] === "/";
58
- const both = pathTrailing && segLeading;
59
- if (both) {
60
- path += seg.slice(1);
61
- } else {
62
- path += pathTrailing || segLeading ? seg : `/${seg}`;
63
- }
64
- } else {
65
- path += seg;
66
- }
67
- }
68
- return correctPaths(path);
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
- };
94
- function normalizeString(path, allowAboveRoot) {
95
- let res = "";
96
- let lastSegmentLength = 0;
97
- let lastSlash = -1;
98
- let dots = 0;
99
- let char = null;
100
- for (let index = 0; index <= path.length; ++index) {
101
- if (index < path.length) {
102
- char = path[index];
103
- } else if (char === "/") {
104
- break;
105
- } else {
106
- char = "/";
107
- }
108
- if (char === "/") {
109
- if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
110
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
111
- if (res.length > 2) {
112
- const lastSlashIndex = res.lastIndexOf("/");
113
- if (lastSlashIndex === -1) {
114
- res = "";
115
- lastSegmentLength = 0;
116
- } else {
117
- res = res.slice(0, lastSlashIndex);
118
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
119
- }
120
- lastSlash = index;
121
- dots = 0;
122
- continue;
123
- } else if (res.length > 0) {
124
- res = "";
125
- lastSegmentLength = 0;
126
- lastSlash = index;
127
- dots = 0;
128
- continue;
129
- }
130
- }
131
- if (allowAboveRoot) {
132
- res += res.length > 0 ? "/.." : "..";
133
- lastSegmentLength = 2;
134
- }
135
- } else {
136
- if (res.length > 0) {
137
- res += `/${path.slice(lastSlash + 1, index)}`;
138
- } else {
139
- res = path.slice(lastSlash + 1, index);
140
- }
141
- lastSegmentLength = index - lastSlash - 1;
142
- }
143
- lastSlash = index;
144
- dots = 0;
145
- } else if (char === "." && dots !== -1) {
146
- ++dots;
147
- } else {
148
- dots = -1;
149
- }
150
- }
151
- return res;
152
- }
153
- var isAbsolute = function(p) {
154
- return _IS_ABSOLUTE_RE.test(p);
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
- }
259
-
260
- // src/utils/tsconfig.ts
261
7
  function getTsConfigPath(tsconfigPath, type) {
262
- const workspaceRoot = findWorkspaceRoot();
263
- if (tsconfigPath && fs.existsSync(tsconfigPath) && fs.statSync(tsconfigPath).isFile()) {
264
- return relative(workspaceRoot, tsconfigPath);
8
+ const workspaceRoot = findWorkspaceRoot.findWorkspaceRoot();
9
+ if (tsconfigPath && node_fs.existsSync(tsconfigPath) && node_fs.statSync(tsconfigPath).isFile()) {
10
+ return correctPaths.relative(workspaceRoot, tsconfigPath);
265
11
  }
266
12
  let result = checkTsConfigPath(process.cwd());
267
13
  if (result) {
268
- return relative(workspaceRoot, joinPaths(process.cwd(), result));
14
+ return correctPaths.relative(workspaceRoot, correctPaths.joinPaths(process.cwd(), result));
269
15
  }
270
16
  result = checkTsConfigPath(workspaceRoot);
271
17
  if (result) {
272
- return relative(workspaceRoot, joinPaths(workspaceRoot, result));
18
+ return correctPaths.relative(workspaceRoot, correctPaths.joinPaths(workspaceRoot, result));
273
19
  }
274
20
  console.warn(
275
21
  `No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
@@ -277,17 +23,17 @@ function getTsConfigPath(tsconfigPath, type) {
277
23
  return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : type ? `tsconfig.${type}.json` : "tsconfig.json";
278
24
  }
279
25
  function checkTsConfigPath(root) {
280
- if (fs.existsSync(joinPaths(root, "tsconfig.json"))) {
26
+ if (node_fs.existsSync(correctPaths.joinPaths(root, "tsconfig.json"))) {
281
27
  return "tsconfig.json";
282
- } else if (fs.existsSync(joinPaths(root, "tsconfig.base.json"))) {
28
+ } else if (node_fs.existsSync(correctPaths.joinPaths(root, "tsconfig.base.json"))) {
283
29
  return "tsconfig.base.json";
284
- } else if (fs.existsSync(joinPaths(root, "tsconfig.app.json"))) {
30
+ } else if (node_fs.existsSync(correctPaths.joinPaths(root, "tsconfig.app.json"))) {
285
31
  return "tsconfig.app.json";
286
- } else if (fs.existsSync(joinPaths(root, "tsconfig.lib.json"))) {
32
+ } else if (node_fs.existsSync(correctPaths.joinPaths(root, "tsconfig.lib.json"))) {
287
33
  return "tsconfig.lib.json";
288
- } else if (fs.existsSync(joinPaths(root, "tsconfig.eslint.json"))) {
34
+ } else if (node_fs.existsSync(correctPaths.joinPaths(root, "tsconfig.eslint.json"))) {
289
35
  return "tsconfig.eslint.json";
290
- } else if (fs.existsSync(joinPaths(root, "tsconfig.lint.json"))) {
36
+ } else if (node_fs.existsSync(correctPaths.joinPaths(root, "tsconfig.lint.json"))) {
291
37
  return "tsconfig.lint.json";
292
38
  }
293
39
  return void 0;
@@ -1,4 +1,40 @@
1
- export { checkTsConfigPath, getTsConfigPath } from '../chunk-TZB7GT36.js';
2
- import '../chunk-HHXJGKW3.js';
3
- import '../chunk-ZODAKOU6.js';
4
- import '../chunk-DQLHUNSU.js';
1
+ import { existsSync, statSync } from 'node:fs';
2
+ import { relative, joinPaths } from './correct-paths';
3
+ import { findWorkspaceRoot } from './find-workspace-root';
4
+
5
+ function getTsConfigPath(tsconfigPath, type) {
6
+ const workspaceRoot = findWorkspaceRoot();
7
+ if (tsconfigPath && existsSync(tsconfigPath) && statSync(tsconfigPath).isFile()) {
8
+ return relative(workspaceRoot, tsconfigPath);
9
+ }
10
+ let result = checkTsConfigPath(process.cwd());
11
+ if (result) {
12
+ return relative(workspaceRoot, joinPaths(process.cwd(), result));
13
+ }
14
+ result = checkTsConfigPath(workspaceRoot);
15
+ if (result) {
16
+ return relative(workspaceRoot, joinPaths(workspaceRoot, result));
17
+ }
18
+ console.warn(
19
+ `No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
20
+ );
21
+ return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : type ? `tsconfig.${type}.json` : "tsconfig.json";
22
+ }
23
+ function checkTsConfigPath(root) {
24
+ if (existsSync(joinPaths(root, "tsconfig.json"))) {
25
+ return "tsconfig.json";
26
+ } else if (existsSync(joinPaths(root, "tsconfig.base.json"))) {
27
+ return "tsconfig.base.json";
28
+ } else if (existsSync(joinPaths(root, "tsconfig.app.json"))) {
29
+ return "tsconfig.app.json";
30
+ } else if (existsSync(joinPaths(root, "tsconfig.lib.json"))) {
31
+ return "tsconfig.lib.json";
32
+ } else if (existsSync(joinPaths(root, "tsconfig.eslint.json"))) {
33
+ return "tsconfig.eslint.json";
34
+ } else if (existsSync(joinPaths(root, "tsconfig.lint.json"))) {
35
+ return "tsconfig.lint.json";
36
+ }
37
+ return void 0;
38
+ }
39
+
40
+ export { checkTsConfigPath, getTsConfigPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.170.154",
3
+ "version": "0.170.156",
4
4
  "private": false,
5
5
  "description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "keywords": [
@@ -129,9 +129,11 @@
129
129
  "@eslint/eslintrc": "^3.3.6",
130
130
  "@eslint/markdown": "^6.6.0",
131
131
  "@nx/eslint-plugin": "23.1.1",
132
- "@storm-software/config": "1.138.57",
133
- "@storm-software/config-tools": "1.190.120",
134
- "@storm-software/package-constants": "0.1.133",
132
+ "@storm-software/config": "1.138.59",
133
+ "@storm-software/config-tools": "1.190.122",
134
+ "@storm-software/eslint-plugin-banner": "0.0.87",
135
+ "@storm-software/eslint-plugin-tsdoc": "0.0.85",
136
+ "@storm-software/package-constants": "0.1.135",
135
137
  "@stylistic/eslint-plugin": "^4.4.1",
136
138
  "@typescript-eslint/eslint-plugin": "^8.66.0",
137
139
  "@typescript-eslint/parser": "^8.66.0",
@@ -140,6 +142,7 @@
140
142
  "ajv": "^6.15.0",
141
143
  "chalk": "^4.1.2",
142
144
  "cross-spawn": "^7.0.6",
145
+ "debug": "^4.4.3",
143
146
  "defu": "^6.1.7",
144
147
  "eslint": "^10.8.0",
145
148
  "eslint-config-flat-gitignore": "^2.3.0",
@@ -169,8 +172,10 @@
169
172
  "globals": "^16.5.0",
170
173
  "jsonc-eslint-parser": "^2.4.2",
171
174
  "local-pkg": "^1.2.1",
175
+ "ms": "^2.1.3",
172
176
  "pathe": "^2.0.3",
173
177
  "pnpm-workspace-yaml": "^0.3.1",
178
+ "supports-color": "^11.0.0",
174
179
  "toml-eslint-parser": "^0.10.1",
175
180
  "yaml-eslint-parser": "^1.3.2",
176
181
  "zod-validation-error": "^5.0.0"
@@ -184,11 +189,9 @@
184
189
  "@next/eslint-plugin-next": "^15.5.23",
185
190
  "@nx/eslint": "23.1.1",
186
191
  "@prettier/plugin-xml": "^3.4.2",
187
- "@storm-software/eslint-plugin-banner": "0.0.85",
188
- "@storm-software/eslint-plugin-bun": "0.0.8",
189
- "@storm-software/eslint-plugin-pnpm": "0.0.83",
190
- "@storm-software/eslint-plugin-tsdoc": "0.0.83",
191
- "@storm-software/tsdoc": "0.13.273",
192
+ "@storm-software/eslint-plugin-bun": "0.0.10",
193
+ "@storm-software/eslint-plugin-pnpm": "0.0.85",
194
+ "@storm-software/tsdoc": "0.13.275",
192
195
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
193
196
  "@types/eslint": "^9.6.1",
194
197
  "@types/eslint__js": "^8.42.3",
@@ -196,7 +199,6 @@
196
199
  "@types/node": "^25.9.5",
197
200
  "@unocss/eslint-plugin": "^65.5.0",
198
201
  "astro-eslint-parser": "^1.4.0",
199
- "debug": "^4.4.3",
200
202
  "esbuild": "^0.25.12",
201
203
  "eslint-plugin-astro": "^1.7.0",
202
204
  "eslint-plugin-format": "^1.5.0",
@@ -221,7 +223,7 @@
221
223
  "minimatch": "^10.2.6",
222
224
  "prettier-plugin-astro": "^0.14.1",
223
225
  "tsup": "8.4.0",
224
- "tsx": "^4.23.9",
226
+ "tsx": "^4.23.10",
225
227
  "typescript": "^6.0.3",
226
228
  "zod": "^4.4.3"
227
229
  },
@@ -287,5 +289,5 @@
287
289
  "zod": { "optional": true }
288
290
  },
289
291
  "publishConfig": { "access": "public" },
290
- "gitHead": "dce519750140dbed032b5cc68e4c35edca8cb846"
292
+ "gitHead": "0be9a37f594450158c976638a8d496232ba3178a"
291
293
  }