@storm-software/eslint 0.169.93 → 0.169.95
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-4CXNUMUG.js +2 -39
- package/dist/chunk-A32JZBPO.js +2 -6
- package/dist/chunk-DJ2ZXQYV.js +4 -10
- package/dist/chunk-FXLMJ2Y5.js +3 -9
- package/dist/{chunk-DPTIR64R.js → chunk-IWQLEJ77.js} +11 -19
- package/dist/chunk-O5CGESKJ.js +20 -29
- package/dist/chunk-PWQ34SJ2.js +4 -10
- package/dist/chunk-T4LUMNGJ.js +3 -21
- package/dist/chunk-UVJN4TQE.js +5 -12
- package/dist/preset.cjs +9387 -0
- package/dist/preset.d.cts +34 -0
- package/dist/preset.js +128 -329
- package/dist/types.cjs +2 -0
- package/dist/types.d.cts +18781 -0
- package/dist/types.js +1 -3
- package/dist/utils/banner-plugin.cjs +454 -0
- package/dist/utils/banner-plugin.d.cts +6 -0
- package/dist/utils/banner-plugin.js +4 -9
- package/dist/utils/combine.cjs +9 -0
- package/dist/utils/combine.d.cts +14 -0
- package/dist/utils/combine.js +3 -6
- package/dist/utils/constants.cjs +206 -0
- package/dist/utils/constants.d.cts +36 -0
- package/dist/utils/constants.js +2 -73
- package/dist/utils/correct-paths.cjs +232 -0
- package/dist/utils/correct-paths.d.cts +30 -0
- package/dist/utils/correct-paths.js +2 -33
- package/dist/utils/find-workspace-root.cjs +201 -0
- package/dist/utils/find-workspace-root.d.cts +16 -0
- package/dist/utils/find-workspace-root.js +3 -10
- package/dist/utils/format-config.cjs +20 -0
- package/dist/utils/format-config.d.cts +5 -0
- package/dist/utils/format-config.js +2 -7
- package/dist/utils/get-file-banner.cjs +103 -0
- package/dist/utils/get-file-banner.d.cts +12 -0
- package/dist/utils/get-file-banner.js +3 -8
- package/dist/utils/helpers.cjs +87 -0
- package/dist/utils/helpers.d.cts +55 -0
- package/dist/utils/helpers.js +2 -19
- package/dist/utils/index.cjs +224 -0
- package/dist/utils/index.d.cts +3 -0
- package/dist/utils/index.js +3 -79
- package/dist/utils/tsconfig-path.cjs +152 -0
- package/dist/utils/tsconfig-path.d.cts +3 -0
- package/dist/utils/tsconfig-path.js +3 -8
- package/package.json +46 -48
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/utils/constants.ts
|
|
4
|
+
var GLOB_CODE_BLOCK = "**/*.md{,x}/*";
|
|
5
|
+
var GLOB_CODE_FILE = "**/*.{,c,m}{j,t}s{,x}";
|
|
6
|
+
var ACRONYMS_LIST = [
|
|
7
|
+
"API",
|
|
8
|
+
"ASCII",
|
|
9
|
+
"CPU",
|
|
10
|
+
"CSS",
|
|
11
|
+
"DNS",
|
|
12
|
+
"EOF",
|
|
13
|
+
"GUID",
|
|
14
|
+
"HTML",
|
|
15
|
+
"HTTP",
|
|
16
|
+
"HTTPS",
|
|
17
|
+
"ID",
|
|
18
|
+
"IP",
|
|
19
|
+
"JSON",
|
|
20
|
+
"LHS",
|
|
21
|
+
"OEM",
|
|
22
|
+
"PP",
|
|
23
|
+
"QA",
|
|
24
|
+
"RAM",
|
|
25
|
+
"RHS",
|
|
26
|
+
"RPC",
|
|
27
|
+
"RSS",
|
|
28
|
+
"SLA",
|
|
29
|
+
"SMTP",
|
|
30
|
+
"SQL",
|
|
31
|
+
"SSH",
|
|
32
|
+
"SSL",
|
|
33
|
+
"TCP",
|
|
34
|
+
"TLS",
|
|
35
|
+
"TTL",
|
|
36
|
+
"UDP",
|
|
37
|
+
"UI",
|
|
38
|
+
"UID",
|
|
39
|
+
"UUID",
|
|
40
|
+
"URI",
|
|
41
|
+
"URL",
|
|
42
|
+
"UTF",
|
|
43
|
+
"VM",
|
|
44
|
+
"XML",
|
|
45
|
+
"XSS"
|
|
46
|
+
];
|
|
47
|
+
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
48
|
+
var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
49
|
+
var GLOB_JS = "**/*.?([cm])js";
|
|
50
|
+
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
51
|
+
var GLOB_TS = "**/*.?([cm])ts";
|
|
52
|
+
var GLOB_TSX = "**/*.?([cm])tsx";
|
|
53
|
+
var GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
54
|
+
var GLOB_CSS = "**/*.css";
|
|
55
|
+
var GLOB_POSTCSS = "**/*.{p,post}css";
|
|
56
|
+
var GLOB_LESS = "**/*.less";
|
|
57
|
+
var GLOB_SCSS = "**/*.scss";
|
|
58
|
+
var GLOB_JSON = "**/*.json";
|
|
59
|
+
var GLOB_JSON5 = "**/*.json5";
|
|
60
|
+
var GLOB_JSONC = "**/*.jsonc";
|
|
61
|
+
var GLOB_MARKDOWN = "**/*.md";
|
|
62
|
+
var GLOB_MDX = "**/*.mdx";
|
|
63
|
+
var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
64
|
+
var GLOB_SVELTE = "**/*.svelte";
|
|
65
|
+
var GLOB_VUE = "**/*.vue";
|
|
66
|
+
var GLOB_YAML = "**/*.y?(a)ml";
|
|
67
|
+
var GLOB_TOML = "**/*.toml";
|
|
68
|
+
var GLOB_XML = "**/*.xml";
|
|
69
|
+
var GLOB_SVG = "**/*.svg";
|
|
70
|
+
var GLOB_HTML = "**/*.htm?(l)";
|
|
71
|
+
var GLOB_ASTRO = "**/*.astro";
|
|
72
|
+
var GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
73
|
+
var GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
74
|
+
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
75
|
+
var GLOB_TESTS = [
|
|
76
|
+
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
77
|
+
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
78
|
+
`**/*.test.${GLOB_SRC_EXT}`,
|
|
79
|
+
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
80
|
+
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
81
|
+
];
|
|
82
|
+
var GLOB_ALL_SRC = [
|
|
83
|
+
GLOB_SRC,
|
|
84
|
+
GLOB_STYLE,
|
|
85
|
+
GLOB_JSON,
|
|
86
|
+
GLOB_JSON5,
|
|
87
|
+
GLOB_MARKDOWN,
|
|
88
|
+
GLOB_MDX,
|
|
89
|
+
GLOB_SVELTE,
|
|
90
|
+
GLOB_VUE,
|
|
91
|
+
GLOB_YAML,
|
|
92
|
+
GLOB_XML,
|
|
93
|
+
GLOB_HTML
|
|
94
|
+
];
|
|
95
|
+
var GLOB_EXCLUDE = [
|
|
96
|
+
"**/.git/**",
|
|
97
|
+
"**/node_modules/**",
|
|
98
|
+
"**/src/generators/**/files/**/*",
|
|
99
|
+
"**/dist/**",
|
|
100
|
+
"**/tmp/**",
|
|
101
|
+
"**/coverage/**",
|
|
102
|
+
"**/bench/**",
|
|
103
|
+
"**/__test__/**",
|
|
104
|
+
"**/__mocks__/**",
|
|
105
|
+
"**/__generated__/**",
|
|
106
|
+
"**/.wrangler/**",
|
|
107
|
+
"**/.docusaurus/**",
|
|
108
|
+
"**/.tamagui/**",
|
|
109
|
+
"**/tamagui.css",
|
|
110
|
+
"**/.nx/**",
|
|
111
|
+
"**/.next/**",
|
|
112
|
+
"**/.storm/**",
|
|
113
|
+
"**/workbox*.js",
|
|
114
|
+
"**/sw*.js",
|
|
115
|
+
"**/service-worker.js",
|
|
116
|
+
"**/fallback*.js",
|
|
117
|
+
"**/ios/**",
|
|
118
|
+
"**/.android/**",
|
|
119
|
+
"**/.DS_Store/**",
|
|
120
|
+
"**/Thumbs.db/**",
|
|
121
|
+
"**/.cspellcache",
|
|
122
|
+
"**/package-lock.*",
|
|
123
|
+
"**/npm-lock.*",
|
|
124
|
+
"**/pnpm-lock.*",
|
|
125
|
+
"**/bun.lockb",
|
|
126
|
+
"**/cargo.lock",
|
|
127
|
+
"**/next-env.d.ts",
|
|
128
|
+
"**/CODEOWNERS",
|
|
129
|
+
"**/yarn.lock",
|
|
130
|
+
"**/jest.config.js",
|
|
131
|
+
"**/jest.setup.js",
|
|
132
|
+
"**/jest.config.ts",
|
|
133
|
+
"**/jest.setup.ts",
|
|
134
|
+
"**/jest.config.json",
|
|
135
|
+
"**/jest.setup.json",
|
|
136
|
+
"**/output",
|
|
137
|
+
"**/temp",
|
|
138
|
+
"**/.temp",
|
|
139
|
+
"**/.history",
|
|
140
|
+
"**/.vitepress/cache",
|
|
141
|
+
"**/.nuxt",
|
|
142
|
+
"**/.svelte-kit",
|
|
143
|
+
"**/.vercel",
|
|
144
|
+
"**/.changeset",
|
|
145
|
+
"**/.idea",
|
|
146
|
+
"**/.cache",
|
|
147
|
+
"**/.vite-inspect",
|
|
148
|
+
"**/.yarn",
|
|
149
|
+
"**/*.min.*",
|
|
150
|
+
"**/CHANGELOG*.md",
|
|
151
|
+
"**/CONTRIBUTING.md",
|
|
152
|
+
"**/SECURITY.md",
|
|
153
|
+
"**/CODE_OF_CONDUCT.md",
|
|
154
|
+
"**/PULL_REQUEST_TEMPLATE.md",
|
|
155
|
+
"**/LICENSE*",
|
|
156
|
+
"**/__snapshots__",
|
|
157
|
+
"**/auto-import?(s).d.ts",
|
|
158
|
+
"**/components.d.ts",
|
|
159
|
+
"**/vite.config.*.timestamp-*",
|
|
160
|
+
"**/webpack.config.*.timestamp-*",
|
|
161
|
+
"**/rollup.config.*.timestamp-*",
|
|
162
|
+
"**/src/executors/*/*.schema.*",
|
|
163
|
+
"**/src/executors/*/schema.d.ts",
|
|
164
|
+
"**/src/executors/*/schema.json",
|
|
165
|
+
"**/src/executors/*/schema.md",
|
|
166
|
+
"**/src/generators/*/files/**",
|
|
167
|
+
"**/src/generators/*/*.schema.*",
|
|
168
|
+
"**/src/generators/*/schema.d.ts",
|
|
169
|
+
"**/src/generators/*/schema.json",
|
|
170
|
+
"**/src/generators/*/schema.md"
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
// src/utils/format-config.ts
|
|
174
|
+
var formatConfig = (name, config = []) => {
|
|
175
|
+
return config.map((config2, index) => {
|
|
176
|
+
if (!config2 || config2.name) {
|
|
177
|
+
return config2 ?? {};
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
...config2,
|
|
181
|
+
name: `Storm Software (${config2.name ? config2.name : name}) #${index + 1}`,
|
|
182
|
+
settings: {
|
|
183
|
+
"import/resolver": "node",
|
|
184
|
+
...config2.settings ?? {}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
exports.ACRONYMS_LIST = ACRONYMS_LIST;
|
|
191
|
+
exports.GLOB_ALL_SRC = GLOB_ALL_SRC;
|
|
192
|
+
exports.GLOB_ASTRO = GLOB_ASTRO;
|
|
193
|
+
exports.GLOB_ASTRO_TS = GLOB_ASTRO_TS;
|
|
194
|
+
exports.GLOB_CODE_BLOCK = GLOB_CODE_BLOCK;
|
|
195
|
+
exports.GLOB_CODE_FILE = GLOB_CODE_FILE;
|
|
196
|
+
exports.GLOB_CSS = GLOB_CSS;
|
|
197
|
+
exports.GLOB_EXCLUDE = GLOB_EXCLUDE;
|
|
198
|
+
exports.GLOB_GRAPHQL = GLOB_GRAPHQL;
|
|
199
|
+
exports.GLOB_HTML = GLOB_HTML;
|
|
200
|
+
exports.GLOB_JS = GLOB_JS;
|
|
201
|
+
exports.GLOB_JSON = GLOB_JSON;
|
|
202
|
+
exports.GLOB_JSON5 = GLOB_JSON5;
|
|
203
|
+
exports.GLOB_JSONC = GLOB_JSONC;
|
|
204
|
+
exports.GLOB_JSX = GLOB_JSX;
|
|
205
|
+
exports.GLOB_LESS = GLOB_LESS;
|
|
206
|
+
exports.GLOB_MARKDOWN = GLOB_MARKDOWN;
|
|
207
|
+
exports.GLOB_MARKDOWN_CODE = GLOB_MARKDOWN_CODE;
|
|
208
|
+
exports.GLOB_MARKDOWN_IN_MARKDOWN = GLOB_MARKDOWN_IN_MARKDOWN;
|
|
209
|
+
exports.GLOB_MDX = GLOB_MDX;
|
|
210
|
+
exports.GLOB_POSTCSS = GLOB_POSTCSS;
|
|
211
|
+
exports.GLOB_SCSS = GLOB_SCSS;
|
|
212
|
+
exports.GLOB_SRC = GLOB_SRC;
|
|
213
|
+
exports.GLOB_SRC_EXT = GLOB_SRC_EXT;
|
|
214
|
+
exports.GLOB_STYLE = GLOB_STYLE;
|
|
215
|
+
exports.GLOB_SVELTE = GLOB_SVELTE;
|
|
216
|
+
exports.GLOB_SVG = GLOB_SVG;
|
|
217
|
+
exports.GLOB_TESTS = GLOB_TESTS;
|
|
218
|
+
exports.GLOB_TOML = GLOB_TOML;
|
|
219
|
+
exports.GLOB_TS = GLOB_TS;
|
|
220
|
+
exports.GLOB_TSX = GLOB_TSX;
|
|
221
|
+
exports.GLOB_VUE = GLOB_VUE;
|
|
222
|
+
exports.GLOB_XML = GLOB_XML;
|
|
223
|
+
exports.GLOB_YAML = GLOB_YAML;
|
|
224
|
+
exports.formatConfig = formatConfig;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from './constants.cjs';
|
|
2
|
+
export { formatConfig } from './format-config.cjs';
|
|
3
|
+
import 'eslint';
|
package/dist/utils/index.js
CHANGED
|
@@ -1,82 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
GLOB_ASTRO,
|
|
5
|
-
GLOB_ASTRO_TS,
|
|
6
|
-
GLOB_CODE_BLOCK,
|
|
7
|
-
GLOB_CODE_FILE,
|
|
8
|
-
GLOB_CSS,
|
|
9
|
-
GLOB_EXCLUDE,
|
|
10
|
-
GLOB_GRAPHQL,
|
|
11
|
-
GLOB_HTML,
|
|
12
|
-
GLOB_JS,
|
|
13
|
-
GLOB_JSON,
|
|
14
|
-
GLOB_JSON5,
|
|
15
|
-
GLOB_JSONC,
|
|
16
|
-
GLOB_JSX,
|
|
17
|
-
GLOB_LESS,
|
|
18
|
-
GLOB_MARKDOWN,
|
|
19
|
-
GLOB_MARKDOWN_CODE,
|
|
20
|
-
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
21
|
-
GLOB_MDX,
|
|
22
|
-
GLOB_POSTCSS,
|
|
23
|
-
GLOB_SCSS,
|
|
24
|
-
GLOB_SRC,
|
|
25
|
-
GLOB_SRC_EXT,
|
|
26
|
-
GLOB_STYLE,
|
|
27
|
-
GLOB_SVELTE,
|
|
28
|
-
GLOB_SVG,
|
|
29
|
-
GLOB_TESTS,
|
|
30
|
-
GLOB_TOML,
|
|
31
|
-
GLOB_TS,
|
|
32
|
-
GLOB_TSX,
|
|
33
|
-
GLOB_VUE,
|
|
34
|
-
GLOB_XML,
|
|
35
|
-
GLOB_YAML
|
|
36
|
-
} from "../chunk-4CXNUMUG.js";
|
|
37
|
-
import {
|
|
38
|
-
formatConfig
|
|
39
|
-
} from "../chunk-A32JZBPO.js";
|
|
40
|
-
import {
|
|
41
|
-
init_esm_shims
|
|
42
|
-
} from "../chunk-PWQ34SJ2.js";
|
|
1
|
+
export { ACRONYMS_LIST, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CODE_BLOCK, GLOB_CODE_FILE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MDX, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML } from '../chunk-4CXNUMUG.js';
|
|
2
|
+
export { formatConfig } from '../chunk-A32JZBPO.js';
|
|
3
|
+
import { init_esm_shims } from '../chunk-PWQ34SJ2.js';
|
|
43
4
|
|
|
44
5
|
// src/utils/index.ts
|
|
45
6
|
init_esm_shims();
|
|
46
|
-
export {
|
|
47
|
-
ACRONYMS_LIST,
|
|
48
|
-
GLOB_ALL_SRC,
|
|
49
|
-
GLOB_ASTRO,
|
|
50
|
-
GLOB_ASTRO_TS,
|
|
51
|
-
GLOB_CODE_BLOCK,
|
|
52
|
-
GLOB_CODE_FILE,
|
|
53
|
-
GLOB_CSS,
|
|
54
|
-
GLOB_EXCLUDE,
|
|
55
|
-
GLOB_GRAPHQL,
|
|
56
|
-
GLOB_HTML,
|
|
57
|
-
GLOB_JS,
|
|
58
|
-
GLOB_JSON,
|
|
59
|
-
GLOB_JSON5,
|
|
60
|
-
GLOB_JSONC,
|
|
61
|
-
GLOB_JSX,
|
|
62
|
-
GLOB_LESS,
|
|
63
|
-
GLOB_MARKDOWN,
|
|
64
|
-
GLOB_MARKDOWN_CODE,
|
|
65
|
-
GLOB_MARKDOWN_IN_MARKDOWN,
|
|
66
|
-
GLOB_MDX,
|
|
67
|
-
GLOB_POSTCSS,
|
|
68
|
-
GLOB_SCSS,
|
|
69
|
-
GLOB_SRC,
|
|
70
|
-
GLOB_SRC_EXT,
|
|
71
|
-
GLOB_STYLE,
|
|
72
|
-
GLOB_SVELTE,
|
|
73
|
-
GLOB_SVG,
|
|
74
|
-
GLOB_TESTS,
|
|
75
|
-
GLOB_TOML,
|
|
76
|
-
GLOB_TS,
|
|
77
|
-
GLOB_TSX,
|
|
78
|
-
GLOB_VUE,
|
|
79
|
-
GLOB_XML,
|
|
80
|
-
GLOB_YAML,
|
|
81
|
-
formatConfig
|
|
82
|
-
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fs = require('fs');
|
|
4
|
+
|
|
5
|
+
// src/utils/tsconfig-path.ts
|
|
6
|
+
|
|
7
|
+
// src/utils/correct-paths.ts
|
|
8
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
9
|
+
function normalizeWindowsPath(input = "") {
|
|
10
|
+
if (!input) {
|
|
11
|
+
return input;
|
|
12
|
+
}
|
|
13
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
14
|
+
}
|
|
15
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
16
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
17
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
18
|
+
var correctPaths = function(path) {
|
|
19
|
+
if (!path || path.length === 0) {
|
|
20
|
+
return ".";
|
|
21
|
+
}
|
|
22
|
+
path = normalizeWindowsPath(path);
|
|
23
|
+
const isUNCPath = path.match(_UNC_REGEX);
|
|
24
|
+
const isPathAbsolute = isAbsolute(path);
|
|
25
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
26
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
27
|
+
if (path.length === 0) {
|
|
28
|
+
if (isPathAbsolute) {
|
|
29
|
+
return "/";
|
|
30
|
+
}
|
|
31
|
+
return trailingSeparator ? "./" : ".";
|
|
32
|
+
}
|
|
33
|
+
if (trailingSeparator) {
|
|
34
|
+
path += "/";
|
|
35
|
+
}
|
|
36
|
+
if (_DRIVE_LETTER_RE.test(path)) {
|
|
37
|
+
path += "/";
|
|
38
|
+
}
|
|
39
|
+
if (isUNCPath) {
|
|
40
|
+
if (!isPathAbsolute) {
|
|
41
|
+
return `//./${path}`;
|
|
42
|
+
}
|
|
43
|
+
return `//${path}`;
|
|
44
|
+
}
|
|
45
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
46
|
+
};
|
|
47
|
+
var joinPaths = function(...segments) {
|
|
48
|
+
let path = "";
|
|
49
|
+
for (const seg of segments) {
|
|
50
|
+
if (!seg) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (path.length > 0) {
|
|
54
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
55
|
+
const segLeading = seg[0] === "/";
|
|
56
|
+
const both = pathTrailing && segLeading;
|
|
57
|
+
if (both) {
|
|
58
|
+
path += seg.slice(1);
|
|
59
|
+
} else {
|
|
60
|
+
path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
path += seg;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return correctPaths(path);
|
|
67
|
+
};
|
|
68
|
+
function normalizeString(path, allowAboveRoot) {
|
|
69
|
+
let res = "";
|
|
70
|
+
let lastSegmentLength = 0;
|
|
71
|
+
let lastSlash = -1;
|
|
72
|
+
let dots = 0;
|
|
73
|
+
let char = null;
|
|
74
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
75
|
+
if (index < path.length) {
|
|
76
|
+
char = path[index];
|
|
77
|
+
} else if (char === "/") {
|
|
78
|
+
break;
|
|
79
|
+
} else {
|
|
80
|
+
char = "/";
|
|
81
|
+
}
|
|
82
|
+
if (char === "/") {
|
|
83
|
+
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
84
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
85
|
+
if (res.length > 2) {
|
|
86
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
87
|
+
if (lastSlashIndex === -1) {
|
|
88
|
+
res = "";
|
|
89
|
+
lastSegmentLength = 0;
|
|
90
|
+
} else {
|
|
91
|
+
res = res.slice(0, lastSlashIndex);
|
|
92
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
93
|
+
}
|
|
94
|
+
lastSlash = index;
|
|
95
|
+
dots = 0;
|
|
96
|
+
continue;
|
|
97
|
+
} else if (res.length > 0) {
|
|
98
|
+
res = "";
|
|
99
|
+
lastSegmentLength = 0;
|
|
100
|
+
lastSlash = index;
|
|
101
|
+
dots = 0;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (allowAboveRoot) {
|
|
106
|
+
res += res.length > 0 ? "/.." : "..";
|
|
107
|
+
lastSegmentLength = 2;
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
if (res.length > 0) {
|
|
111
|
+
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
112
|
+
} else {
|
|
113
|
+
res = path.slice(lastSlash + 1, index);
|
|
114
|
+
}
|
|
115
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
116
|
+
}
|
|
117
|
+
lastSlash = index;
|
|
118
|
+
dots = 0;
|
|
119
|
+
} else if (char === "." && dots !== -1) {
|
|
120
|
+
++dots;
|
|
121
|
+
} else {
|
|
122
|
+
dots = -1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return res;
|
|
126
|
+
}
|
|
127
|
+
var isAbsolute = function(p) {
|
|
128
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// src/utils/tsconfig-path.ts
|
|
132
|
+
function getTsConfigPath(tsconfigPath = "./", workspaceRoot = "./") {
|
|
133
|
+
let result = "tsconfig.json";
|
|
134
|
+
if (tsconfigPath && fs.existsSync(tsconfigPath) && fs.statSync(tsconfigPath).isFile()) {
|
|
135
|
+
result = tsconfigPath;
|
|
136
|
+
} else if (tsconfigPath === workspaceRoot && fs.existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
137
|
+
result = "tsconfig.base.json";
|
|
138
|
+
} else if (fs.existsSync(joinPaths(tsconfigPath, "tsconfig.app.json"))) {
|
|
139
|
+
result = "tsconfig.app.json";
|
|
140
|
+
} else if (fs.existsSync(joinPaths(tsconfigPath, "tsconfig.lib.json"))) {
|
|
141
|
+
result = "tsconfig.lib.json";
|
|
142
|
+
} else if (fs.existsSync(joinPaths(workspaceRoot, "tsconfig.base.json"))) {
|
|
143
|
+
result = "tsconfig.base.json";
|
|
144
|
+
} else {
|
|
145
|
+
console.warn(
|
|
146
|
+
`No tsconfig.json found${tsconfigPath !== "./" ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
exports.getTsConfigPath = getTsConfigPath;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "../chunk-T4LUMNGJ.js";
|
|
5
|
-
import "../chunk-PWQ34SJ2.js";
|
|
6
|
-
export {
|
|
7
|
-
getTsConfigPath
|
|
8
|
-
};
|
|
1
|
+
export { getTsConfigPath } from '../chunk-DJ2ZXQYV.js';
|
|
2
|
+
import '../chunk-T4LUMNGJ.js';
|
|
3
|
+
import '../chunk-PWQ34SJ2.js';
|
package/package.json
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.169.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.169.95",
|
|
4
|
+
"private": false,
|
|
5
5
|
"description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"eslint",
|
|
8
|
+
"eslint-config",
|
|
9
|
+
"eslintconfig",
|
|
10
|
+
"monorepo",
|
|
11
|
+
"storm",
|
|
12
|
+
"storm-ops",
|
|
13
|
+
"sullivanpj"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://stormsoftware.com",
|
|
16
|
+
"bugs": "https://github.com/storm-software/storm-ops/issues",
|
|
6
17
|
"repository": {
|
|
7
18
|
"type": "github",
|
|
8
19
|
"url": "https://github.com/storm-software/storm-ops",
|
|
9
20
|
"directory": "packages/eslint"
|
|
10
21
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
22
|
+
"funding": {
|
|
23
|
+
"type": "github",
|
|
24
|
+
"url": "https://github.com/sponsors/storm-software"
|
|
25
|
+
},
|
|
26
|
+
"license": "Apache-2.0",
|
|
13
27
|
"author": {
|
|
14
28
|
"name": "Storm Software",
|
|
15
29
|
"email": "contact@stormsoftware.com",
|
|
@@ -34,15 +48,8 @@
|
|
|
34
48
|
"url": "https://stormsoftware.com"
|
|
35
49
|
}
|
|
36
50
|
],
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"url": "https://github.com/sponsors/storm-software"
|
|
40
|
-
},
|
|
41
|
-
"license": "Apache-2.0",
|
|
42
|
-
"private": false,
|
|
43
|
-
"packageManager": "pnpm@10.3.0",
|
|
44
|
-
"engines": { "node": ">=22.4.0", "pnpm": ">=10.3.0" },
|
|
45
|
-
"main": "./dist/index.js",
|
|
51
|
+
"sideEffects": false,
|
|
52
|
+
"type": "module",
|
|
46
53
|
"exports": {
|
|
47
54
|
"./package.json": "./package.json",
|
|
48
55
|
".": {
|
|
@@ -124,39 +131,9 @@
|
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
},
|
|
134
|
+
"main": "./dist/index.js",
|
|
127
135
|
"types": "./dist/index.d.ts",
|
|
128
136
|
"files": ["dist/**/*"],
|
|
129
|
-
"keywords": [
|
|
130
|
-
"eslint",
|
|
131
|
-
"eslint-config",
|
|
132
|
-
"eslintconfig",
|
|
133
|
-
"monorepo",
|
|
134
|
-
"storm",
|
|
135
|
-
"storm-ops",
|
|
136
|
-
"sullivanpj"
|
|
137
|
-
],
|
|
138
|
-
"peerDependencies": {
|
|
139
|
-
"@eslint-react/eslint-plugin": "^1.19.0",
|
|
140
|
-
"@graphql-eslint/eslint-plugin": "^4.3.0",
|
|
141
|
-
"@next/eslint-plugin-next": "^15.2.0-canary.67",
|
|
142
|
-
"@nx/eslint": "^22.5.1",
|
|
143
|
-
"@prettier/plugin-xml": "^3.4.1",
|
|
144
|
-
"@storm-software/tsdoc": "*",
|
|
145
|
-
"@unocss/eslint-plugin": ">=0.50.0",
|
|
146
|
-
"astro-eslint-parser": "^1.0.2",
|
|
147
|
-
"eslint": "^9.39.2",
|
|
148
|
-
"eslint-plugin-astro": "^1.2.0",
|
|
149
|
-
"eslint-plugin-format": ">=0.1.0",
|
|
150
|
-
"eslint-plugin-import-zod": "^1.2.0",
|
|
151
|
-
"eslint-plugin-react-compiler": "19.0.0-beta-21e868a-20250216",
|
|
152
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
153
|
-
"eslint-plugin-react-native": "^5.0.0",
|
|
154
|
-
"eslint-plugin-react-refresh": "^0.4.4",
|
|
155
|
-
"eslint-plugin-relay": "^1.8.3",
|
|
156
|
-
"eslint-plugin-storybook": "^0.11.0",
|
|
157
|
-
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
158
|
-
"prettier-plugin-astro": "^0.14.0"
|
|
159
|
-
},
|
|
160
137
|
"dependencies": {
|
|
161
138
|
"@antfu/install-pkg": "^1.1.0",
|
|
162
139
|
"@clack/prompts": "^0.10.1",
|
|
@@ -164,8 +141,8 @@
|
|
|
164
141
|
"@eslint/eslintrc": "^3.3.3",
|
|
165
142
|
"@eslint/markdown": "^6.6.0",
|
|
166
143
|
"@nx/eslint-plugin": "^22.5.1",
|
|
167
|
-
"@storm-software/config": "^1.135.
|
|
168
|
-
"@storm-software/config-tools": "^1.189.
|
|
144
|
+
"@storm-software/config": "^1.135.10",
|
|
145
|
+
"@storm-software/config-tools": "^1.189.9",
|
|
169
146
|
"@stylistic/eslint-plugin": "^4.4.1",
|
|
170
147
|
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
171
148
|
"@typescript-eslint/parser": "^8.56.0",
|
|
@@ -239,7 +216,28 @@
|
|
|
239
216
|
"tsx": "^4.21.0",
|
|
240
217
|
"typescript": "^5.9.3"
|
|
241
218
|
},
|
|
219
|
+
"peerDependencies": {
|
|
220
|
+
"@eslint-react/eslint-plugin": "^1.19.0",
|
|
221
|
+
"@graphql-eslint/eslint-plugin": "^4.3.0",
|
|
222
|
+
"@next/eslint-plugin-next": "^15.2.0-canary.67",
|
|
223
|
+
"@nx/eslint": "^22.5.1",
|
|
224
|
+
"@prettier/plugin-xml": "^3.4.1",
|
|
225
|
+
"@storm-software/tsdoc": "*",
|
|
226
|
+
"@unocss/eslint-plugin": ">=0.50.0",
|
|
227
|
+
"astro-eslint-parser": "^1.0.2",
|
|
228
|
+
"eslint": "^9.39.2",
|
|
229
|
+
"eslint-plugin-astro": "^1.2.0",
|
|
230
|
+
"eslint-plugin-format": ">=0.1.0",
|
|
231
|
+
"eslint-plugin-import-zod": "^1.2.0",
|
|
232
|
+
"eslint-plugin-react-compiler": "19.0.0-beta-21e868a-20250216",
|
|
233
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
234
|
+
"eslint-plugin-react-native": "^5.0.0",
|
|
235
|
+
"eslint-plugin-react-refresh": "^0.4.4",
|
|
236
|
+
"eslint-plugin-relay": "^1.8.3",
|
|
237
|
+
"eslint-plugin-storybook": "^0.11.0",
|
|
238
|
+
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
239
|
+
"prettier-plugin-astro": "^0.14.0"
|
|
240
|
+
},
|
|
242
241
|
"publishConfig": { "access": "public" },
|
|
243
|
-
"
|
|
244
|
-
"gitHead": "104d85631645811956cfc4dd7629b0b99bf37e28"
|
|
242
|
+
"gitHead": "119c9bc1238cfee3860bcc9f7a7445ecbac88aa2"
|
|
245
243
|
}
|