@storm-software/eslint 0.170.155 → 0.170.157
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/astro-CKzo6xci.d.mts +5 -0
- package/dist/banner-YnHf4ewf.d.mts +5 -0
- package/dist/bun-OJPLvfnX.d.mts +5 -0
- package/dist/cspell-CfGd6g7m.d.mts +8 -0
- package/dist/disables-Dx5b56Fi.d.mts +5 -0
- package/dist/find-workspace-root-D3UHWbgn.mjs +211 -0
- package/dist/formatters-VU6Zu_ju.d.mts +5 -0
- package/dist/graphql-ClFinA5J.d.mts +5 -0
- package/dist/helpers-mce_MNwt.mjs +72 -0
- package/dist/ignores-CPeru9Fz.d.mts +5 -0
- package/dist/imports-CQToT7JW.d.mts +5 -0
- package/dist/index.d.mts +41 -0
- package/dist/index.mjs +42 -0
- package/dist/javascript-BR8uv0Wr.d.mts +5 -0
- package/dist/jsdoc-Dy8bHykP.d.mts +5 -0
- package/dist/jsonc-YqDXTIOi.d.mts +5 -0
- package/dist/jsx-DzqEJSYd.d.mts +5 -0
- package/dist/markdown-C5lFEI83.d.mts +5 -0
- package/dist/mdx-CDEhveb1.d.mts +5 -0
- package/dist/next-DGhspeMc.d.mts +8 -0
- package/dist/node-CQgsZ8nv.d.mts +5 -0
- package/dist/nx-CLRc6QRM.d.mts +8 -0
- package/dist/perfectionist-CgSgqAjV.d.mts +10 -0
- package/dist/plugins-CZWNS7l4.mjs +8291 -0
- package/dist/plugins.d.mts +616 -0
- package/dist/plugins.mjs +2 -0
- package/dist/pnpm-Cp9VzsCv.d.mts +5 -0
- package/dist/preset-x6MId9-7.mjs +265 -0
- package/dist/preset.d.mts +30 -0
- package/dist/preset.mjs +3 -0
- package/dist/prettier-CboafVRp.d.mts +8 -0
- package/dist/react-C5HWHYPh.d.mts +5 -0
- package/dist/react-native-DjQo3PXB.d.mts +8 -0
- package/dist/regexp-D2Fm6vg7.d.mts +5 -0
- package/dist/rolldown-runtime-CMFfr-1z.mjs +26 -0
- package/dist/secrets-DfvPNLCF.d.mts +10 -0
- package/dist/sort-9_xeGmal.d.mts +16 -0
- package/dist/storybook-DqDJ5exI.d.mts +5 -0
- package/dist/stylistic-9jDGqsHH.d.mts +9 -0
- package/dist/test-Dw-h86ig.d.mts +5 -0
- package/dist/toml-ConAZLXy.d.mts +5 -0
- package/dist/tsdoc-DcYWMVl0.d.mts +5 -0
- package/dist/{types.d.ts → typegen.d.mts} +8536 -11156
- package/dist/types-XIthLTox.d.mts +852 -0
- package/dist/types.d.mts +3 -0
- package/dist/types.mjs +2 -0
- package/dist/typescript-BFiiMXDt.d.mts +5 -0
- package/dist/unicorn-CQ3PTdfT.d.mts +5 -0
- package/dist/unocss-Uw-vEvNU.d.mts +5 -0
- package/dist/yaml-Ddbh49WY.d.mts +5 -0
- package/dist/zod-7F7dUsU5.d.mts +8 -0
- package/package.json +58 -79
- package/dist/chunk-2TYJ2VM7.js +0 -46
- package/dist/chunk-F7ZJ6N35.js +0 -43
- package/dist/chunk-I4ZWVHOG.js +0 -220
- package/dist/chunk-JBIA43L4.js +0 -75
- package/dist/chunk-T6GDWDAB.js +0 -167
- package/dist/chunk-XFFMMX6A.js +0 -96
- package/dist/chunk-XSM4AYON.js +0 -19822
- package/dist/chunk-Y5JY2DPL.js +0 -19
- package/dist/index.cjs +0 -21965
- package/dist/index.d.cts +0 -127
- package/dist/index.d.ts +0 -127
- package/dist/index.js +0 -15
- package/dist/preset.cjs +0 -21922
- package/dist/preset.d.cts +0 -34
- package/dist/preset.d.ts +0 -34
- package/dist/preset.js +0 -8
- package/dist/src-TAWYAYRW.js +0 -887
- package/dist/src-XRFRLUCW.js +0 -57
- package/dist/src-YPCQHGJY.js +0 -91
- package/dist/types.cjs +0 -2
- package/dist/types.d.cts +0 -19537
- package/dist/types.js +0 -4
- package/dist/utils/combine.cjs +0 -9
- package/dist/utils/combine.d.cts +0 -14
- package/dist/utils/combine.d.ts +0 -14
- package/dist/utils/combine.js +0 -10
- package/dist/utils/correct-paths.cjs +0 -232
- package/dist/utils/correct-paths.d.cts +0 -30
- package/dist/utils/correct-paths.d.ts +0 -30
- package/dist/utils/correct-paths.js +0 -2
- package/dist/utils/find-workspace-root.cjs +0 -201
- package/dist/utils/find-workspace-root.d.cts +0 -16
- package/dist/utils/find-workspace-root.d.ts +0 -16
- package/dist/utils/find-workspace-root.js +0 -3
- package/dist/utils/format-config.cjs +0 -20
- package/dist/utils/format-config.d.cts +0 -5
- package/dist/utils/format-config.d.ts +0 -5
- package/dist/utils/format-config.js +0 -21
- package/dist/utils/helpers.cjs +0 -87
- package/dist/utils/helpers.d.cts +0 -55
- package/dist/utils/helpers.d.ts +0 -55
- package/dist/utils/helpers.js +0 -2
- package/dist/utils/package-manager.cjs +0 -199
- package/dist/utils/package-manager.d.cts +0 -8
- package/dist/utils/package-manager.d.ts +0 -8
- package/dist/utils/package-manager.js +0 -4
- package/dist/utils/tsconfig.cjs +0 -297
- package/dist/utils/tsconfig.d.cts +0 -25
- package/dist/utils/tsconfig.d.ts +0 -25
- package/dist/utils/tsconfig.js +0 -4
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConfigNames, RuleOptions } from "./typegen.mjs";
|
|
2
|
+
import { A as OptionsUnicorn, C as OptionsRegExp, D as OptionsTypeScriptParserOptions, E as OptionsTSDoc, F as StylisticConfig, I as TypedFlatConfigItem, L as UserConfig, M as PresetConfig, N as PresetResult, O as OptionsTypeScriptWithTypes, P as Rules, S as OptionsReact, T as OptionsStylistic, _ as OptionsNxDependencyChecks, a as OptionsCSpell, b as OptionsPnpm, c as OptionsFiles, d as OptionsHasTypeScript, f as OptionsIsInEditor, g as OptionsNx, h as OptionsNext, i as OptionsBun, j as OptionsUnoCSS, k as OptionsTypescript, l as OptionsFormatters, m as OptionsJavascript, n as ESLintGlobalsPropValue, o as OptionsComponentExts, p as OptionsJSDoc, r as OptionsBanner, s as OptionsConfig, t as Awaitable, u as OptionsGraphQL, v as OptionsNxEnforceModuleBoundaries, w as OptionsStorybook, x as OptionsProjectType, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
3
|
+
export { Awaitable, ConfigNames, ESLintGlobalsPropValue, OptionsBanner, OptionsBun, OptionsCSpell, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsGraphQL, OptionsHasTypeScript, OptionsIsInEditor, OptionsJSDoc, OptionsJavascript, OptionsNext, OptionsNx, OptionsNxDependencyChecks, OptionsNxEnforceModuleBoundaries, OptionsOverrides, OptionsPnpm, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStorybook, OptionsStylistic, OptionsTSDoc, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, PresetConfig, PresetResult, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, UserConfig };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { D as OptionsTypeScriptParserOptions, I as TypedFlatConfigItem, O as OptionsTypeScriptWithTypes, c as OptionsFiles, o as OptionsComponentExts, x as OptionsProjectType, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
+
//#region src/configs/typescript.d.ts
|
|
3
|
+
declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & Omit<OptionsTypeScriptParserOptions, "tsconfigPath"> & OptionsProjectType): Promise<TypedFlatConfigItem[]>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { typescript as t };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { I as TypedFlatConfigItem, T as OptionsStylistic, c as OptionsFiles, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
+
//#region src/configs/yaml.d.ts
|
|
3
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { yaml as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { I as TypedFlatConfigItem, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
+
//#region src/configs/zod.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Config for Import-Zod ESLint plugin
|
|
5
|
+
*/
|
|
6
|
+
declare function zod(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { zod as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.170.
|
|
3
|
+
"version": "0.170.157",
|
|
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
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"./
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"./
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"./
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"./
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
+
"./find-workspace-root-D3UHWbgn": "./dist/find-workspace-root-D3UHWbgn.mjs",
|
|
93
|
+
"./helpers-mce_MNwt": "./dist/helpers-mce_MNwt.mjs",
|
|
94
|
+
"./plugins": "./dist/plugins.mjs",
|
|
95
|
+
"./plugins-CZWNS7l4": "./dist/plugins-CZWNS7l4.mjs",
|
|
96
|
+
"./preset": "./dist/preset.mjs",
|
|
97
|
+
"./preset-x6MId9-7": "./dist/preset-x6MId9-7.mjs",
|
|
98
|
+
"./rolldown-runtime-CMFfr-1z": "./dist/rolldown-runtime-CMFfr-1z.mjs",
|
|
99
|
+
"./types": "./dist/types.mjs",
|
|
100
|
+
"./*": "./*"
|
|
121
101
|
},
|
|
122
|
-
"main": "./dist/index.js",
|
|
123
102
|
"types": "./dist/index.d.ts",
|
|
124
103
|
"files": ["dist"],
|
|
125
104
|
"dependencies": {
|
|
@@ -129,9 +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.
|
|
133
|
-
"@storm-software/config-tools": "1.190.
|
|
134
|
-
"@storm-software/
|
|
111
|
+
"@storm-software/config": "1.138.60",
|
|
112
|
+
"@storm-software/config-tools": "1.190.123",
|
|
113
|
+
"@storm-software/eslint-plugin-banner": "0.0.88",
|
|
114
|
+
"@storm-software/eslint-plugin-tsdoc": "0.0.86",
|
|
115
|
+
"@storm-software/package-constants": "0.1.136",
|
|
135
116
|
"@stylistic/eslint-plugin": "^4.4.1",
|
|
136
117
|
"@typescript-eslint/eslint-plugin": "^8.66.0",
|
|
137
118
|
"@typescript-eslint/parser": "^8.66.0",
|
|
@@ -187,11 +168,9 @@
|
|
|
187
168
|
"@next/eslint-plugin-next": "^15.5.23",
|
|
188
169
|
"@nx/eslint": "23.1.1",
|
|
189
170
|
"@prettier/plugin-xml": "^3.4.2",
|
|
190
|
-
"@storm-software/eslint-plugin-
|
|
191
|
-
"@storm-software/eslint-plugin-
|
|
192
|
-
"@storm-software/
|
|
193
|
-
"@storm-software/eslint-plugin-tsdoc": "0.0.84",
|
|
194
|
-
"@storm-software/tsdoc": "0.13.274",
|
|
171
|
+
"@storm-software/eslint-plugin-bun": "0.0.11",
|
|
172
|
+
"@storm-software/eslint-plugin-pnpm": "0.0.86",
|
|
173
|
+
"@storm-software/tsdoc": "0.13.276",
|
|
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
|
-
"
|
|
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": "
|
|
271
|
+
"gitHead": "85add135d2cf4149fc4b0ccbd628d531c89a596c"
|
|
293
272
|
}
|
package/dist/chunk-2TYJ2VM7.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'url';
|
|
2
|
-
import 'path';
|
|
3
|
-
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
11
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
12
|
-
}) : x)(function(x) {
|
|
13
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
14
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
15
|
-
});
|
|
16
|
-
var __esm = (fn, res) => function __init() {
|
|
17
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
18
|
-
};
|
|
19
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
20
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
21
|
-
};
|
|
22
|
-
var __copyProps = (to, from, except, desc) => {
|
|
23
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
24
|
-
for (let key of __getOwnPropNames(from))
|
|
25
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
26
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
27
|
-
}
|
|
28
|
-
return to;
|
|
29
|
-
};
|
|
30
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
31
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
32
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
33
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
34
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
35
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
36
|
-
mod
|
|
37
|
-
));
|
|
38
|
-
var getFilename, __filename$1;
|
|
39
|
-
var init_esm_shims = __esm({
|
|
40
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=a9def7e06ce25c19654987ab91979289197bf4d3e7e124c514a4487c3e8d68c6__c60dfe8a33249c9fe1a3f42b452f3236/node_modules/tsup/assets/esm_shims.js"() {
|
|
41
|
-
getFilename = () => fileURLToPath(import.meta.url);
|
|
42
|
-
__filename$1 = /* @__PURE__ */ getFilename();
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export { __commonJS, __filename$1 as __filename, __require, __toESM, init_esm_shims };
|
package/dist/chunk-F7ZJ6N35.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { findWorkspaceRoot } from './chunk-XFFMMX6A.js';
|
|
2
|
-
import { relative, joinPaths } from './chunk-I4ZWVHOG.js';
|
|
3
|
-
import { init_esm_shims } from './chunk-2TYJ2VM7.js';
|
|
4
|
-
import { existsSync, statSync } from 'node:fs';
|
|
5
|
-
|
|
6
|
-
// src/utils/tsconfig.ts
|
|
7
|
-
init_esm_shims();
|
|
8
|
-
function getTsConfigPath(tsconfigPath, type) {
|
|
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 relative(workspaceRoot, joinPaths(workspaceRoot, 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" : type ? `tsconfig.${type}.json` : "tsconfig.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/chunk-I4ZWVHOG.js
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { init_esm_shims } from './chunk-2TYJ2VM7.js';
|
|
2
|
-
|
|
3
|
-
// src/utils/correct-paths.ts
|
|
4
|
-
init_esm_shims();
|
|
5
|
-
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
6
|
-
function normalizeWindowsPath(input = "") {
|
|
7
|
-
if (!input) {
|
|
8
|
-
return input;
|
|
9
|
-
}
|
|
10
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
11
|
-
}
|
|
12
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
13
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
14
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
15
|
-
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
16
|
-
var _EXTNAME_RE = /.(\.[^./]+|\.)$/;
|
|
17
|
-
var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
|
|
18
|
-
var sep = "/";
|
|
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
|
-
var joinPaths = function(...segments) {
|
|
49
|
-
let path = "";
|
|
50
|
-
for (const seg of segments) {
|
|
51
|
-
if (!seg) {
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
if (path.length > 0) {
|
|
55
|
-
const pathTrailing = path[path.length - 1] === "/";
|
|
56
|
-
const segLeading = seg[0] === "/";
|
|
57
|
-
const both = pathTrailing && segLeading;
|
|
58
|
-
if (both) {
|
|
59
|
-
path += seg.slice(1);
|
|
60
|
-
} else {
|
|
61
|
-
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
62
|
-
}
|
|
63
|
-
} else {
|
|
64
|
-
path += seg;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return correctPaths(path);
|
|
68
|
-
};
|
|
69
|
-
function cwd() {
|
|
70
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
71
|
-
return process.cwd().replace(/\\/g, "/");
|
|
72
|
-
}
|
|
73
|
-
return "/";
|
|
74
|
-
}
|
|
75
|
-
var resolve = function(...arguments_) {
|
|
76
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
77
|
-
let resolvedPath = "";
|
|
78
|
-
let resolvedAbsolute = false;
|
|
79
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
80
|
-
const path = index >= 0 ? arguments_[index] : cwd();
|
|
81
|
-
if (!path || path.length === 0) {
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
85
|
-
resolvedAbsolute = isAbsolute(path);
|
|
86
|
-
}
|
|
87
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
88
|
-
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
|
89
|
-
return `/${resolvedPath}`;
|
|
90
|
-
}
|
|
91
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
92
|
-
};
|
|
93
|
-
function normalizeString(path, allowAboveRoot) {
|
|
94
|
-
let res = "";
|
|
95
|
-
let lastSegmentLength = 0;
|
|
96
|
-
let lastSlash = -1;
|
|
97
|
-
let dots = 0;
|
|
98
|
-
let char = null;
|
|
99
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
100
|
-
if (index < path.length) {
|
|
101
|
-
char = path[index];
|
|
102
|
-
} else if (char === "/") {
|
|
103
|
-
break;
|
|
104
|
-
} else {
|
|
105
|
-
char = "/";
|
|
106
|
-
}
|
|
107
|
-
if (char === "/") {
|
|
108
|
-
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
109
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
110
|
-
if (res.length > 2) {
|
|
111
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
112
|
-
if (lastSlashIndex === -1) {
|
|
113
|
-
res = "";
|
|
114
|
-
lastSegmentLength = 0;
|
|
115
|
-
} else {
|
|
116
|
-
res = res.slice(0, lastSlashIndex);
|
|
117
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
118
|
-
}
|
|
119
|
-
lastSlash = index;
|
|
120
|
-
dots = 0;
|
|
121
|
-
continue;
|
|
122
|
-
} else if (res.length > 0) {
|
|
123
|
-
res = "";
|
|
124
|
-
lastSegmentLength = 0;
|
|
125
|
-
lastSlash = index;
|
|
126
|
-
dots = 0;
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (allowAboveRoot) {
|
|
131
|
-
res += res.length > 0 ? "/.." : "..";
|
|
132
|
-
lastSegmentLength = 2;
|
|
133
|
-
}
|
|
134
|
-
} else {
|
|
135
|
-
if (res.length > 0) {
|
|
136
|
-
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
137
|
-
} else {
|
|
138
|
-
res = path.slice(lastSlash + 1, index);
|
|
139
|
-
}
|
|
140
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
141
|
-
}
|
|
142
|
-
lastSlash = index;
|
|
143
|
-
dots = 0;
|
|
144
|
-
} else if (char === "." && dots !== -1) {
|
|
145
|
-
++dots;
|
|
146
|
-
} else {
|
|
147
|
-
dots = -1;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return res;
|
|
151
|
-
}
|
|
152
|
-
var isAbsolute = function(p) {
|
|
153
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
154
|
-
};
|
|
155
|
-
var toNamespacedPath = function(p) {
|
|
156
|
-
return normalizeWindowsPath(p);
|
|
157
|
-
};
|
|
158
|
-
var extname = function(p) {
|
|
159
|
-
if (p === "..") return "";
|
|
160
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
161
|
-
return match && match[1] || "";
|
|
162
|
-
};
|
|
163
|
-
var relative = function(from, to) {
|
|
164
|
-
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
165
|
-
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
166
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
167
|
-
return _to.join("/");
|
|
168
|
-
}
|
|
169
|
-
const _fromCopy = [..._from];
|
|
170
|
-
for (const segment of _fromCopy) {
|
|
171
|
-
if (_to[0] !== segment) {
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
_from.shift();
|
|
175
|
-
_to.shift();
|
|
176
|
-
}
|
|
177
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
178
|
-
};
|
|
179
|
-
var dirname = function(p) {
|
|
180
|
-
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
181
|
-
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
|
182
|
-
segments[0] += "/";
|
|
183
|
-
}
|
|
184
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
185
|
-
};
|
|
186
|
-
var format = function(p) {
|
|
187
|
-
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
188
|
-
const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
|
|
189
|
-
Boolean
|
|
190
|
-
);
|
|
191
|
-
return normalizeWindowsPath(
|
|
192
|
-
p.root ? resolve(...segments) : segments.join("/")
|
|
193
|
-
);
|
|
194
|
-
};
|
|
195
|
-
var basename = function(p, extension) {
|
|
196
|
-
const segments = normalizeWindowsPath(p).split("/");
|
|
197
|
-
let lastSegment = "";
|
|
198
|
-
for (let i = segments.length - 1; i >= 0; i--) {
|
|
199
|
-
const val = segments[i];
|
|
200
|
-
if (val) {
|
|
201
|
-
lastSegment = val;
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
206
|
-
};
|
|
207
|
-
var parse = function(p) {
|
|
208
|
-
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
209
|
-
const base = basename(p);
|
|
210
|
-
const extension = extname(base);
|
|
211
|
-
return {
|
|
212
|
-
root,
|
|
213
|
-
dir: dirname(p),
|
|
214
|
-
base,
|
|
215
|
-
ext: extension,
|
|
216
|
-
name: base.slice(0, base.length - extension.length)
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath };
|
package/dist/chunk-JBIA43L4.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { init_esm_shims } from './chunk-2TYJ2VM7.js';
|
|
2
|
-
import { isPackageExists } from 'local-pkg';
|
|
3
|
-
import process from 'node:process';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
// src/utils/helpers.ts
|
|
7
|
-
init_esm_shims();
|
|
8
|
-
var scopeUrl = fileURLToPath(new URL(".", import.meta.url));
|
|
9
|
-
var isCwdInScope = isPackageExists("@storm-software/eslint");
|
|
10
|
-
var parserPlain = {
|
|
11
|
-
meta: {
|
|
12
|
-
name: "parser-plain"
|
|
13
|
-
},
|
|
14
|
-
parseForESLint: (code) => ({
|
|
15
|
-
ast: {
|
|
16
|
-
body: [],
|
|
17
|
-
comments: [],
|
|
18
|
-
loc: { end: code.length, start: 0 },
|
|
19
|
-
range: [0, code.length],
|
|
20
|
-
tokens: [],
|
|
21
|
-
type: "Program"
|
|
22
|
-
},
|
|
23
|
-
scopeManager: null,
|
|
24
|
-
services: { isPlain: true },
|
|
25
|
-
visitorKeys: {
|
|
26
|
-
Program: []
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
};
|
|
30
|
-
function isInGitHooksOrLintStaged() {
|
|
31
|
-
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");
|
|
32
|
-
}
|
|
33
|
-
function isInEditorEnv() {
|
|
34
|
-
if (process.env.CI) return false;
|
|
35
|
-
if (isInGitHooksOrLintStaged()) return false;
|
|
36
|
-
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
|
|
37
|
-
}
|
|
38
|
-
async function interopDefault(m) {
|
|
39
|
-
const resolved = await m;
|
|
40
|
-
return resolved.default || resolved;
|
|
41
|
-
}
|
|
42
|
-
function isPackageInScope(name) {
|
|
43
|
-
return isPackageExists(name, { paths: [scopeUrl] });
|
|
44
|
-
}
|
|
45
|
-
async function ensurePackages(packages) {
|
|
46
|
-
if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false)
|
|
47
|
-
return;
|
|
48
|
-
const nonExistingPackages = packages.filter(
|
|
49
|
-
(i) => i && !isPackageInScope(i)
|
|
50
|
-
);
|
|
51
|
-
if (nonExistingPackages.length === 0) return;
|
|
52
|
-
const p = await import('@clack/prompts');
|
|
53
|
-
const result = await p.confirm({
|
|
54
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(
|
|
55
|
-
", "
|
|
56
|
-
)}. Do you want to install them?`
|
|
57
|
-
});
|
|
58
|
-
if (result)
|
|
59
|
-
await import('@antfu/install-pkg').then(
|
|
60
|
-
(i) => i.installPackage(nonExistingPackages, { dev: true })
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
function renameRules(rules, map) {
|
|
64
|
-
return Object.fromEntries(
|
|
65
|
-
Object.entries(rules).map(([key, value]) => {
|
|
66
|
-
for (const [from, to] of Object.entries(map)) {
|
|
67
|
-
if (key.startsWith(`${from}/`))
|
|
68
|
-
return [to + key.slice(from.length), value];
|
|
69
|
-
}
|
|
70
|
-
return [key, value];
|
|
71
|
-
})
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules };
|