@isentinel/eslint-config 3.0.0-beta.3 → 3.0.0-beta.4
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/dist/cli.js +227 -20
- package/dist/index.d.ts +44 -19
- package/dist/index.js +313 -318
- package/package.json +16 -17
package/dist/cli.js
CHANGED
|
@@ -6,12 +6,12 @@ import { hideBin } from "yargs/helpers";
|
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import fsp from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import
|
|
9
|
+
import { existsSync, readFileSync } from "fs";
|
|
10
10
|
import { execSync } from "node:child_process";
|
|
11
11
|
|
|
12
12
|
//#region package.json
|
|
13
13
|
var name = "@isentinel/eslint-config";
|
|
14
|
-
var version = "3.0.0-beta.
|
|
14
|
+
var version = "3.0.0-beta.4";
|
|
15
15
|
var description = "iSentinel's ESLint config";
|
|
16
16
|
var keywords = [
|
|
17
17
|
"eslint-config",
|
|
@@ -79,7 +79,6 @@ var dependencies = {
|
|
|
79
79
|
"eslint-plugin-import-lite": "catalog:prod",
|
|
80
80
|
"eslint-plugin-jsdoc": "catalog:prod",
|
|
81
81
|
"eslint-plugin-jsonc": "catalog:prod",
|
|
82
|
-
"eslint-plugin-n": "catalog:peer",
|
|
83
82
|
"eslint-plugin-no-only-tests": "catalog:prod",
|
|
84
83
|
"eslint-plugin-package-json": "catalog:prod",
|
|
85
84
|
"eslint-plugin-perfectionist": "catalog:prod",
|
|
@@ -94,13 +93,10 @@ var dependencies = {
|
|
|
94
93
|
"eslint-plugin-yml": "catalog:prod",
|
|
95
94
|
"jsonc-eslint-parser": "catalog:prod",
|
|
96
95
|
"local-pkg": "catalog:prod",
|
|
97
|
-
"parse-gitignore-ts": "catalog:prod",
|
|
98
96
|
"prettier": "catalog:prod",
|
|
99
97
|
"prettier-plugin-jsdoc": "catalog:prod",
|
|
100
98
|
"prompts": "catalog:prod",
|
|
101
99
|
"toml-eslint-parser": "catalog:prod",
|
|
102
|
-
"tsdown": "catalog:dev",
|
|
103
|
-
"type-fest": "catalog:prod",
|
|
104
100
|
"yaml-eslint-parser": "catalog:prod",
|
|
105
101
|
"yargs": "catalog:prod"
|
|
106
102
|
};
|
|
@@ -119,7 +115,7 @@ var devDependencies = {
|
|
|
119
115
|
"eslint": "catalog:peer",
|
|
120
116
|
"eslint-plugin-eslint-plugin": "catalog:peer",
|
|
121
117
|
"eslint-plugin-jest": "catalog:peer",
|
|
122
|
-
"eslint-plugin-
|
|
118
|
+
"eslint-plugin-n": "catalog:peer",
|
|
123
119
|
"eslint-plugin-react-roblox-hooks": "catalog:peer",
|
|
124
120
|
"eslint-typegen": "catalog:dev",
|
|
125
121
|
"esno": "catalog:dev",
|
|
@@ -128,9 +124,12 @@ var devDependencies = {
|
|
|
128
124
|
"fs-extra": "catalog:dev",
|
|
129
125
|
"jiti": "catalog:dev",
|
|
130
126
|
"lint-staged": "catalog:dev",
|
|
127
|
+
"parse-gitignore-ts": "catalog:dev",
|
|
131
128
|
"pnpm-workspace-yaml": "catalog:dev",
|
|
132
129
|
"rimraf": "catalog:dev",
|
|
133
130
|
"simple-git-hooks": "catalog:dev",
|
|
131
|
+
"tsdown": "catalog:dev",
|
|
132
|
+
"type-fest": "catalog:dev",
|
|
134
133
|
"typescript": "catalog:dev"
|
|
135
134
|
};
|
|
136
135
|
var peerDependencies = {
|
|
@@ -150,8 +149,8 @@ var peerDependenciesMeta = {
|
|
|
150
149
|
"eslint-plugin-n": { "optional": true },
|
|
151
150
|
"eslint-plugin-react-roblox-hooks": { "optional": true }
|
|
152
151
|
};
|
|
153
|
-
var packageManager = "pnpm@10.
|
|
154
|
-
var engines = { "node": ">=22.
|
|
152
|
+
var packageManager = "pnpm@10.15.1";
|
|
153
|
+
var engines = { "node": ">=22.16.0" };
|
|
155
154
|
var publishConfig = { "access": "public" };
|
|
156
155
|
var package_default = {
|
|
157
156
|
name,
|
|
@@ -233,6 +232,218 @@ const dependenciesMap = {
|
|
|
233
232
|
test: ["eslint-plugin-jest"]
|
|
234
233
|
};
|
|
235
234
|
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region node_modules/.pnpm/parse-gitignore-ts@1.0.0/node_modules/parse-gitignore-ts/dist/index.mjs
|
|
237
|
+
var isObject = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
238
|
+
var INVALID_PATH_CHARS_REGEX = /[<>:"|?*\n\r\t\f\x00-\x1F]/;
|
|
239
|
+
var GLOBSTAR_REGEX = /(?:^|\/)[*]{2}($|\/)/;
|
|
240
|
+
var MAX_PATH_LENGTH = 248;
|
|
241
|
+
var isValidPath = (input) => {
|
|
242
|
+
if (typeof input === "string") return input.length <= MAX_PATH_LENGTH && !INVALID_PATH_CHARS_REGEX.test(input);
|
|
243
|
+
return false;
|
|
244
|
+
};
|
|
245
|
+
var split = (str) => String(str).split(/\r\n?|\n/);
|
|
246
|
+
var isComment = (str) => str.startsWith("#");
|
|
247
|
+
var isParsed = (input) => isObject(input) && "patterns" in input && "sections" in input;
|
|
248
|
+
var patterns = (input) => {
|
|
249
|
+
return split(input).map((l) => l.trim()).filter((line) => line !== "" && !isComment(line));
|
|
250
|
+
};
|
|
251
|
+
var parse = (input, options = {}) => {
|
|
252
|
+
let filepath = options.path;
|
|
253
|
+
if (isParsed(input)) return input;
|
|
254
|
+
if (isValidPath(input) && existsSync(input)) {
|
|
255
|
+
filepath = input;
|
|
256
|
+
input = readFileSync(input);
|
|
257
|
+
}
|
|
258
|
+
const lines = split(input);
|
|
259
|
+
const names = /* @__PURE__ */ new Map();
|
|
260
|
+
const parsed = {
|
|
261
|
+
sections: [],
|
|
262
|
+
patterns: []
|
|
263
|
+
};
|
|
264
|
+
let section = {
|
|
265
|
+
name: "default",
|
|
266
|
+
patterns: []
|
|
267
|
+
};
|
|
268
|
+
let prev = null;
|
|
269
|
+
for (const line of lines) {
|
|
270
|
+
const value = line.trim();
|
|
271
|
+
if (value.startsWith("#")) {
|
|
272
|
+
const match = /^#+\s*(.*)\s*$/.exec(value);
|
|
273
|
+
const name$1 = match ? match[1] : "";
|
|
274
|
+
if (prev) {
|
|
275
|
+
names.delete(prev.name);
|
|
276
|
+
prev.comment = prev.comment ? `${prev.comment}
|
|
277
|
+
${value}` : value;
|
|
278
|
+
prev.name = name$1 ? `${prev.name.trim()}
|
|
279
|
+
${name$1.trim()}` : prev.name.trim();
|
|
280
|
+
names.set(prev.name.toLowerCase().trim(), prev);
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
section = {
|
|
284
|
+
name: name$1.trim(),
|
|
285
|
+
comment: value,
|
|
286
|
+
patterns: []
|
|
287
|
+
};
|
|
288
|
+
names.set(section.name.toLowerCase(), section);
|
|
289
|
+
parsed.sections.push(section);
|
|
290
|
+
prev = section;
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
if (value !== "") {
|
|
294
|
+
section.patterns.push(value);
|
|
295
|
+
parsed.patterns.push(value);
|
|
296
|
+
}
|
|
297
|
+
prev = null;
|
|
298
|
+
}
|
|
299
|
+
if (options.dedupe === true || options.unique === true) return dedupe(parsed, {
|
|
300
|
+
...options,
|
|
301
|
+
format: false
|
|
302
|
+
});
|
|
303
|
+
parsed.path = filepath;
|
|
304
|
+
parsed.input = Buffer.from(input.toString());
|
|
305
|
+
const result = parsed;
|
|
306
|
+
result.format = (opts = {}) => format(result, {
|
|
307
|
+
...options,
|
|
308
|
+
...opts
|
|
309
|
+
});
|
|
310
|
+
result.dedupe = (opts = {}) => dedupe(result, {
|
|
311
|
+
...options,
|
|
312
|
+
...opts
|
|
313
|
+
});
|
|
314
|
+
result.globs = (opts = {}) => globs(result, {
|
|
315
|
+
path: filepath,
|
|
316
|
+
...options,
|
|
317
|
+
...opts
|
|
318
|
+
});
|
|
319
|
+
return result;
|
|
320
|
+
};
|
|
321
|
+
var parseFile = (filepath, options = {}) => {
|
|
322
|
+
return parse(readFileSync(filepath, "utf8"), options);
|
|
323
|
+
};
|
|
324
|
+
var dedupe = (input, options = {}) => {
|
|
325
|
+
const parsed = parse(input, {
|
|
326
|
+
...options,
|
|
327
|
+
dedupe: false
|
|
328
|
+
});
|
|
329
|
+
const names = /* @__PURE__ */ new Map();
|
|
330
|
+
const res = {
|
|
331
|
+
sections: [],
|
|
332
|
+
patterns: []
|
|
333
|
+
};
|
|
334
|
+
const patternsSet = /* @__PURE__ */ new Set();
|
|
335
|
+
let current;
|
|
336
|
+
for (const section of parsed.sections) {
|
|
337
|
+
const { name: name$1 = "", comment, patterns: patterns2 } = section;
|
|
338
|
+
const key = name$1.trim().toLowerCase();
|
|
339
|
+
for (const pattern of patterns2) patternsSet.add(pattern);
|
|
340
|
+
if (name$1 && names.has(key)) {
|
|
341
|
+
current = names.get(key);
|
|
342
|
+
current.patterns = [...current.patterns, ...patterns2];
|
|
343
|
+
} else {
|
|
344
|
+
current = {
|
|
345
|
+
name: name$1,
|
|
346
|
+
comment,
|
|
347
|
+
patterns: patterns2
|
|
348
|
+
};
|
|
349
|
+
res.sections.push(current);
|
|
350
|
+
names.set(key, current);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
for (const section of res.sections) section.patterns = [...new Set(section.patterns)];
|
|
354
|
+
res.patterns = [...patternsSet];
|
|
355
|
+
const result = res;
|
|
356
|
+
result.format = (opts = {}) => format(result, {
|
|
357
|
+
...options,
|
|
358
|
+
...opts
|
|
359
|
+
});
|
|
360
|
+
result.dedupe = (opts = {}) => dedupe(result, {
|
|
361
|
+
...options,
|
|
362
|
+
...opts
|
|
363
|
+
});
|
|
364
|
+
result.globs = (opts = {}) => globs(result, {
|
|
365
|
+
path: parsed.path,
|
|
366
|
+
...options,
|
|
367
|
+
...opts
|
|
368
|
+
});
|
|
369
|
+
return result;
|
|
370
|
+
};
|
|
371
|
+
var glob = (pattern, options) => {
|
|
372
|
+
if (GLOBSTAR_REGEX.test(pattern)) return pattern;
|
|
373
|
+
let relative = false;
|
|
374
|
+
if (pattern.startsWith("/")) {
|
|
375
|
+
pattern = pattern.slice(1);
|
|
376
|
+
relative = true;
|
|
377
|
+
} else if (pattern.slice(1, pattern.length - 1).includes("/")) relative = true;
|
|
378
|
+
pattern += pattern.endsWith("/") ? "**/" : "/**";
|
|
379
|
+
return relative ? pattern : `**/${pattern}`;
|
|
380
|
+
};
|
|
381
|
+
var globs = (input, options = {}) => {
|
|
382
|
+
const parsed = parse(input, options);
|
|
383
|
+
const result = [];
|
|
384
|
+
let index = 0;
|
|
385
|
+
const inputPatterns = parsed.patterns.concat(options.ignore || []).concat((options.unignore || []).map((p) => !p.startsWith("!") ? "!" + p : p));
|
|
386
|
+
const push = (prefix, pattern) => {
|
|
387
|
+
const prev = result[result.length - 1];
|
|
388
|
+
const type$1 = prefix ? "unignore" : "ignore";
|
|
389
|
+
if (prev && prev.type === type$1) {
|
|
390
|
+
if (!prev.patterns.includes(pattern)) prev.patterns.push(pattern);
|
|
391
|
+
} else {
|
|
392
|
+
result.push({
|
|
393
|
+
type: type$1,
|
|
394
|
+
path: options.path || null,
|
|
395
|
+
patterns: [pattern],
|
|
396
|
+
index
|
|
397
|
+
});
|
|
398
|
+
index++;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
for (let pattern of inputPatterns) {
|
|
402
|
+
let prefix = "";
|
|
403
|
+
if (pattern.startsWith("!")) {
|
|
404
|
+
pattern = pattern.slice(1);
|
|
405
|
+
prefix = "!";
|
|
406
|
+
}
|
|
407
|
+
push(prefix, pattern.startsWith("/") ? pattern.slice(1) : pattern);
|
|
408
|
+
push(prefix, glob(pattern));
|
|
409
|
+
}
|
|
410
|
+
return result;
|
|
411
|
+
};
|
|
412
|
+
var formatSection = (section = {
|
|
413
|
+
name: "",
|
|
414
|
+
patterns: []
|
|
415
|
+
}) => {
|
|
416
|
+
const output = [section.comment || ""];
|
|
417
|
+
if (section.patterns?.length) {
|
|
418
|
+
output.push(section.patterns.join("\n"));
|
|
419
|
+
output.push("");
|
|
420
|
+
}
|
|
421
|
+
return output.join("\n");
|
|
422
|
+
};
|
|
423
|
+
var format = (input, options = {}) => {
|
|
424
|
+
const parsed = parse(input, options);
|
|
425
|
+
const fn = options.formatSection || formatSection;
|
|
426
|
+
const sections = parsed.sections || parsed;
|
|
427
|
+
const output = [];
|
|
428
|
+
for (const section of [].concat(sections)) output.push(fn(section));
|
|
429
|
+
return output.join("\n");
|
|
430
|
+
};
|
|
431
|
+
var parseGitignore = parse;
|
|
432
|
+
parseGitignore.file = parseFile;
|
|
433
|
+
parseGitignore.parse = parse;
|
|
434
|
+
parseGitignore.dedupe = dedupe;
|
|
435
|
+
parseGitignore.format = format;
|
|
436
|
+
parseGitignore.globs = globs;
|
|
437
|
+
parseGitignore.formatSection = formatSection;
|
|
438
|
+
parseGitignore.patterns = patterns;
|
|
439
|
+
var index_default = parseGitignore;
|
|
440
|
+
/*!
|
|
441
|
+
* parse-gitignore-ts
|
|
442
|
+
* TypeScript version of parse-gitignore <https://github.com/jonschlinkert/parse-gitignore>
|
|
443
|
+
* Original Copyright (c) 2015-present, Jon Schlinkert.
|
|
444
|
+
* Released under the MIT License.
|
|
445
|
+
*/
|
|
446
|
+
|
|
236
447
|
//#endregion
|
|
237
448
|
//#region src/cli/utils.ts
|
|
238
449
|
function getEslintConfigContent(mainConfig, additionalConfigs) {
|
|
@@ -260,24 +471,21 @@ async function updateEslintFiles(result) {
|
|
|
260
471
|
const pathESLintIgnore = path.join(cwd, ".eslintignore");
|
|
261
472
|
const pathPackageJSON = path.join(cwd, "package.json");
|
|
262
473
|
const packageContent = await fsp.readFile(pathPackageJSON, "utf-8");
|
|
263
|
-
const
|
|
264
|
-
const configFileName = parsedPackage.type === "module" ? "eslint.config.js" : "eslint.config.mjs";
|
|
474
|
+
const configFileName = JSON.parse(packageContent).type === "module" ? "eslint.config.js" : "eslint.config.mjs";
|
|
265
475
|
const pathFlatConfig = path.join(cwd, configFileName);
|
|
266
476
|
const eslintIgnores = [];
|
|
267
477
|
if (fs.existsSync(pathESLintIgnore)) {
|
|
268
478
|
log.step(ansis.cyan("Migrating existing .eslintignore"));
|
|
269
479
|
const content = await fsp.readFile(pathESLintIgnore, "utf-8");
|
|
270
|
-
const
|
|
271
|
-
const globs
|
|
272
|
-
|
|
273
|
-
else eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
|
|
480
|
+
const globs$1 = index_default(content).globs();
|
|
481
|
+
for (const glob$1 of globs$1) if (glob$1.type === "ignore") eslintIgnores.push(...glob$1.patterns);
|
|
482
|
+
else eslintIgnores.push(...glob$1.patterns.map((pattern) => `!${pattern}`));
|
|
274
483
|
}
|
|
275
484
|
const configLines = [];
|
|
276
485
|
if (eslintIgnores.length) configLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);
|
|
277
486
|
for (const framework of result.frameworks) configLines.push(`${framework}: true,`);
|
|
278
487
|
const mainConfig = configLines.map((index) => ` ${index}`).join("\n");
|
|
279
|
-
const
|
|
280
|
-
const eslintConfigContent = getEslintConfigContent(mainConfig, additionalConfig);
|
|
488
|
+
const eslintConfigContent = getEslintConfigContent(mainConfig, []);
|
|
281
489
|
await fsp.writeFile(pathFlatConfig, eslintConfigContent);
|
|
282
490
|
log.success(ansis.green(`Created ${configFileName}`));
|
|
283
491
|
const files$1 = fs.readdirSync(cwd);
|
|
@@ -401,7 +609,7 @@ function header() {
|
|
|
401
609
|
const versionText = `v${package_default.version}`;
|
|
402
610
|
intro(introText + ansis.dim(versionText));
|
|
403
611
|
}
|
|
404
|
-
|
|
612
|
+
yargs(hideBin(process.argv)).scriptName("@isentinel/eslint-config").usage("").command("*", "Run the initialization or migration", (args) => {
|
|
405
613
|
return args.option("yes", {
|
|
406
614
|
alias: "y",
|
|
407
615
|
description: "Skip prompts and use default values",
|
|
@@ -423,8 +631,7 @@ const instance = yargs(hideBin(process.argv)).scriptName("@isentinel/eslint-conf
|
|
|
423
631
|
log.error(ansis.red(`✘ ${String(err)}`));
|
|
424
632
|
process.exit(1);
|
|
425
633
|
}
|
|
426
|
-
}).showHelpOnFail(false).alias("h", "help").version("version", package_default.version).alias("v", "version");
|
|
427
|
-
instance.help().argv;
|
|
634
|
+
}).showHelpOnFail(false).alias("h", "help").version("version", package_default.version).alias("v", "version").help().argv;
|
|
428
635
|
|
|
429
636
|
//#endregion
|
|
430
637
|
export { };
|
package/dist/index.d.ts
CHANGED
|
@@ -115,12 +115,12 @@ interface RuleOptions {
|
|
|
115
115
|
'arrow-spacing'?: Linter.RuleEntry<ArrowSpacing>;
|
|
116
116
|
/**
|
|
117
117
|
* Enforce consistent arrow function return style based on length, multiline expressions, JSX usage, and export context
|
|
118
|
-
* @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.
|
|
118
|
+
* @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.6/src/rules/arrow-return-style/documentation.md
|
|
119
119
|
*/
|
|
120
120
|
'arrow-style/arrow-return-style'?: Linter.RuleEntry<ArrowStyleArrowReturnStyle>;
|
|
121
121
|
/**
|
|
122
122
|
* Disallow anonymous arrow functions as export default declarations
|
|
123
|
-
* @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.
|
|
123
|
+
* @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.6/src/rules/no-export-default-arrow/documentation.md
|
|
124
124
|
*/
|
|
125
125
|
'arrow-style/no-export-default-arrow'?: Linter.RuleEntry<[]>;
|
|
126
126
|
/**
|
|
@@ -1206,7 +1206,7 @@ interface RuleOptions {
|
|
|
1206
1206
|
* Enforce heading levels increment by one
|
|
1207
1207
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
1208
1208
|
*/
|
|
1209
|
-
'markdown/heading-increment'?: Linter.RuleEntry<
|
|
1209
|
+
'markdown/heading-increment'?: Linter.RuleEntry<MarkdownHeadingIncrement>;
|
|
1210
1210
|
/**
|
|
1211
1211
|
* Disallow bare URLs
|
|
1212
1212
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md
|
|
@@ -1251,7 +1251,7 @@ interface RuleOptions {
|
|
|
1251
1251
|
* Disallow headings without a space after the hash characters
|
|
1252
1252
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md
|
|
1253
1253
|
*/
|
|
1254
|
-
'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<
|
|
1254
|
+
'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<MarkdownNoMissingAtxHeadingSpace>;
|
|
1255
1255
|
/**
|
|
1256
1256
|
* Disallow missing label references
|
|
1257
1257
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md
|
|
@@ -1272,6 +1272,11 @@ interface RuleOptions {
|
|
|
1272
1272
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
|
|
1273
1273
|
*/
|
|
1274
1274
|
'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Disallow spaces around emphasis markers
|
|
1277
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md
|
|
1278
|
+
*/
|
|
1279
|
+
'markdown/no-space-in-emphasis'?: Linter.RuleEntry<MarkdownNoSpaceInEmphasis>;
|
|
1275
1280
|
/**
|
|
1276
1281
|
* Disallow unused definitions
|
|
1277
1282
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
|
|
@@ -4288,7 +4293,7 @@ interface RuleOptions {
|
|
|
4288
4293
|
*/
|
|
4289
4294
|
'sonar/no-equals-in-for-termination'?: Linter.RuleEntry<[]>;
|
|
4290
4295
|
/**
|
|
4291
|
-
* Exclusive tests should not be
|
|
4296
|
+
* Exclusive tests should not be committed to version control
|
|
4292
4297
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6426/javascript
|
|
4293
4298
|
*/
|
|
4294
4299
|
'sonar/no-exclusive-tests'?: Linter.RuleEntry<[]>;
|
|
@@ -4492,11 +4497,6 @@ interface RuleOptions {
|
|
|
4492
4497
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4624/javascript
|
|
4493
4498
|
*/
|
|
4494
4499
|
'sonar/no-nested-template-literals'?: Linter.RuleEntry<[]>;
|
|
4495
|
-
/**
|
|
4496
|
-
* Loops with at most one iteration should be refactored
|
|
4497
|
-
* @see https://sonarsource.github.io/rspec/#/rspec/S1751/javascript
|
|
4498
|
-
*/
|
|
4499
|
-
'sonar/no-one-iteration-loop'?: Linter.RuleEntry<[]>;
|
|
4500
4500
|
/**
|
|
4501
4501
|
* Searching OS commands in PATH is security-sensitive
|
|
4502
4502
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4036/javascript
|
|
@@ -4957,7 +4957,6 @@ interface RuleOptions {
|
|
|
4957
4957
|
/**
|
|
4958
4958
|
* Loop counters should not be assigned within the loop body
|
|
4959
4959
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2310/javascript
|
|
4960
|
-
* @deprecated
|
|
4961
4960
|
*/
|
|
4962
4961
|
'sonar/updated-loop-counter'?: Linter.RuleEntry<[]>;
|
|
4963
4962
|
/**
|
|
@@ -9149,6 +9148,10 @@ type LogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
|
9149
9148
|
type MarkdownFencedCodeLanguage = [] | [{
|
|
9150
9149
|
required?: string[];
|
|
9151
9150
|
}];
|
|
9151
|
+
// ----- markdown/heading-increment -----
|
|
9152
|
+
type MarkdownHeadingIncrement = [] | [{
|
|
9153
|
+
frontmatterTitle?: string;
|
|
9154
|
+
}];
|
|
9152
9155
|
// ----- markdown/no-duplicate-definitions -----
|
|
9153
9156
|
type MarkdownNoDuplicateDefinitions = [] | [{
|
|
9154
9157
|
allowDefinitions?: string[];
|
|
@@ -9167,6 +9170,11 @@ type MarkdownNoEmptyDefinitions = [] | [{
|
|
|
9167
9170
|
// ----- markdown/no-html -----
|
|
9168
9171
|
type MarkdownNoHtml = [] | [{
|
|
9169
9172
|
allowed?: string[];
|
|
9173
|
+
allowedIgnoreCase?: boolean;
|
|
9174
|
+
}];
|
|
9175
|
+
// ----- markdown/no-missing-atx-heading-space -----
|
|
9176
|
+
type MarkdownNoMissingAtxHeadingSpace = [] | [{
|
|
9177
|
+
checkClosedHeadings?: boolean;
|
|
9170
9178
|
}];
|
|
9171
9179
|
// ----- markdown/no-missing-link-fragments -----
|
|
9172
9180
|
type MarkdownNoMissingLinkFragments = [] | [{
|
|
@@ -9177,6 +9185,10 @@ type MarkdownNoMissingLinkFragments = [] | [{
|
|
|
9177
9185
|
type MarkdownNoMultipleH1 = [] | [{
|
|
9178
9186
|
frontmatterTitle?: string;
|
|
9179
9187
|
}];
|
|
9188
|
+
// ----- markdown/no-space-in-emphasis -----
|
|
9189
|
+
type MarkdownNoSpaceInEmphasis = [] | [{
|
|
9190
|
+
checkStrikethrough?: boolean;
|
|
9191
|
+
}];
|
|
9180
9192
|
// ----- markdown/no-unused-definitions -----
|
|
9181
9193
|
type MarkdownNoUnusedDefinitions = [] | [{
|
|
9182
9194
|
allowDefinitions?: string[];
|
|
@@ -15066,7 +15078,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
15066
15078
|
onlyEquality?: boolean;
|
|
15067
15079
|
}];
|
|
15068
15080
|
// Names of all the configs
|
|
15069
|
-
type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/node/rules' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/prettier/setup' | 'isentinel/prettier' | 'isentinel/prettier/css' | 'isentinel/prettier/scss' | 'isentinel/prettier/less' | 'isentinel/prettier/html' | 'isentinel/prettier/markdown' | 'isentinel/prettier/graphql' | 'isentinel/prettier/json' | 'isentinel/prettier/yaml' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/shopify' | 'isentinel/sonarjs' | 'isentinel/sort-tsconfig' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/unicorn' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
|
|
15081
|
+
type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'gitignore' | 'isentinel/ignores' | 'isentinel/imports/rules' | 'isentinel/imports/game' | 'isentinel/javascript/setup' | 'isentinel/javascript/rules' | 'isentinel/jsdoc/setup' | 'isentinel/jsdoc' | 'isentinel/jsonc/setup' | 'isentinel/jsonc/rules' | 'isentinel/markdown/setup' | 'isentinel/markdown/processor' | 'isentinel/markdown/parser' | 'isentinel/markdown/disables' | 'isentinel/node/rules' | 'isentinel/package-json/setup' | 'isentinel/package-json' | 'isentinel/perfectionist/setup' | 'isentinel/perfectionist' | 'isentinel/pnpm/setup' | 'isentinel/pnpm/package-json' | 'isentinel/pnpm/pnpm-workspace-yaml' | 'isentinel/prettier/setup' | 'isentinel/prettier/javascript' | 'isentinel/prettier' | 'isentinel/prettier/css' | 'isentinel/prettier/scss' | 'isentinel/prettier/less' | 'isentinel/prettier/html' | 'isentinel/prettier/markdown' | 'isentinel/prettier/graphql' | 'isentinel/prettier/json' | 'isentinel/prettier/yaml' | 'isentinel/promise' | 'isentinel/react/setup' | 'isentinel/react/rules' | 'isentinel/react/type-aware-rules' | 'isentinel/roblox/setup' | 'isentinel/roblox/parser' | 'isentinel/roblox/type-aware-parser' | 'isentinel/roblox' | 'isentinel/roblox/rules-type-aware' | 'isentinel/roblox/format-lua/setup' | 'isentinel/roblox/format-lua' | 'isentinel/shopify' | 'isentinel/sonarjs' | 'isentinel/sort-tsconfig' | 'isentinel/spelling/setup' | 'isentinel/spelling' | 'isentinel/stylistic/setup' | 'isentinel/stylistic' | 'isentinel/test/jest/setup' | 'isentinel/test/jest/rules' | 'isentinel/toml/setup' | 'isentinel/toml/rules' | 'isentinel/typescript/setup' | 'isentinel/typescript/parser' | 'isentinel/typescript/type-aware-parser' | 'isentinel/typescript/rules' | 'isentinel/typescript/rules-type-aware' | 'isentinel/unicorn' | 'isentinel/unicorn/root' | 'isentinel/yaml/setup' | 'isentinel/yaml/rules';
|
|
15070
15082
|
//#endregion
|
|
15071
15083
|
//#region src/types.d.ts
|
|
15072
15084
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -15119,6 +15131,10 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsProjectType {
|
|
|
15119
15131
|
* @default auto-detect based on the process.env
|
|
15120
15132
|
*/
|
|
15121
15133
|
isInEditor?: boolean;
|
|
15134
|
+
/**
|
|
15135
|
+
* Core rules. Can't be disabled.
|
|
15136
|
+
*/
|
|
15137
|
+
javascript?: OptionsOverrides;
|
|
15122
15138
|
/**
|
|
15123
15139
|
* Enable JSDoc support.
|
|
15124
15140
|
*
|
|
@@ -15321,7 +15337,7 @@ interface OptionsTypeScriptParserOptions {
|
|
|
15321
15337
|
* virtual files created by processors (e.g., markdown TypeScript code
|
|
15322
15338
|
* blocks).
|
|
15323
15339
|
*
|
|
15324
|
-
* @default \["**\/*.md
|
|
15340
|
+
* @default \["**\/*.md\/**"]
|
|
15325
15341
|
*/
|
|
15326
15342
|
ignoresTypeAware?: Array<string>;
|
|
15327
15343
|
/** Additional parser options for TypeScript. */
|
|
@@ -15351,7 +15367,7 @@ interface PerfectionistConfig {
|
|
|
15351
15367
|
type ReactConfig = ESLintReactSettings & OptionsOverrides & {
|
|
15352
15368
|
filenameCase?: "kebabCase" | "pascalCase";
|
|
15353
15369
|
};
|
|
15354
|
-
|
|
15370
|
+
type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
|
|
15355
15371
|
interface SpellCheckConfig {
|
|
15356
15372
|
/**
|
|
15357
15373
|
* Whether or not to run the spell checker in the editor.
|
|
@@ -15369,15 +15385,24 @@ interface SpellCheckConfig {
|
|
|
15369
15385
|
type StylisticConfig = Pick<StylisticCustomizeOptions, "indent" | "jsx" | "quotes" | "semi"> & {
|
|
15370
15386
|
arrowLength?: number;
|
|
15371
15387
|
};
|
|
15388
|
+
/**
|
|
15389
|
+
* An updated version of ESLint's `Linter.Config`, which provides autocompletion
|
|
15390
|
+
* for `rules` and relaxes type limitations for `plugins` and `rules`, because
|
|
15391
|
+
* many plugins still lack proper type definitions.
|
|
15392
|
+
*/
|
|
15372
15393
|
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
15373
15394
|
/**
|
|
15374
|
-
* An object containing a name-value mapping of plugin names to plugin
|
|
15375
|
-
*
|
|
15376
|
-
* the matching files.
|
|
15395
|
+
* An object containing a name-value mapping of plugin names to plugin objects.
|
|
15396
|
+
* When `files` is specified, these plugins are only available to the matching files.
|
|
15377
15397
|
*
|
|
15378
15398
|
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
15379
15399
|
*/
|
|
15380
15400
|
plugins?: Record<string, any>;
|
|
15401
|
+
/**
|
|
15402
|
+
* An object containing the configured rules. When `files` or `ignores` are
|
|
15403
|
+
* specified, these rule configurations are only available to the matching files.
|
|
15404
|
+
*/
|
|
15405
|
+
rules?: Rules;
|
|
15381
15406
|
};
|
|
15382
15407
|
//#endregion
|
|
15383
15408
|
//#region src/configs/comments.d.ts
|
|
@@ -15403,7 +15428,7 @@ declare function ignores(userIgnores?: Array<string>): Promise<Array<TypedFlatCo
|
|
|
15403
15428
|
declare function imports(options?: OptionsProjectType & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
15404
15429
|
//#endregion
|
|
15405
15430
|
//#region src/configs/javascript.d.ts
|
|
15406
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<Array<TypedFlatConfigItem>>;
|
|
15431
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
15407
15432
|
//#endregion
|
|
15408
15433
|
//#region src/configs/jsdoc.d.ts
|
|
15409
15434
|
declare function jsdoc(options?: JsDocOptions & OptionsProjectType & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
@@ -15487,7 +15512,7 @@ declare function stylistic(options?: StylisticConfig, prettierOptions?: Prettier
|
|
|
15487
15512
|
declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
15488
15513
|
//#endregion
|
|
15489
15514
|
//#region src/configs/typescript.d.ts
|
|
15490
|
-
declare function typescript(options?: OptionsComponentExtensions & OptionsFiles &
|
|
15515
|
+
declare function typescript(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & OptionsStylistic & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
|
|
15491
15516
|
//#endregion
|
|
15492
15517
|
//#region src/configs/unicorn.d.ts
|
|
15493
15518
|
declare function unicorn(options?: OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|