@storm-software/eslint 0.170.156 → 0.170.158

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.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.mts +43 -0
  3. package/dist/index.mjs +44 -0
  4. package/dist/plugins.d.mts +15 -0
  5. package/dist/plugins.mjs +16 -0
  6. package/dist/preset.d.mts +32 -0
  7. package/dist/preset.mjs +213 -0
  8. package/dist/{types.d.cts → typegen.d.mts} +8538 -11156
  9. package/dist/types.d.mts +735 -0
  10. package/dist/types.mjs +5 -0
  11. package/dist/utils/correct-paths.mjs +136 -0
  12. package/dist/utils/find-workspace-root.mjs +83 -0
  13. package/dist/utils/helpers.mjs +75 -0
  14. package/dist/utils/package-manager.mjs +20 -0
  15. package/dist/utils/tsconfig.mjs +48 -0
  16. package/package.json +58 -79
  17. package/dist/index.cjs +0 -24
  18. package/dist/index.d.cts +0 -127
  19. package/dist/index.d.ts +0 -127
  20. package/dist/index.js +0 -7
  21. package/dist/preset.cjs +0 -354
  22. package/dist/preset.d.cts +0 -34
  23. package/dist/preset.d.ts +0 -34
  24. package/dist/preset.js +0 -344
  25. package/dist/types.cjs +0 -12
  26. package/dist/types.d.ts +0 -19537
  27. package/dist/types.js +0 -1
  28. package/dist/utils/combine.cjs +0 -8
  29. package/dist/utils/combine.d.cts +0 -14
  30. package/dist/utils/combine.d.ts +0 -14
  31. package/dist/utils/combine.js +0 -6
  32. package/dist/utils/correct-paths.cjs +0 -231
  33. package/dist/utils/correct-paths.d.cts +0 -30
  34. package/dist/utils/correct-paths.d.ts +0 -30
  35. package/dist/utils/correct-paths.js +0 -216
  36. package/dist/utils/find-workspace-root.cjs +0 -96
  37. package/dist/utils/find-workspace-root.d.cts +0 -16
  38. package/dist/utils/find-workspace-root.d.ts +0 -16
  39. package/dist/utils/find-workspace-root.js +0 -93
  40. package/dist/utils/format-config.cjs +0 -19
  41. package/dist/utils/format-config.d.cts +0 -5
  42. package/dist/utils/format-config.d.ts +0 -5
  43. package/dist/utils/format-config.js +0 -17
  44. package/dist/utils/helpers.cjs +0 -86
  45. package/dist/utils/helpers.d.cts +0 -55
  46. package/dist/utils/helpers.d.ts +0 -55
  47. package/dist/utils/helpers.js +0 -72
  48. package/dist/utils/package-manager.cjs +0 -18
  49. package/dist/utils/package-manager.d.cts +0 -8
  50. package/dist/utils/package-manager.d.ts +0 -8
  51. package/dist/utils/package-manager.js +0 -16
  52. package/dist/utils/tsconfig.cjs +0 -43
  53. package/dist/utils/tsconfig.d.cts +0 -25
  54. package/dist/utils/tsconfig.d.ts +0 -25
  55. package/dist/utils/tsconfig.js +0 -40
package/dist/types.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { ConfigNames, RuleOptions } from "./typegen.d.mts";
5
+ export { ConfigNames, RuleOptions };
@@ -0,0 +1,136 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ //#region src/utils/correct-paths.ts
5
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
6
+ function normalizeWindowsPath(input = "") {
7
+ if (!input) return input;
8
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
9
+ }
10
+ const _UNC_REGEX = /^[/\\]{2}/;
11
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
12
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
13
+ const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
14
+ const correctPaths = function(path) {
15
+ if (!path || path.length === 0) return ".";
16
+ path = normalizeWindowsPath(path);
17
+ const isUNCPath = path.match(_UNC_REGEX);
18
+ const isPathAbsolute = isAbsolute(path);
19
+ const trailingSeparator = path[path.length - 1] === "/";
20
+ path = normalizeString(path, !isPathAbsolute);
21
+ if (path.length === 0) {
22
+ if (isPathAbsolute) return "/";
23
+ return trailingSeparator ? "./" : ".";
24
+ }
25
+ if (trailingSeparator) path += "/";
26
+ if (_DRIVE_LETTER_RE.test(path)) path += "/";
27
+ if (isUNCPath) {
28
+ if (!isPathAbsolute) return `//./${path}`;
29
+ return `//${path}`;
30
+ }
31
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
32
+ };
33
+ const joinPaths = function(...segments) {
34
+ let path = "";
35
+ for (const seg of segments) {
36
+ if (!seg) continue;
37
+ if (path.length > 0) {
38
+ const pathTrailing = path[path.length - 1] === "/";
39
+ const segLeading = seg[0] === "/";
40
+ if (pathTrailing && segLeading) path += seg.slice(1);
41
+ else path += pathTrailing || segLeading ? seg : `/${seg}`;
42
+ } else path += seg;
43
+ }
44
+ return correctPaths(path);
45
+ };
46
+ function cwd() {
47
+ if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
48
+ return "/";
49
+ }
50
+ const resolve = function(...arguments_) {
51
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
52
+ let resolvedPath = "";
53
+ let resolvedAbsolute = false;
54
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
55
+ const path = index >= 0 ? arguments_[index] : cwd();
56
+ if (!path || path.length === 0) continue;
57
+ resolvedPath = `${path}/${resolvedPath}`;
58
+ resolvedAbsolute = isAbsolute(path);
59
+ }
60
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
61
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
62
+ return resolvedPath.length > 0 ? resolvedPath : ".";
63
+ };
64
+ /**
65
+ * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
66
+ *
67
+ * @param path - The path to normalise.
68
+ * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
69
+ * @returns the normalised path string.
70
+ */
71
+ function normalizeString(path, allowAboveRoot) {
72
+ let res = "";
73
+ let lastSegmentLength = 0;
74
+ let lastSlash = -1;
75
+ let dots = 0;
76
+ let char = null;
77
+ for (let index = 0; index <= path.length; ++index) {
78
+ if (index < path.length) char = path[index];
79
+ else if (char === "/") break;
80
+ else char = "/";
81
+ if (char === "/") {
82
+ if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
83
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
84
+ if (res.length > 2) {
85
+ const lastSlashIndex = res.lastIndexOf("/");
86
+ if (lastSlashIndex === -1) {
87
+ res = "";
88
+ lastSegmentLength = 0;
89
+ } else {
90
+ res = res.slice(0, lastSlashIndex);
91
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
92
+ }
93
+ lastSlash = index;
94
+ dots = 0;
95
+ continue;
96
+ } else if (res.length > 0) {
97
+ res = "";
98
+ lastSegmentLength = 0;
99
+ lastSlash = index;
100
+ dots = 0;
101
+ continue;
102
+ }
103
+ }
104
+ if (allowAboveRoot) {
105
+ res += res.length > 0 ? "/.." : "..";
106
+ lastSegmentLength = 2;
107
+ }
108
+ } else {
109
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
110
+ else res = path.slice(lastSlash + 1, index);
111
+ lastSegmentLength = index - lastSlash - 1;
112
+ }
113
+ lastSlash = index;
114
+ dots = 0;
115
+ } else if (char === "." && dots !== -1) ++dots;
116
+ else dots = -1;
117
+ }
118
+ return res;
119
+ }
120
+ const isAbsolute = function(p) {
121
+ return _IS_ABSOLUTE_RE.test(p);
122
+ };
123
+ const relative = function(from, to) {
124
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
125
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
126
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/");
127
+ const _fromCopy = [..._from];
128
+ for (const segment of _fromCopy) {
129
+ if (_to[0] !== segment) break;
130
+ _from.shift();
131
+ _to.shift();
132
+ }
133
+ return [..._from.map(() => ".."), ..._to].join("/");
134
+ };
135
+ //#endregion
136
+ export { correctPaths, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, relative, resolve };
@@ -0,0 +1,83 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { correctPaths } from "./correct-paths.mjs";
5
+ import { existsSync } from "node:fs";
6
+ import { join } from "node:path";
7
+ //#region src/utils/find-workspace-root.ts
8
+ const MAX_PATH_SEARCH_DEPTH = 30;
9
+ let depth = 0;
10
+ /**
11
+ * Gets the nearest "node_modules" folder by walking up from start path.
12
+ */
13
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
14
+ const _startPath = startPath ?? process.cwd();
15
+ if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) return _startPath;
16
+ if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) return _startPath;
17
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) return findFolderUp(join(_startPath, ".."), endFileNames, endDirectoryNames);
18
+ }
19
+ const rootFiles = [
20
+ "storm-workspace.json",
21
+ "storm-workspace.json",
22
+ "storm-workspace.yaml",
23
+ "storm-workspace.yml",
24
+ "storm-workspace.js",
25
+ "storm-workspace.ts",
26
+ ".storm-workspace.json",
27
+ ".storm-workspace.yaml",
28
+ ".storm-workspace.yml",
29
+ ".storm-workspace.js",
30
+ ".storm-workspace.ts",
31
+ "lerna.json",
32
+ "nx.json",
33
+ "turbo.json",
34
+ "npm-workspace.json",
35
+ "yarn-workspace.json",
36
+ "pnpm-workspace.json",
37
+ "npm-workspace.yaml",
38
+ "yarn-workspace.yaml",
39
+ "pnpm-workspace.yaml",
40
+ "npm-workspace.yml",
41
+ "yarn-workspace.yml",
42
+ "pnpm-workspace.yml",
43
+ "npm-lock.json",
44
+ "yarn-lock.json",
45
+ "pnpm-lock.json",
46
+ "npm-lock.yaml",
47
+ "yarn-lock.yaml",
48
+ "pnpm-lock.yaml",
49
+ "npm-lock.yml",
50
+ "yarn-lock.yml",
51
+ "pnpm-lock.yml",
52
+ "bun.lockb"
53
+ ];
54
+ const rootDirectories = [
55
+ ".storm-workspace",
56
+ ".nx",
57
+ ".github",
58
+ ".vscode",
59
+ ".verdaccio"
60
+ ];
61
+ /**
62
+ * Find the monorepo root directory, searching upwards from `path`.
63
+ *
64
+ * @param pathInsideMonorepo - The path inside the monorepo to start searching from
65
+ * @returns The monorepo root directory
66
+ */
67
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
68
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
69
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
70
+ }
71
+ /**
72
+ * Find the monorepo root directory, searching upwards from `path`.
73
+ *
74
+ * @param pathInsideMonorepo - The path inside the monorepo to start searching from
75
+ * @returns The monorepo root directory
76
+ */
77
+ function findWorkspaceRoot(pathInsideMonorepo) {
78
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
79
+ if (!result) throw new Error(`Cannot find workspace root upwards from known path. Files search list includes: \n${rootFiles.join("\n")}\nPath: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
80
+ return result;
81
+ }
82
+ //#endregion
83
+ export { findWorkspaceRoot, findWorkspaceRootSafe };
@@ -0,0 +1,75 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { isPackageExists } from "local-pkg";
5
+ import process from "node:process";
6
+ import { fileURLToPath } from "node:url";
7
+ //#region src/utils/helpers.ts
8
+ const scopeUrl = fileURLToPath(new URL(".", import.meta.url));
9
+ const isCwdInScope = isPackageExists("@storm-software/eslint");
10
+ const parserPlain = {
11
+ meta: { name: "parser-plain" },
12
+ parseForESLint: (code) => ({
13
+ ast: {
14
+ body: [],
15
+ comments: [],
16
+ loc: {
17
+ end: code.length,
18
+ start: 0
19
+ },
20
+ range: [0, code.length],
21
+ tokens: [],
22
+ type: "Program"
23
+ },
24
+ scopeManager: null,
25
+ services: { isPlain: true },
26
+ visitorKeys: { Program: [] }
27
+ })
28
+ };
29
+ function isInGitHooksOrLintStaged() {
30
+ return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged") || process.env.npm_lifecycle_script?.startsWith("lefthook") || process.env.npm_lifecycle_script === "push");
31
+ }
32
+ function isInEditorEnv() {
33
+ if (process.env.CI) return false;
34
+ if (isInGitHooksOrLintStaged()) return false;
35
+ return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
36
+ }
37
+ async function interopDefault(m) {
38
+ const resolved = await m;
39
+ return resolved.default || resolved;
40
+ }
41
+ function isPackageInScope(name) {
42
+ return isPackageExists(name, { paths: [scopeUrl] });
43
+ }
44
+ async function ensurePackages(packages) {
45
+ if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
46
+ const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
47
+ if (nonExistingPackages.length === 0) return;
48
+ if (await (await import("@clack/prompts")).confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` })) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
49
+ }
50
+ /**
51
+ * Rename plugin prefixes in a rule object.
52
+ * Accepts a map of prefixes to rename.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * import { renameRules } from '@storm-software/eslint'
57
+ *
58
+ * export default [{
59
+ * rules: renameRules(
60
+ * {
61
+ * '@typescript-eslint/indent': 'error'
62
+ * },
63
+ * { '@typescript-eslint': 'ts' }
64
+ * )
65
+ * }]
66
+ * ```
67
+ */
68
+ function renameRules(rules, map) {
69
+ return Object.fromEntries(Object.entries(rules).map(([key, value]) => {
70
+ for (const [from, to] of Object.entries(map)) if (key.startsWith(`${from}/`)) return [to + key.slice(from.length), value];
71
+ return [key, value];
72
+ }));
73
+ }
74
+ //#endregion
75
+ export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules };
@@ -0,0 +1,20 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { findWorkspaceRootSafe } from "./find-workspace-root.mjs";
5
+ import { existsSync } from "node:fs";
6
+ import { join } from "node:path";
7
+ //#region src/utils/package-manager.ts
8
+ /**
9
+ * Detect the package manager used in the workspace.
10
+ *
11
+ * @returns "pnpm" | "bun" | "npm"
12
+ */
13
+ function detectPackageManager() {
14
+ const workspaceRoot = findWorkspaceRootSafe() ?? process.cwd();
15
+ if (existsSync(join(workspaceRoot, "bun.lockb")) || existsSync(join(workspaceRoot, "bun.lock")) || existsSync(join(workspaceRoot, "bunfig.toml")) || existsSync(join(workspaceRoot, "bunfig.yml"))) return "bun";
16
+ if (existsSync(join(workspaceRoot, "pnpm-lock.yaml")) || existsSync(join(workspaceRoot, "pnpm-lock.yml")) || existsSync(join(workspaceRoot, "pnpm-workpace.yaml"))) return "pnpm";
17
+ return "npm";
18
+ }
19
+ //#endregion
20
+ export { detectPackageManager };
@@ -0,0 +1,48 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { joinPaths, relative } from "./correct-paths.mjs";
5
+ import { findWorkspaceRoot } from "./find-workspace-root.mjs";
6
+ import { existsSync, statSync } from "node:fs";
7
+ //#region src/utils/tsconfig.ts
8
+ /**
9
+ * Gets the path to the nearest tsconfig file by walking up from start path.
10
+ *
11
+ * The search order is as follows:
12
+ * 1. If `tsconfigPath` is provided and exists, it will be used.
13
+ * 2. If a tsconfig file is found in the current working directory, it will be used.
14
+ * 3. If a tsconfig file is found in the workspace root, it will be used.
15
+ * 4. If no tsconfig file is found, a warning will be logged and a default path will be returned based on the project type (app or lib).
16
+ *
17
+ * The function checks for the following tsconfig file names in order:
18
+ * - tsconfig.json
19
+ * - tsconfig.base.json
20
+ * - tsconfig.app.json
21
+ * - tsconfig.lib.json
22
+ * - tsconfig.eslint.json
23
+ * - tsconfig.lint.json
24
+ *
25
+ * @param tsconfigPath Optional path to a tsconfig file. If provided, it will be used if it exists.
26
+ * @param type The type of project (app or lib) to determine the default tsconfig file name if no tsconfig file is found. Default is "app".
27
+ * @returns The path to the nearest tsconfig file relative to the workspace root.
28
+ */
29
+ function getTsConfigPath(tsconfigPath, type) {
30
+ const workspaceRoot = findWorkspaceRoot();
31
+ if (tsconfigPath && existsSync(tsconfigPath) && statSync(tsconfigPath).isFile()) return relative(workspaceRoot, tsconfigPath);
32
+ let result = checkTsConfigPath(process.cwd());
33
+ if (result) return relative(workspaceRoot, joinPaths(process.cwd(), result));
34
+ result = checkTsConfigPath(workspaceRoot);
35
+ if (result) return relative(workspaceRoot, joinPaths(workspaceRoot, result));
36
+ console.warn(`No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`);
37
+ return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : type ? `tsconfig.${type}.json` : "tsconfig.json";
38
+ }
39
+ function checkTsConfigPath(root) {
40
+ if (existsSync(joinPaths(root, "tsconfig.json"))) return "tsconfig.json";
41
+ else if (existsSync(joinPaths(root, "tsconfig.base.json"))) return "tsconfig.base.json";
42
+ else if (existsSync(joinPaths(root, "tsconfig.app.json"))) return "tsconfig.app.json";
43
+ else if (existsSync(joinPaths(root, "tsconfig.lib.json"))) return "tsconfig.lib.json";
44
+ else if (existsSync(joinPaths(root, "tsconfig.eslint.json"))) return "tsconfig.eslint.json";
45
+ else if (existsSync(joinPaths(root, "tsconfig.lint.json"))) return "tsconfig.lint.json";
46
+ }
47
+ //#endregion
48
+ export { checkTsConfigPath, getTsConfigPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.170.156",
3
+ "version": "0.170.158",
4
4
  "private": false,
5
5
  "description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "keywords": [
@@ -51,75 +51,54 @@
51
51
  "sideEffects": false,
52
52
  "type": "module",
53
53
  "exports": {
54
- "./package.json": "./package.json",
55
- ".": {
56
- "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
57
- "require": {
58
- "types": "./dist/index.d.cts",
59
- "default": "./dist/index.cjs"
60
- },
61
- "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
62
- },
63
- "./index": {
64
- "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
65
- "require": {
66
- "types": "./dist/index.d.cts",
67
- "default": "./dist/index.cjs"
68
- },
69
- "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
70
- },
71
- "./preset": {
72
- "import": {
73
- "types": "./dist/preset.d.ts",
74
- "default": "./dist/preset.js"
75
- },
76
- "require": {
77
- "types": "./dist/preset.d.cts",
78
- "default": "./dist/preset.cjs"
79
- },
80
- "default": {
81
- "types": "./dist/preset.d.ts",
82
- "default": "./dist/preset.js"
83
- }
84
- },
85
- "./types": {
86
- "import": { "types": "./dist/types.d.ts", "default": "./dist/types.js" },
87
- "require": {
88
- "types": "./dist/types.d.cts",
89
- "default": "./dist/types.cjs"
90
- },
91
- "default": { "types": "./dist/types.d.ts", "default": "./dist/types.js" }
92
- },
93
- "./rules/*": {
94
- "import": {
95
- "types": "./dist/rules/*.d.ts",
96
- "default": "./dist/rules/*.js"
97
- },
98
- "require": {
99
- "types": "./dist/rules/*.d.cts",
100
- "default": "./dist/rules/*.cjs"
101
- },
102
- "default": {
103
- "types": "./dist/rules/*.d.ts",
104
- "default": "./dist/rules/*.js"
105
- }
106
- },
107
- "./utils/*": {
108
- "import": {
109
- "types": "./dist/utils/*.d.ts",
110
- "default": "./dist/utils/*.js"
111
- },
112
- "require": {
113
- "types": "./dist/utils/*.d.cts",
114
- "default": "./dist/utils/*.cjs"
115
- },
116
- "default": {
117
- "types": "./dist/utils/*.d.ts",
118
- "default": "./dist/utils/*.js"
119
- }
120
- }
54
+ ".": "./dist/index.mjs",
55
+ "./configs": "./dist/configs/index.mjs",
56
+ "./configs/astro": "./dist/configs/astro.mjs",
57
+ "./configs/banner": "./dist/configs/banner.mjs",
58
+ "./configs/bun": "./dist/configs/bun.mjs",
59
+ "./configs/cspell": "./dist/configs/cspell.mjs",
60
+ "./configs/disables": "./dist/configs/disables.mjs",
61
+ "./configs/formatters": "./dist/configs/formatters.mjs",
62
+ "./configs/graphql": "./dist/configs/graphql.mjs",
63
+ "./configs/ignores": "./dist/configs/ignores.mjs",
64
+ "./configs/imports": "./dist/configs/imports.mjs",
65
+ "./configs/javascript": "./dist/configs/javascript.mjs",
66
+ "./configs/jsdoc": "./dist/configs/jsdoc.mjs",
67
+ "./configs/jsonc": "./dist/configs/jsonc.mjs",
68
+ "./configs/jsx": "./dist/configs/jsx.mjs",
69
+ "./configs/markdown": "./dist/configs/markdown.mjs",
70
+ "./configs/mdx": "./dist/configs/mdx.mjs",
71
+ "./configs/next": "./dist/configs/next.mjs",
72
+ "./configs/node": "./dist/configs/node.mjs",
73
+ "./configs/nx": "./dist/configs/nx.mjs",
74
+ "./configs/perfectionist": "./dist/configs/perfectionist.mjs",
75
+ "./configs/pnpm": "./dist/configs/pnpm.mjs",
76
+ "./configs/prettier": "./dist/configs/prettier.mjs",
77
+ "./configs/react": "./dist/configs/react.mjs",
78
+ "./configs/react-native": "./dist/configs/react-native.mjs",
79
+ "./configs/regexp": "./dist/configs/regexp.mjs",
80
+ "./configs/secrets": "./dist/configs/secrets.mjs",
81
+ "./configs/sort": "./dist/configs/sort.mjs",
82
+ "./configs/storybook": "./dist/configs/storybook.mjs",
83
+ "./configs/stylistic": "./dist/configs/stylistic.mjs",
84
+ "./configs/test": "./dist/configs/test.mjs",
85
+ "./configs/toml": "./dist/configs/toml.mjs",
86
+ "./configs/tsdoc": "./dist/configs/tsdoc.mjs",
87
+ "./configs/typescript": "./dist/configs/typescript.mjs",
88
+ "./configs/unicorn": "./dist/configs/unicorn.mjs",
89
+ "./configs/unocss": "./dist/configs/unocss.mjs",
90
+ "./configs/yaml": "./dist/configs/yaml.mjs",
91
+ "./configs/zod": "./dist/configs/zod.mjs",
92
+ "./plugins": "./dist/plugins.mjs",
93
+ "./preset": "./dist/preset.mjs",
94
+ "./types": "./dist/types.mjs",
95
+ "./utils/correct-paths": "./dist/utils/correct-paths.mjs",
96
+ "./utils/find-workspace-root": "./dist/utils/find-workspace-root.mjs",
97
+ "./utils/helpers": "./dist/utils/helpers.mjs",
98
+ "./utils/package-manager": "./dist/utils/package-manager.mjs",
99
+ "./utils/tsconfig": "./dist/utils/tsconfig.mjs",
100
+ "./*": "./*"
121
101
  },
122
- "main": "./dist/index.js",
123
102
  "types": "./dist/index.d.ts",
124
103
  "files": ["dist"],
125
104
  "dependencies": {
@@ -129,11 +108,11 @@
129
108
  "@eslint/eslintrc": "^3.3.6",
130
109
  "@eslint/markdown": "^6.6.0",
131
110
  "@nx/eslint-plugin": "23.1.1",
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",
111
+ "@storm-software/config": "1.138.61",
112
+ "@storm-software/config-tools": "1.190.124",
113
+ "@storm-software/eslint-plugin-banner": "0.0.89",
114
+ "@storm-software/eslint-plugin-tsdoc": "0.0.87",
115
+ "@storm-software/package-constants": "0.1.137",
137
116
  "@stylistic/eslint-plugin": "^4.4.1",
138
117
  "@typescript-eslint/eslint-plugin": "^8.66.0",
139
118
  "@typescript-eslint/parser": "^8.66.0",
@@ -189,9 +168,9 @@
189
168
  "@next/eslint-plugin-next": "^15.5.23",
190
169
  "@nx/eslint": "23.1.1",
191
170
  "@prettier/plugin-xml": "^3.4.2",
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",
171
+ "@storm-software/eslint-plugin-bun": "0.0.12",
172
+ "@storm-software/eslint-plugin-pnpm": "0.0.87",
173
+ "@storm-software/tsdoc": "0.13.277",
195
174
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
196
175
  "@types/eslint": "^9.6.1",
197
176
  "@types/eslint__js": "^8.42.3",
@@ -222,7 +201,7 @@
222
201
  "graphql": "^16.14.2",
223
202
  "minimatch": "^10.2.6",
224
203
  "prettier-plugin-astro": "^0.14.1",
225
- "tsup": "8.4.0",
204
+ "tsdown": "^0.22.14",
226
205
  "tsx": "^4.23.10",
227
206
  "typescript": "^6.0.3",
228
207
  "zod": "^4.4.3"
@@ -289,5 +268,5 @@
289
268
  "zod": { "optional": true }
290
269
  },
291
270
  "publishConfig": { "access": "public" },
292
- "gitHead": "0be9a37f594450158c976638a8d496232ba3178a"
271
+ "gitHead": "88e28b2c74d1a37c7f613a2e4cb0bbfb20f785aa"
293
272
  }
package/dist/index.cjs DELETED
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var preset = require('./preset');
6
- var configs = require('./configs');
7
-
8
- var index_default = preset.defineConfig;
9
-
10
- exports.default = index_default;
11
- Object.keys(preset).forEach(function (k) {
12
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
13
- enumerable: true,
14
- get: function () { return preset[k]; }
15
- });
16
- });
17
- Object.keys(configs).forEach(function (k) {
18
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
19
- enumerable: true,
20
- get: function () { return configs[k]; }
21
- });
22
- });
23
-
24
- module.exports = exports.default;