@storm-software/eslint 0.157.1 → 0.158.0
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-7T36VVWK.js +43 -0
- package/dist/{chunk-WYU7W4UW.js → chunk-BAVB43QE.js} +5 -1
- package/dist/{chunk-HO6DXXZX.js → chunk-BQ3XWEU5.js} +5 -0
- package/dist/{chunk-RU7GXBCG.js → chunk-ESAVAG6Q.js} +5 -0
- package/dist/{chunk-DLORY5AL.js → chunk-NRW2A543.js} +5 -1
- package/dist/{chunk-Z2ZQTZDC.js → chunk-O55S2RN4.js} +5 -0
- package/dist/{chunk-5ALLOW52.js → chunk-QCZ5YENA.js} +13 -9
- package/dist/{chunk-2AFQKKSX.js → chunk-RI5KJEVZ.js} +10 -6
- package/dist/{chunk-EJ2FSS2J.js → chunk-VPGAL7NG.js} +5 -0
- package/dist/preset.js +530 -36
- package/dist/types.d.ts +92 -55
- package/dist/types.js +6 -0
- package/dist/utils/banner-plugin.js +4 -3
- package/dist/utils/combine.js +5 -0
- package/dist/utils/constants.js +2 -1
- package/dist/utils/correct-paths.js +2 -1
- package/dist/utils/find-workspace-root.js +3 -2
- package/dist/utils/format-config.js +2 -1
- package/dist/utils/get-file-banner.d.ts +2 -2
- package/dist/utils/get-file-banner.js +3 -2
- package/dist/utils/helpers.js +2 -1
- package/dist/utils/index.js +8 -2
- package/dist/utils/tsconfig-path.js +3 -2
- package/package.json +4 -4
package/dist/preset.js
CHANGED
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
isPackageInScope,
|
|
6
6
|
parserPlain,
|
|
7
7
|
renameRules
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BQ3XWEU5.js";
|
|
9
9
|
import {
|
|
10
10
|
getTsConfigPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NRW2A543.js";
|
|
12
12
|
import {
|
|
13
13
|
banner_plugin_default
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-RI5KJEVZ.js";
|
|
15
|
+
import "./chunk-QCZ5YENA.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOB_ASTRO,
|
|
18
18
|
GLOB_ASTRO_TS,
|
|
@@ -39,19 +39,462 @@ import {
|
|
|
39
39
|
GLOB_TSX,
|
|
40
40
|
GLOB_XML,
|
|
41
41
|
GLOB_YAML
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-VPGAL7NG.js";
|
|
43
43
|
import {
|
|
44
44
|
findWorkspaceRoot
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BAVB43QE.js";
|
|
46
46
|
import {
|
|
47
47
|
joinPaths
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ESAVAG6Q.js";
|
|
49
|
+
import {
|
|
50
|
+
__commonJS,
|
|
51
|
+
__toESM,
|
|
52
|
+
init_esm_shims
|
|
53
|
+
} from "./chunk-7T36VVWK.js";
|
|
54
|
+
|
|
55
|
+
// ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=be253a1e507d3049c735251fea147ba0612ee26e241e78fe442073fc4b39d16c/node_modules/eslint-plugin-tsdoc/lib/Debug.js
|
|
56
|
+
var require_Debug = __commonJS({
|
|
57
|
+
"../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=be253a1e507d3049c735251fea147ba0612ee26e241e78fe442073fc4b39d16c/node_modules/eslint-plugin-tsdoc/lib/Debug.js"(exports) {
|
|
58
|
+
"use strict";
|
|
59
|
+
init_esm_shims();
|
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
+
exports.Debug = void 0;
|
|
62
|
+
var Debug = class {
|
|
63
|
+
// To debug the plugin, temporarily uncomment the body of this function
|
|
64
|
+
static log(message) {
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.Debug = Debug;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=be253a1e507d3049c735251fea147ba0612ee26e241e78fe442073fc4b39d16c/node_modules/eslint-plugin-tsdoc/lib/ConfigCache.js
|
|
72
|
+
import * as __import__microsoft_tsdocConfig from "@microsoft/tsdoc-config";
|
|
73
|
+
import * as __import_path from "path";
|
|
74
|
+
import * as __import_fs from "fs";
|
|
75
|
+
var require_ConfigCache = __commonJS({
|
|
76
|
+
"../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=be253a1e507d3049c735251fea147ba0612ee26e241e78fe442073fc4b39d16c/node_modules/eslint-plugin-tsdoc/lib/ConfigCache.js"(exports) {
|
|
77
|
+
"use strict";
|
|
78
|
+
init_esm_shims();
|
|
79
|
+
var __import___Debug = __toESM(require_Debug());
|
|
80
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
81
|
+
if (k2 === void 0) k2 = k;
|
|
82
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
83
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
84
|
+
desc = { enumerable: true, get: function() {
|
|
85
|
+
return m[k];
|
|
86
|
+
} };
|
|
87
|
+
}
|
|
88
|
+
Object.defineProperty(o, k2, desc);
|
|
89
|
+
} : function(o, m, k, k2) {
|
|
90
|
+
if (k2 === void 0) k2 = k;
|
|
91
|
+
o[k2] = m[k];
|
|
92
|
+
});
|
|
93
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
94
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
95
|
+
} : function(o, v) {
|
|
96
|
+
o["default"] = v;
|
|
97
|
+
});
|
|
98
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
99
|
+
if (mod && mod.__esModule) return mod;
|
|
100
|
+
var result = {};
|
|
101
|
+
if (mod != null) {
|
|
102
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
103
|
+
}
|
|
104
|
+
__setModuleDefault(result, mod);
|
|
105
|
+
return result;
|
|
106
|
+
};
|
|
107
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
108
|
+
exports.ConfigCache = void 0;
|
|
109
|
+
var tsdoc_config_1 = __import__microsoft_tsdocConfig;
|
|
110
|
+
var path = __importStar(__import_path);
|
|
111
|
+
var Debug_1 = __import___Debug;
|
|
112
|
+
function _nullishCoalesce(lhs, rhsFn) {
|
|
113
|
+
if (lhs != null) {
|
|
114
|
+
return lhs;
|
|
115
|
+
} else {
|
|
116
|
+
return rhsFn();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
var _fs = __import_fs;
|
|
120
|
+
var _path = __import_path;
|
|
121
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
122
|
+
var depth = 0;
|
|
123
|
+
var ROOT_FILES = [
|
|
124
|
+
"storm-workspace.json",
|
|
125
|
+
"storm-workspace.json",
|
|
126
|
+
"storm-workspace.yaml",
|
|
127
|
+
"storm-workspace.yml",
|
|
128
|
+
"storm-workspace.js",
|
|
129
|
+
"storm-workspace.ts",
|
|
130
|
+
".storm-workspace.json",
|
|
131
|
+
".storm-workspace.yaml",
|
|
132
|
+
".storm-workspace.yml",
|
|
133
|
+
".storm-workspace.js",
|
|
134
|
+
".storm-workspace.ts",
|
|
135
|
+
"lerna.json",
|
|
136
|
+
"nx.json",
|
|
137
|
+
"turbo.json",
|
|
138
|
+
"npm-workspace.json",
|
|
139
|
+
"yarn-workspace.json",
|
|
140
|
+
"pnpm-workspace.json",
|
|
141
|
+
"npm-workspace.yaml",
|
|
142
|
+
"yarn-workspace.yaml",
|
|
143
|
+
"pnpm-workspace.yaml",
|
|
144
|
+
"npm-workspace.yml",
|
|
145
|
+
"yarn-workspace.yml",
|
|
146
|
+
"pnpm-workspace.yml",
|
|
147
|
+
"npm-lock.json",
|
|
148
|
+
"yarn-lock.json",
|
|
149
|
+
"pnpm-lock.json",
|
|
150
|
+
"npm-lock.yaml",
|
|
151
|
+
"yarn-lock.yaml",
|
|
152
|
+
"pnpm-lock.yaml",
|
|
153
|
+
"npm-lock.yml",
|
|
154
|
+
"yarn-lock.yml",
|
|
155
|
+
"pnpm-lock.yml",
|
|
156
|
+
"bun.lockb"
|
|
157
|
+
];
|
|
158
|
+
var ROOT_DIRECTORIES = [
|
|
159
|
+
".storm-workspace",
|
|
160
|
+
".nx",
|
|
161
|
+
".github",
|
|
162
|
+
".vscode",
|
|
163
|
+
".verdaccio"
|
|
164
|
+
];
|
|
165
|
+
function findWorkspaceRoot2(startPath) {
|
|
166
|
+
const _startPath = _nullishCoalesce(startPath, () => process.cwd());
|
|
167
|
+
if (ROOT_DIRECTORIES.some(
|
|
168
|
+
(endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
|
|
169
|
+
)) {
|
|
170
|
+
return _startPath;
|
|
171
|
+
}
|
|
172
|
+
if (ROOT_FILES.some(
|
|
173
|
+
(endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
|
|
174
|
+
)) {
|
|
175
|
+
return _startPath;
|
|
176
|
+
}
|
|
177
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
178
|
+
const parent = _path.join.call(void 0, _startPath, "..");
|
|
179
|
+
return findWorkspaceRoot2(parent);
|
|
180
|
+
}
|
|
181
|
+
return void 0;
|
|
182
|
+
}
|
|
183
|
+
var CACHE_CHECK_INTERVAL_MS = 3 * 1e3;
|
|
184
|
+
var CACHE_EXPIRE_MS = 20 * 1e3;
|
|
185
|
+
var CACHE_MAX_SIZE = 100;
|
|
186
|
+
var ConfigCache = class _ConfigCache {
|
|
187
|
+
/**
|
|
188
|
+
* Node.js equivalent of performance.now().
|
|
189
|
+
*/
|
|
190
|
+
static _getTimeInMs() {
|
|
191
|
+
const [seconds, nanoseconds] = process.hrtime();
|
|
192
|
+
return seconds * 1e3 + nanoseconds / 1e6;
|
|
193
|
+
}
|
|
194
|
+
static getForSourceFile(sourceFilePath, tsConfigRootDir) {
|
|
195
|
+
const sourceFileFolder = path.dirname(path.resolve(sourceFilePath));
|
|
196
|
+
const configFilePath = tsConfigRootDir ? path.join(tsConfigRootDir, tsdoc_config_1.TSDocConfigFile.FILENAME) : tsdoc_config_1.TSDocConfigFile.findConfigPathForFolder(sourceFileFolder);
|
|
197
|
+
const cacheKey = configFilePath || sourceFileFolder + "/";
|
|
198
|
+
Debug_1.Debug.log(`Cache key: "${cacheKey}"`);
|
|
199
|
+
const nowMs = _ConfigCache._getTimeInMs();
|
|
200
|
+
let cachedConfig = void 0;
|
|
201
|
+
cachedConfig = _ConfigCache._cachedConfigs.get(cacheKey);
|
|
202
|
+
if (cachedConfig) {
|
|
203
|
+
Debug_1.Debug.log("Cache hit");
|
|
204
|
+
const loadAgeMs = nowMs - cachedConfig.loadTimeMs;
|
|
205
|
+
const lastCheckAgeMs = nowMs - cachedConfig.lastCheckTimeMs;
|
|
206
|
+
if (loadAgeMs > CACHE_EXPIRE_MS || loadAgeMs < 0) {
|
|
207
|
+
Debug_1.Debug.log("Evicting because item is expired");
|
|
208
|
+
cachedConfig = void 0;
|
|
209
|
+
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
210
|
+
} else if (lastCheckAgeMs > CACHE_CHECK_INTERVAL_MS || lastCheckAgeMs < 0) {
|
|
211
|
+
Debug_1.Debug.log("Checking for modifications");
|
|
212
|
+
cachedConfig.lastCheckTimeMs = nowMs;
|
|
213
|
+
if (cachedConfig.configFile.checkForModifiedFiles()) {
|
|
214
|
+
Debug_1.Debug.log("Evicting because item was modified");
|
|
215
|
+
cachedConfig = void 0;
|
|
216
|
+
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (!cachedConfig) {
|
|
221
|
+
if (_ConfigCache._cachedConfigs.size > CACHE_MAX_SIZE) {
|
|
222
|
+
Debug_1.Debug.log("Clearing cache");
|
|
223
|
+
_ConfigCache._cachedConfigs.clear();
|
|
224
|
+
}
|
|
225
|
+
const configFile = tsdoc_config_1.TSDocConfigFile.loadFile(configFilePath);
|
|
226
|
+
if (configFile.fileNotFound) {
|
|
227
|
+
Debug_1.Debug.log(`File not found: "${configFilePath}"`);
|
|
228
|
+
} else {
|
|
229
|
+
Debug_1.Debug.log(`Loaded: "${configFilePath}"`);
|
|
230
|
+
}
|
|
231
|
+
cachedConfig = {
|
|
232
|
+
configFile,
|
|
233
|
+
lastCheckTimeMs: nowMs,
|
|
234
|
+
loadTimeMs: nowMs
|
|
235
|
+
};
|
|
236
|
+
_ConfigCache._cachedConfigs.set(cacheKey, cachedConfig);
|
|
237
|
+
}
|
|
238
|
+
return cachedConfig.configFile;
|
|
239
|
+
}
|
|
240
|
+
static getStormConfigFile({
|
|
241
|
+
type = "base",
|
|
242
|
+
configFile
|
|
243
|
+
}) {
|
|
244
|
+
let workspaceRoot = "";
|
|
245
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
246
|
+
workspaceRoot = process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
247
|
+
}
|
|
248
|
+
if (!workspaceRoot) {
|
|
249
|
+
workspaceRoot = findWorkspaceRoot2();
|
|
250
|
+
}
|
|
251
|
+
const configFilePath = process.env.STORM_TSDOC_CONFIG_FILE ? process.env.STORM_TSDOC_CONFIG_FILE : configFile ? configFile : path.join(
|
|
252
|
+
workspaceRoot,
|
|
253
|
+
"node_modules",
|
|
254
|
+
"@storm-software",
|
|
255
|
+
"tsdoc",
|
|
256
|
+
"config",
|
|
257
|
+
(process.env.STORM_TSDOC_TYPE ? process.env.STORM_TSDOC_TYPE : type) === "typedoc" ? "typedoc.json" : "base.json"
|
|
258
|
+
);
|
|
259
|
+
const cacheKey = configFilePath;
|
|
260
|
+
Debug_1.Debug.log(`Storm Software Configuration Cache key: "${cacheKey}"`);
|
|
261
|
+
const nowMs = _ConfigCache._getTimeInMs();
|
|
262
|
+
let cachedConfig = void 0;
|
|
263
|
+
cachedConfig = _ConfigCache._cachedConfigs.get(cacheKey);
|
|
264
|
+
if (cachedConfig) {
|
|
265
|
+
Debug_1.Debug.log("Cache hit");
|
|
266
|
+
const loadAgeMs = nowMs - cachedConfig.loadTimeMs;
|
|
267
|
+
const lastCheckAgeMs = nowMs - cachedConfig.lastCheckTimeMs;
|
|
268
|
+
if (loadAgeMs > CACHE_EXPIRE_MS || loadAgeMs < 0) {
|
|
269
|
+
Debug_1.Debug.log("Evicting because item is expired");
|
|
270
|
+
cachedConfig = void 0;
|
|
271
|
+
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
272
|
+
} else if (lastCheckAgeMs > CACHE_CHECK_INTERVAL_MS || lastCheckAgeMs < 0) {
|
|
273
|
+
Debug_1.Debug.log("Checking for modifications");
|
|
274
|
+
cachedConfig.lastCheckTimeMs = nowMs;
|
|
275
|
+
if (cachedConfig.configFile.checkForModifiedFiles()) {
|
|
276
|
+
Debug_1.Debug.log("Evicting because item was modified");
|
|
277
|
+
cachedConfig = void 0;
|
|
278
|
+
_ConfigCache._cachedConfigs.delete(cacheKey);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (!cachedConfig) {
|
|
283
|
+
if (_ConfigCache._cachedConfigs.size > CACHE_MAX_SIZE) {
|
|
284
|
+
Debug_1.Debug.log("Clearing cache");
|
|
285
|
+
_ConfigCache._cachedConfigs.clear();
|
|
286
|
+
}
|
|
287
|
+
const configFile2 = tsdoc_config_1.TSDocConfigFile.loadFile(configFilePath);
|
|
288
|
+
if (configFile2.fileNotFound) {
|
|
289
|
+
Debug_1.Debug.log(`File not found: "${configFilePath}"`);
|
|
290
|
+
} else {
|
|
291
|
+
Debug_1.Debug.log(`Loaded: "${configFilePath}"`);
|
|
292
|
+
}
|
|
293
|
+
cachedConfig = {
|
|
294
|
+
configFile: configFile2,
|
|
295
|
+
lastCheckTimeMs: nowMs,
|
|
296
|
+
loadTimeMs: nowMs
|
|
297
|
+
};
|
|
298
|
+
_ConfigCache._cachedConfigs.set(cacheKey, cachedConfig);
|
|
299
|
+
}
|
|
300
|
+
return cachedConfig.configFile;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
exports.ConfigCache = ConfigCache;
|
|
304
|
+
ConfigCache._cachedConfigs = /* @__PURE__ */ new Map();
|
|
305
|
+
ConfigCache._cachedPaths = /* @__PURE__ */ new Map();
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
// ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=be253a1e507d3049c735251fea147ba0612ee26e241e78fe442073fc4b39d16c/node_modules/eslint-plugin-tsdoc/lib/index.js
|
|
310
|
+
import * as __import__microsoft_tsdoc from "@microsoft/tsdoc";
|
|
311
|
+
var require_lib = __commonJS({
|
|
312
|
+
"../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=be253a1e507d3049c735251fea147ba0612ee26e241e78fe442073fc4b39d16c/node_modules/eslint-plugin-tsdoc/lib/index.js"(exports, module) {
|
|
313
|
+
"use strict";
|
|
314
|
+
init_esm_shims();
|
|
315
|
+
var __import___Debug = __toESM(require_Debug());
|
|
316
|
+
var __import___ConfigCache = __toESM(require_ConfigCache());
|
|
317
|
+
var tsdoc_1 = __import__microsoft_tsdoc;
|
|
318
|
+
var Debug_1 = __import___Debug;
|
|
319
|
+
var ConfigCache_1 = __import___ConfigCache;
|
|
320
|
+
var tsdocMessageIds = {};
|
|
321
|
+
var defaultTSDocConfiguration = new tsdoc_1.TSDocConfiguration();
|
|
322
|
+
defaultTSDocConfiguration.allTsdocMessageIds.forEach((messageId) => {
|
|
323
|
+
tsdocMessageIds[messageId] = `${messageId}: {{unformattedText}}`;
|
|
324
|
+
});
|
|
325
|
+
var plugin2 = {
|
|
326
|
+
rules: {
|
|
327
|
+
// NOTE: The actual ESLint rule name will be "tsdoc/syntax". It is calculated by deleting "eslint-plugin-"
|
|
328
|
+
// from the NPM package name, and then appending this string.
|
|
329
|
+
syntax: {
|
|
330
|
+
meta: {
|
|
331
|
+
messages: Object.assign({ "error-loading-storm-config": `Error loading Storm Software's shared TSDoc config file:
|
|
332
|
+
{{details}}
|
|
333
|
+
|
|
334
|
+
Please ensure "@storm-software/tsdoc" is installed in the workspace root.`, "error-loading-config-file": "Error loading TSDoc config file:\n{{details}}", "error-applying-storm-config": "Error applying Storm Software's shared TSDoc configuration: {{details}}", "error-applying-config": "Error applying TSDoc configuration: {{details}}" }, tsdocMessageIds),
|
|
335
|
+
type: "problem",
|
|
336
|
+
docs: {
|
|
337
|
+
description: "Validates that TypeScript documentation comments conform to the TSDoc standard",
|
|
338
|
+
category: "Stylistic Issues",
|
|
339
|
+
// This package is experimental
|
|
340
|
+
recommended: false,
|
|
341
|
+
url: "https://tsdoc.org/pages/packages/eslint-plugin-tsdoc"
|
|
342
|
+
},
|
|
343
|
+
schema: [
|
|
344
|
+
{
|
|
345
|
+
type: "object",
|
|
346
|
+
properties: {
|
|
347
|
+
type: {
|
|
348
|
+
type: "string",
|
|
349
|
+
enum: ["typedoc", "base"],
|
|
350
|
+
description: "The TSDoc configuration type to use from '@storm-software/tsdoc'. Defaults to 'base' (@storm-software/tsdoc/base.json)."
|
|
351
|
+
},
|
|
352
|
+
configFile: {
|
|
353
|
+
type: "string",
|
|
354
|
+
description: "The TSDoc configuration file to use."
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
additionalProperties: false
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
defaultOptions: [
|
|
362
|
+
{
|
|
363
|
+
type: "base"
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
create: (context, [
|
|
367
|
+
{
|
|
368
|
+
type = "base",
|
|
369
|
+
configFile
|
|
370
|
+
}
|
|
371
|
+
]) => {
|
|
372
|
+
const sourceFilePath = context.filename;
|
|
373
|
+
const tsConfigDir = context.parserOptions.tsconfigRootDir;
|
|
374
|
+
Debug_1.Debug.log(`Linting: "${sourceFilePath}"`);
|
|
375
|
+
const tsdocConfiguration = new tsdoc_1.TSDocConfiguration();
|
|
376
|
+
try {
|
|
377
|
+
let tsdocConfigFile = {};
|
|
378
|
+
try {
|
|
379
|
+
tsdocConfigFile = ConfigCache_1.ConfigCache.getStormConfigFile({
|
|
380
|
+
type,
|
|
381
|
+
configFile
|
|
382
|
+
});
|
|
383
|
+
if (!tsdocConfigFile.fileNotFound) {
|
|
384
|
+
if (tsdocConfigFile.hasErrors) {
|
|
385
|
+
context.report({
|
|
386
|
+
loc: { line: 1, column: 1 },
|
|
387
|
+
messageId: "error-loading-storm-config",
|
|
388
|
+
data: {
|
|
389
|
+
details: tsdocConfigFile.getErrorSummary()
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
try {
|
|
394
|
+
tsdocConfigFile.configureParser(tsdocConfiguration);
|
|
395
|
+
} catch (e) {
|
|
396
|
+
context.report({
|
|
397
|
+
loc: { line: 1, column: 1 },
|
|
398
|
+
messageId: "error-applying-storm-config",
|
|
399
|
+
data: {
|
|
400
|
+
details: e.message
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
} catch (e) {
|
|
406
|
+
context.report({
|
|
407
|
+
loc: { line: 1, column: 1 },
|
|
408
|
+
messageId: "error-loading-storm-config",
|
|
409
|
+
data: {
|
|
410
|
+
details: `Unexpected exception: ${e.message}`
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
if (!tsdocConfigFile) {
|
|
415
|
+
tsdocConfigFile = ConfigCache_1.ConfigCache.getForSourceFile(sourceFilePath, tsConfigDir);
|
|
416
|
+
if (!tsdocConfigFile.fileNotFound) {
|
|
417
|
+
if (tsdocConfigFile.hasErrors) {
|
|
418
|
+
context.report({
|
|
419
|
+
loc: { line: 1, column: 1 },
|
|
420
|
+
messageId: "error-loading-config-file",
|
|
421
|
+
data: {
|
|
422
|
+
details: tsdocConfigFile.getErrorSummary()
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
try {
|
|
427
|
+
tsdocConfigFile.configureParser(tsdocConfiguration);
|
|
428
|
+
} catch (e) {
|
|
429
|
+
context.report({
|
|
430
|
+
loc: { line: 1, column: 1 },
|
|
431
|
+
messageId: "error-applying-config",
|
|
432
|
+
data: {
|
|
433
|
+
details: e.message
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
} catch (e) {
|
|
440
|
+
context.report({
|
|
441
|
+
loc: { line: 1, column: 1 },
|
|
442
|
+
messageId: "error-loading-config-file",
|
|
443
|
+
data: {
|
|
444
|
+
details: `Unexpected exception: ${e.message}`
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
const tsdocParser = new tsdoc_1.TSDocParser(tsdocConfiguration);
|
|
449
|
+
const sourceCode = context.getSourceCode();
|
|
450
|
+
const checkCommentBlocks = function(node2) {
|
|
451
|
+
for (const comment of sourceCode.getAllComments()) {
|
|
452
|
+
if (comment.type !== "Block") {
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
if (!comment.range) {
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
const textRange = tsdoc_1.TextRange.fromStringRange(sourceCode.text, comment.range[0], comment.range[1]);
|
|
459
|
+
if (textRange.length < 5) {
|
|
460
|
+
continue;
|
|
461
|
+
}
|
|
462
|
+
if (textRange.buffer[textRange.pos + 2] !== "*") {
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
465
|
+
const parserContext = tsdocParser.parseRange(textRange);
|
|
466
|
+
for (const message of parserContext.log.messages) {
|
|
467
|
+
context.report({
|
|
468
|
+
loc: {
|
|
469
|
+
start: sourceCode.getLocFromIndex(message.textRange.pos),
|
|
470
|
+
end: sourceCode.getLocFromIndex(message.textRange.end)
|
|
471
|
+
},
|
|
472
|
+
messageId: message.messageId,
|
|
473
|
+
data: {
|
|
474
|
+
unformattedText: message.unformattedText
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
return {
|
|
481
|
+
Program: checkCommentBlocks
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
module.exports = plugin2;
|
|
488
|
+
}
|
|
489
|
+
});
|
|
49
490
|
|
|
50
491
|
// src/preset.ts
|
|
492
|
+
init_esm_shims();
|
|
51
493
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
52
494
|
import { isPackageExists as isPackageExists2 } from "local-pkg";
|
|
53
495
|
|
|
54
496
|
// src/configs/astro.ts
|
|
497
|
+
init_esm_shims();
|
|
55
498
|
async function astro(options = {}) {
|
|
56
499
|
const { files = [GLOB_ASTRO], overrides = {}, stylistic: stylistic2 = true } = options;
|
|
57
500
|
const [pluginAstro, parserAstro, parserTs] = await Promise.all([
|
|
@@ -104,6 +547,7 @@ async function astro(options = {}) {
|
|
|
104
547
|
}
|
|
105
548
|
|
|
106
549
|
// src/configs/cspell.ts
|
|
550
|
+
init_esm_shims();
|
|
107
551
|
import cspellConfig from "@cspell/eslint-plugin/recommended";
|
|
108
552
|
async function cspell(options = {}) {
|
|
109
553
|
const { configFile = "./.vscode/cspell.json", overrides = {} } = options;
|
|
@@ -129,6 +573,7 @@ async function cspell(options = {}) {
|
|
|
129
573
|
}
|
|
130
574
|
|
|
131
575
|
// src/configs/disables.ts
|
|
576
|
+
init_esm_shims();
|
|
132
577
|
async function disables() {
|
|
133
578
|
return [
|
|
134
579
|
{
|
|
@@ -175,9 +620,11 @@ async function disables() {
|
|
|
175
620
|
}
|
|
176
621
|
|
|
177
622
|
// src/configs/formatters.ts
|
|
623
|
+
init_esm_shims();
|
|
178
624
|
import defu from "defu";
|
|
179
625
|
|
|
180
626
|
// src/configs/stylistic.ts
|
|
627
|
+
init_esm_shims();
|
|
181
628
|
var StylisticConfigDefaults = {
|
|
182
629
|
indent: 2,
|
|
183
630
|
jsx: true,
|
|
@@ -494,6 +941,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
494
941
|
}
|
|
495
942
|
|
|
496
943
|
// src/configs/graphql.ts
|
|
944
|
+
init_esm_shims();
|
|
497
945
|
async function graphql(options = {}) {
|
|
498
946
|
const {
|
|
499
947
|
relay = true,
|
|
@@ -672,6 +1120,7 @@ async function graphql(options = {}) {
|
|
|
672
1120
|
}
|
|
673
1121
|
|
|
674
1122
|
// src/configs/ignores.ts
|
|
1123
|
+
init_esm_shims();
|
|
675
1124
|
async function ignores(userIgnores = []) {
|
|
676
1125
|
return [
|
|
677
1126
|
{
|
|
@@ -681,7 +1130,11 @@ async function ignores(userIgnores = []) {
|
|
|
681
1130
|
];
|
|
682
1131
|
}
|
|
683
1132
|
|
|
1133
|
+
// src/configs/imports.ts
|
|
1134
|
+
init_esm_shims();
|
|
1135
|
+
|
|
684
1136
|
// src/plugins.ts
|
|
1137
|
+
init_esm_shims();
|
|
685
1138
|
import { default as default2 } from "@cspell/eslint-plugin";
|
|
686
1139
|
import { default as default3 } from "@nx/eslint-plugin/nx.js";
|
|
687
1140
|
import * as pluginImport from "eslint-plugin-import-x";
|
|
@@ -690,10 +1143,11 @@ import { default as default5 } from "eslint-plugin-no-secrets";
|
|
|
690
1143
|
import { default as default6 } from "eslint-plugin-perfectionist";
|
|
691
1144
|
|
|
692
1145
|
// ../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=72dcde755c336eeca3e6170de1106fd85ecb66171e060788f80_5122e2c143bf4def12480ca5a032b993/node_modules/eslint-plugin-pnpm/dist/index.mjs
|
|
1146
|
+
init_esm_shims();
|
|
693
1147
|
import * as jsoncParser from "jsonc-eslint-parser";
|
|
694
1148
|
import * as yamlParser from "yaml-eslint-parser";
|
|
695
1149
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
696
|
-
import
|
|
1150
|
+
import process2 from "node:process";
|
|
697
1151
|
import { findUpSync } from "find-up-simple";
|
|
698
1152
|
import { parsePnpmWorkspaceYaml } from "pnpm-workspace-yaml";
|
|
699
1153
|
import { basename, normalize, resolve, dirname } from "pathe";
|
|
@@ -782,7 +1236,7 @@ function* iterateDependencies(context, fields) {
|
|
|
782
1236
|
}
|
|
783
1237
|
}
|
|
784
1238
|
function readPnpmWorkspace() {
|
|
785
|
-
const filepath = findUpSync("pnpm-workspace.yaml", { cwd:
|
|
1239
|
+
const filepath = findUpSync("pnpm-workspace.yaml", { cwd: process2.cwd() });
|
|
786
1240
|
if (!filepath)
|
|
787
1241
|
throw new Error("pnpm-workspace.yaml not found");
|
|
788
1242
|
const content = fs.readFileSync(filepath, "utf-8");
|
|
@@ -1408,15 +1862,11 @@ async function imports(options = {}) {
|
|
|
1408
1862
|
}
|
|
1409
1863
|
|
|
1410
1864
|
// src/configs/javascript.ts
|
|
1865
|
+
init_esm_shims();
|
|
1411
1866
|
import defu2 from "defu";
|
|
1412
1867
|
import globalsLib from "globals";
|
|
1413
1868
|
async function javascript(options = {}) {
|
|
1414
|
-
const {
|
|
1415
|
-
lineEndings = "unix",
|
|
1416
|
-
overrides = {},
|
|
1417
|
-
repositoryName,
|
|
1418
|
-
globals = {}
|
|
1419
|
-
} = options;
|
|
1869
|
+
const { lineEndings = "unix", overrides = {}, name: name2, globals = {} } = options;
|
|
1420
1870
|
return [
|
|
1421
1871
|
{
|
|
1422
1872
|
name: "storm/javascript/setup",
|
|
@@ -1452,7 +1902,7 @@ async function javascript(options = {}) {
|
|
|
1452
1902
|
{
|
|
1453
1903
|
commentType: "block",
|
|
1454
1904
|
numNewlines: 2,
|
|
1455
|
-
|
|
1905
|
+
name: name2,
|
|
1456
1906
|
lineEndings
|
|
1457
1907
|
}
|
|
1458
1908
|
]
|
|
@@ -2309,6 +2759,7 @@ async function javascript(options = {}) {
|
|
|
2309
2759
|
}
|
|
2310
2760
|
|
|
2311
2761
|
// src/configs/jsdoc.ts
|
|
2762
|
+
init_esm_shims();
|
|
2312
2763
|
async function jsdoc(options = {}) {
|
|
2313
2764
|
const { stylistic: stylistic2 = true } = options;
|
|
2314
2765
|
return [
|
|
@@ -2343,6 +2794,7 @@ async function jsdoc(options = {}) {
|
|
|
2343
2794
|
}
|
|
2344
2795
|
|
|
2345
2796
|
// src/configs/jsonc.ts
|
|
2797
|
+
init_esm_shims();
|
|
2346
2798
|
async function jsonc(options = {}) {
|
|
2347
2799
|
const {
|
|
2348
2800
|
files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
@@ -2422,6 +2874,7 @@ async function jsonc(options = {}) {
|
|
|
2422
2874
|
}
|
|
2423
2875
|
|
|
2424
2876
|
// src/configs/jsx.ts
|
|
2877
|
+
init_esm_shims();
|
|
2425
2878
|
async function jsx() {
|
|
2426
2879
|
await ensurePackages(["eslint-plugin-jsx-a11y"]);
|
|
2427
2880
|
const [pluginJsxA11y] = await Promise.all([
|
|
@@ -2600,6 +3053,7 @@ async function jsx() {
|
|
|
2600
3053
|
}
|
|
2601
3054
|
|
|
2602
3055
|
// src/configs/markdown.ts
|
|
3056
|
+
init_esm_shims();
|
|
2603
3057
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
2604
3058
|
async function markdown(options = {}) {
|
|
2605
3059
|
const { files = [GLOB_MARKDOWN], overrides = {} } = options;
|
|
@@ -2677,6 +3131,7 @@ async function markdown(options = {}) {
|
|
|
2677
3131
|
}
|
|
2678
3132
|
|
|
2679
3133
|
// src/configs/mdx.ts
|
|
3134
|
+
init_esm_shims();
|
|
2680
3135
|
async function mdx(options = {}) {
|
|
2681
3136
|
const { files = [GLOB_MDX], overrides = {} } = options;
|
|
2682
3137
|
await ensurePackages(["eslint-plugin-mdx"]);
|
|
@@ -2704,6 +3159,7 @@ async function mdx(options = {}) {
|
|
|
2704
3159
|
}
|
|
2705
3160
|
|
|
2706
3161
|
// src/configs/next.ts
|
|
3162
|
+
init_esm_shims();
|
|
2707
3163
|
async function next(options = {}) {
|
|
2708
3164
|
const { coreWebVitals = true, rootDir } = options;
|
|
2709
3165
|
await ensurePackages(["@next/eslint-plugin-next"]);
|
|
@@ -2754,6 +3210,7 @@ async function next(options = {}) {
|
|
|
2754
3210
|
}
|
|
2755
3211
|
|
|
2756
3212
|
// src/configs/node.ts
|
|
3213
|
+
init_esm_shims();
|
|
2757
3214
|
async function node() {
|
|
2758
3215
|
return [
|
|
2759
3216
|
{
|
|
@@ -2776,6 +3233,7 @@ async function node() {
|
|
|
2776
3233
|
}
|
|
2777
3234
|
|
|
2778
3235
|
// src/configs/nx.ts
|
|
3236
|
+
init_esm_shims();
|
|
2779
3237
|
import defu3 from "defu";
|
|
2780
3238
|
async function nx(options = {}) {
|
|
2781
3239
|
const {
|
|
@@ -2843,6 +3301,7 @@ async function nx(options = {}) {
|
|
|
2843
3301
|
}
|
|
2844
3302
|
|
|
2845
3303
|
// src/configs/perfectionist.ts
|
|
3304
|
+
init_esm_shims();
|
|
2846
3305
|
async function perfectionist() {
|
|
2847
3306
|
return [
|
|
2848
3307
|
{
|
|
@@ -2890,6 +3349,7 @@ async function perfectionist() {
|
|
|
2890
3349
|
}
|
|
2891
3350
|
|
|
2892
3351
|
// src/configs/pnpm.ts
|
|
3352
|
+
init_esm_shims();
|
|
2893
3353
|
import {
|
|
2894
3354
|
createProjectGraphAsync,
|
|
2895
3355
|
readCachedProjectGraph
|
|
@@ -2996,6 +3456,7 @@ async function pnpm(options = {}) {
|
|
|
2996
3456
|
}
|
|
2997
3457
|
|
|
2998
3458
|
// src/configs/prettier.ts
|
|
3459
|
+
init_esm_shims();
|
|
2999
3460
|
import config from "eslint-config-prettier";
|
|
3000
3461
|
async function prettier() {
|
|
3001
3462
|
return [
|
|
@@ -3017,6 +3478,7 @@ async function prettier() {
|
|
|
3017
3478
|
}
|
|
3018
3479
|
|
|
3019
3480
|
// src/configs/react.ts
|
|
3481
|
+
init_esm_shims();
|
|
3020
3482
|
import { isPackageExists } from "local-pkg";
|
|
3021
3483
|
var ReactRefreshAllowConstantExportPackages = ["vite"];
|
|
3022
3484
|
var ReactRouterPackages = [
|
|
@@ -3193,6 +3655,7 @@ async function react(options = {}) {
|
|
|
3193
3655
|
}
|
|
3194
3656
|
|
|
3195
3657
|
// src/configs/react-native.ts
|
|
3658
|
+
init_esm_shims();
|
|
3196
3659
|
async function reactNative(options = {}) {
|
|
3197
3660
|
const { overrides = {} } = options;
|
|
3198
3661
|
await ensurePackages(["eslint-plugin-react-native"]);
|
|
@@ -3213,6 +3676,7 @@ async function reactNative(options = {}) {
|
|
|
3213
3676
|
}
|
|
3214
3677
|
|
|
3215
3678
|
// src/configs/regexp.ts
|
|
3679
|
+
init_esm_shims();
|
|
3216
3680
|
import { configs as configs2 } from "eslint-plugin-regexp";
|
|
3217
3681
|
async function regexp(options = {}) {
|
|
3218
3682
|
const config2 = configs2["flat/recommended"];
|
|
@@ -3244,6 +3708,7 @@ async function regexp(options = {}) {
|
|
|
3244
3708
|
}
|
|
3245
3709
|
|
|
3246
3710
|
// src/configs/secrets.ts
|
|
3711
|
+
init_esm_shims();
|
|
3247
3712
|
async function secrets(options) {
|
|
3248
3713
|
const { json = true } = options;
|
|
3249
3714
|
if (json) {
|
|
@@ -3267,6 +3732,7 @@ async function secrets(options) {
|
|
|
3267
3732
|
}
|
|
3268
3733
|
|
|
3269
3734
|
// src/configs/sort.ts
|
|
3735
|
+
init_esm_shims();
|
|
3270
3736
|
async function sortPackageJson() {
|
|
3271
3737
|
return [
|
|
3272
3738
|
{
|
|
@@ -3492,6 +3958,7 @@ function sortTsconfig() {
|
|
|
3492
3958
|
}
|
|
3493
3959
|
|
|
3494
3960
|
// src/configs/storybook.ts
|
|
3961
|
+
init_esm_shims();
|
|
3495
3962
|
async function storybook(options = {}) {
|
|
3496
3963
|
const { csf = "loose" } = options;
|
|
3497
3964
|
await ensurePackages(["eslint-plugin-storybook"]);
|
|
@@ -3547,6 +4014,7 @@ async function storybook(options = {}) {
|
|
|
3547
4014
|
}
|
|
3548
4015
|
|
|
3549
4016
|
// src/configs/test.ts
|
|
4017
|
+
init_esm_shims();
|
|
3550
4018
|
var _pluginTest;
|
|
3551
4019
|
async function test(options = {}) {
|
|
3552
4020
|
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
@@ -3596,6 +4064,7 @@ async function test(options = {}) {
|
|
|
3596
4064
|
}
|
|
3597
4065
|
|
|
3598
4066
|
// src/configs/toml.ts
|
|
4067
|
+
init_esm_shims();
|
|
3599
4068
|
async function toml(options = {}) {
|
|
3600
4069
|
const { files = [GLOB_TOML], overrides = {}, stylistic: stylistic2 = true } = options;
|
|
3601
4070
|
const { indent = 2 } = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
@@ -3645,14 +4114,41 @@ async function toml(options = {}) {
|
|
|
3645
4114
|
];
|
|
3646
4115
|
}
|
|
3647
4116
|
|
|
4117
|
+
// src/configs/tsdoc.ts
|
|
4118
|
+
init_esm_shims();
|
|
4119
|
+
var import_eslint_plugin_tsdoc = __toESM(require_lib(), 1);
|
|
4120
|
+
async function tsdoc(options = {}) {
|
|
4121
|
+
const {
|
|
4122
|
+
overrides = {},
|
|
4123
|
+
severity = "error",
|
|
4124
|
+
type = "base",
|
|
4125
|
+
configFile
|
|
4126
|
+
} = options;
|
|
4127
|
+
const files = options.files ?? [GLOB_TS, GLOB_TSX];
|
|
4128
|
+
return [
|
|
4129
|
+
{
|
|
4130
|
+
files,
|
|
4131
|
+
name: "storm/tsdoc/rules",
|
|
4132
|
+
plugins: {
|
|
4133
|
+
tsdoc: import_eslint_plugin_tsdoc.default
|
|
4134
|
+
},
|
|
4135
|
+
rules: {
|
|
4136
|
+
"tsdoc/syntax": [severity, { type, configFile }],
|
|
4137
|
+
...overrides
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
];
|
|
4141
|
+
}
|
|
4142
|
+
|
|
3648
4143
|
// src/configs/typescript.ts
|
|
4144
|
+
init_esm_shims();
|
|
3649
4145
|
async function typescript(options = {}) {
|
|
3650
4146
|
const {
|
|
3651
4147
|
componentExts = [],
|
|
3652
4148
|
overrides = {},
|
|
3653
4149
|
overridesTypeAware = {},
|
|
3654
4150
|
parserOptions = {},
|
|
3655
|
-
|
|
4151
|
+
typeImports = "always",
|
|
3656
4152
|
type = "app"
|
|
3657
4153
|
} = options;
|
|
3658
4154
|
const files = options.files ?? [
|
|
@@ -3694,10 +4190,6 @@ async function typescript(options = {}) {
|
|
|
3694
4190
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
3695
4191
|
interopDefault(import("@typescript-eslint/parser"))
|
|
3696
4192
|
]);
|
|
3697
|
-
let pluginTsdoc;
|
|
3698
|
-
if (tsdoc !== false && tsdoc !== "off") {
|
|
3699
|
-
pluginTsdoc = await interopDefault(import("eslint-plugin-tsdoc"));
|
|
3700
|
-
}
|
|
3701
4193
|
function makeParser(typeAware, files2, ignores2) {
|
|
3702
4194
|
return {
|
|
3703
4195
|
files: files2,
|
|
@@ -3799,10 +4291,10 @@ async function typescript(options = {}) {
|
|
|
3799
4291
|
"no-use-before-define": "off",
|
|
3800
4292
|
"no-useless-constructor": "off",
|
|
3801
4293
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
3802
|
-
"ts/consistent-type-imports": [
|
|
3803
|
-
"error",
|
|
4294
|
+
"ts/consistent-type-imports": typeImports === "off" ? "off" : [
|
|
4295
|
+
typeImports === "optional" ? "warn" : "error",
|
|
3804
4296
|
{
|
|
3805
|
-
disallowTypeAnnotations:
|
|
4297
|
+
disallowTypeAnnotations: typeImports === "never",
|
|
3806
4298
|
fixStyle: "separate-type-imports",
|
|
3807
4299
|
prefer: "type-imports"
|
|
3808
4300
|
}
|
|
@@ -3848,16 +4340,6 @@ async function typescript(options = {}) {
|
|
|
3848
4340
|
...overrides
|
|
3849
4341
|
}
|
|
3850
4342
|
},
|
|
3851
|
-
pluginTsdoc && {
|
|
3852
|
-
files,
|
|
3853
|
-
name: "storm/typescript/rules-tsdoc",
|
|
3854
|
-
plugins: {
|
|
3855
|
-
tsdoc: pluginTsdoc
|
|
3856
|
-
},
|
|
3857
|
-
rules: {
|
|
3858
|
-
"tsdoc/syntax": tsdoc
|
|
3859
|
-
}
|
|
3860
|
-
},
|
|
3861
4343
|
...[
|
|
3862
4344
|
{
|
|
3863
4345
|
files: filesTypeAware,
|
|
@@ -3873,6 +4355,7 @@ async function typescript(options = {}) {
|
|
|
3873
4355
|
}
|
|
3874
4356
|
|
|
3875
4357
|
// src/configs/unicorn.ts
|
|
4358
|
+
init_esm_shims();
|
|
3876
4359
|
async function unicorn(options = {}) {
|
|
3877
4360
|
return [
|
|
3878
4361
|
{
|
|
@@ -3923,6 +4406,7 @@ async function unicorn(options = {}) {
|
|
|
3923
4406
|
}
|
|
3924
4407
|
|
|
3925
4408
|
// src/configs/unocss.ts
|
|
4409
|
+
init_esm_shims();
|
|
3926
4410
|
async function unocss(options = {}) {
|
|
3927
4411
|
const { attributify = true, strict = false } = options;
|
|
3928
4412
|
await ensurePackages(["@unocss/eslint-plugin"]);
|
|
@@ -3949,6 +4433,7 @@ async function unocss(options = {}) {
|
|
|
3949
4433
|
}
|
|
3950
4434
|
|
|
3951
4435
|
// src/configs/yaml.ts
|
|
4436
|
+
init_esm_shims();
|
|
3952
4437
|
async function yaml(options = {}) {
|
|
3953
4438
|
const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic2 = true } = options;
|
|
3954
4439
|
const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
|
|
@@ -4037,7 +4522,7 @@ function getOverrides(options, key) {
|
|
|
4037
4522
|
}
|
|
4038
4523
|
function getStormConfig(options, ...userConfigs) {
|
|
4039
4524
|
const {
|
|
4040
|
-
|
|
4525
|
+
name: name2,
|
|
4041
4526
|
globals = {},
|
|
4042
4527
|
lineEndings = "unix",
|
|
4043
4528
|
astro: enableAstro = false,
|
|
@@ -4054,6 +4539,7 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
4054
4539
|
storybook: enableStorybook = false,
|
|
4055
4540
|
typescript: enableTypeScript = isPackageExists2("typescript"),
|
|
4056
4541
|
unicorn: enableUnicorn = true,
|
|
4542
|
+
tsdoc: enableTSDoc = true,
|
|
4057
4543
|
unocss: enableUnoCSS = false
|
|
4058
4544
|
} = options;
|
|
4059
4545
|
let isInEditor = options.isInEditor;
|
|
@@ -4097,7 +4583,7 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
4097
4583
|
configs3.push(
|
|
4098
4584
|
ignores(options.ignores),
|
|
4099
4585
|
javascript({
|
|
4100
|
-
|
|
4586
|
+
name: name2,
|
|
4101
4587
|
globals,
|
|
4102
4588
|
lineEndings,
|
|
4103
4589
|
isInEditor,
|
|
@@ -4123,6 +4609,14 @@ function getStormConfig(options, ...userConfigs) {
|
|
|
4123
4609
|
if (enableUnicorn) {
|
|
4124
4610
|
configs3.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
|
|
4125
4611
|
}
|
|
4612
|
+
if (enableTSDoc) {
|
|
4613
|
+
configs3.push(
|
|
4614
|
+
tsdoc({
|
|
4615
|
+
...resolveSubOptions(options, "tsdoc"),
|
|
4616
|
+
overrides: getOverrides(options, "tsdoc")
|
|
4617
|
+
})
|
|
4618
|
+
);
|
|
4619
|
+
}
|
|
4126
4620
|
if (enableJsx) {
|
|
4127
4621
|
configs3.push(jsx());
|
|
4128
4622
|
}
|