@storm-software/eslint 0.117.1 → 0.117.3
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/preset.cjs +26 -15
- package/dist/preset.js +26 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/dist/preset.cjs
CHANGED
|
@@ -156,7 +156,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
156
156
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
157
157
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
158
158
|
var StormConfigSchema = _zod2.default.object({
|
|
159
|
-
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
159
|
+
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
160
160
|
extends: ExtendsSchema.optional(),
|
|
161
161
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
162
162
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -198,6 +198,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
198
198
|
"trace",
|
|
199
199
|
"all"
|
|
200
200
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
201
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
201
202
|
registry: RegistryConfigSchema,
|
|
202
203
|
configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
203
204
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -341,14 +342,17 @@ var isAbsolute = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(
|
|
|
341
342
|
|
|
342
343
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
343
344
|
var depth = 0;
|
|
344
|
-
function findFolderUp(startPath, endFileNames) {
|
|
345
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
345
346
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
347
|
+
if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
|
|
348
|
+
return _startPath;
|
|
349
|
+
}
|
|
346
350
|
if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
|
|
347
351
|
return _startPath;
|
|
348
352
|
}
|
|
349
353
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
350
354
|
const parent = _path.join.call(void 0, _startPath, "..");
|
|
351
|
-
return findFolderUp(parent, endFileNames);
|
|
355
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
352
356
|
}
|
|
353
357
|
return void 0;
|
|
354
358
|
}
|
|
@@ -356,17 +360,17 @@ _chunkUSNT2KNTcjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
|
356
360
|
|
|
357
361
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
358
362
|
var rootFiles = [
|
|
359
|
-
"storm.json",
|
|
360
|
-
"storm.json",
|
|
361
|
-
"storm.yaml",
|
|
362
|
-
"storm.yml",
|
|
363
|
-
"storm.js",
|
|
364
|
-
"storm.ts",
|
|
365
|
-
".storm.json",
|
|
366
|
-
".storm.yaml",
|
|
367
|
-
".storm.yml",
|
|
368
|
-
".storm.js",
|
|
369
|
-
".storm.ts",
|
|
363
|
+
"storm-workspace.json",
|
|
364
|
+
"storm-workspace.json",
|
|
365
|
+
"storm-workspace.yaml",
|
|
366
|
+
"storm-workspace.yml",
|
|
367
|
+
"storm-workspace.js",
|
|
368
|
+
"storm-workspace.ts",
|
|
369
|
+
".storm-workspace.json",
|
|
370
|
+
".storm-workspace.yaml",
|
|
371
|
+
".storm-workspace.yml",
|
|
372
|
+
".storm-workspace.js",
|
|
373
|
+
".storm-workspace.ts",
|
|
370
374
|
"lerna.json",
|
|
371
375
|
"nx.json",
|
|
372
376
|
"turbo.json",
|
|
@@ -390,11 +394,18 @@ var rootFiles = [
|
|
|
390
394
|
"pnpm-lock.yml",
|
|
391
395
|
"bun.lockb"
|
|
392
396
|
];
|
|
397
|
+
var rootDirectories = [
|
|
398
|
+
".storm-workspace",
|
|
399
|
+
".nx",
|
|
400
|
+
".github",
|
|
401
|
+
".vscode",
|
|
402
|
+
".verdaccio"
|
|
403
|
+
];
|
|
393
404
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
394
405
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
395
406
|
return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
396
407
|
}
|
|
397
|
-
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
408
|
+
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
|
|
398
409
|
}
|
|
399
410
|
_chunkUSNT2KNTcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
400
411
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
package/dist/preset.js
CHANGED
|
@@ -156,7 +156,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
156
156
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
157
157
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
158
158
|
var StormConfigSchema = z.object({
|
|
159
|
-
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
159
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
160
160
|
extends: ExtendsSchema.optional(),
|
|
161
161
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
162
162
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -198,6 +198,7 @@ var StormConfigSchema = z.object({
|
|
|
198
198
|
"trace",
|
|
199
199
|
"all"
|
|
200
200
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
201
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
201
202
|
registry: RegistryConfigSchema,
|
|
202
203
|
configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
203
204
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -341,14 +342,17 @@ import { existsSync } from "node:fs";
|
|
|
341
342
|
import { join } from "node:path";
|
|
342
343
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
343
344
|
var depth = 0;
|
|
344
|
-
function findFolderUp(startPath, endFileNames) {
|
|
345
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
345
346
|
const _startPath = startPath ?? process.cwd();
|
|
347
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
348
|
+
return _startPath;
|
|
349
|
+
}
|
|
346
350
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
347
351
|
return _startPath;
|
|
348
352
|
}
|
|
349
353
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
350
354
|
const parent = join(_startPath, "..");
|
|
351
|
-
return findFolderUp(parent, endFileNames);
|
|
355
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
352
356
|
}
|
|
353
357
|
return void 0;
|
|
354
358
|
}
|
|
@@ -356,17 +360,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
356
360
|
|
|
357
361
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
358
362
|
var rootFiles = [
|
|
359
|
-
"storm.json",
|
|
360
|
-
"storm.json",
|
|
361
|
-
"storm.yaml",
|
|
362
|
-
"storm.yml",
|
|
363
|
-
"storm.js",
|
|
364
|
-
"storm.ts",
|
|
365
|
-
".storm.json",
|
|
366
|
-
".storm.yaml",
|
|
367
|
-
".storm.yml",
|
|
368
|
-
".storm.js",
|
|
369
|
-
".storm.ts",
|
|
363
|
+
"storm-workspace.json",
|
|
364
|
+
"storm-workspace.json",
|
|
365
|
+
"storm-workspace.yaml",
|
|
366
|
+
"storm-workspace.yml",
|
|
367
|
+
"storm-workspace.js",
|
|
368
|
+
"storm-workspace.ts",
|
|
369
|
+
".storm-workspace.json",
|
|
370
|
+
".storm-workspace.yaml",
|
|
371
|
+
".storm-workspace.yml",
|
|
372
|
+
".storm-workspace.js",
|
|
373
|
+
".storm-workspace.ts",
|
|
370
374
|
"lerna.json",
|
|
371
375
|
"nx.json",
|
|
372
376
|
"turbo.json",
|
|
@@ -390,11 +394,18 @@ var rootFiles = [
|
|
|
390
394
|
"pnpm-lock.yml",
|
|
391
395
|
"bun.lockb"
|
|
392
396
|
];
|
|
397
|
+
var rootDirectories = [
|
|
398
|
+
".storm-workspace",
|
|
399
|
+
".nx",
|
|
400
|
+
".github",
|
|
401
|
+
".vscode",
|
|
402
|
+
".verdaccio"
|
|
403
|
+
];
|
|
393
404
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
394
405
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
395
406
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
396
407
|
}
|
|
397
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
408
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
398
409
|
}
|
|
399
410
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
400
411
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
package/package.json
CHANGED