@isentinel/eslint-config 3.0.0-beta.6 → 3.0.0-beta.7
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 +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +160 -36
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ 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.7";
|
|
15
15
|
var description = "iSentinel's ESLint config";
|
|
16
16
|
var keywords = [
|
|
17
17
|
"eslint-config",
|
package/dist/index.d.ts
CHANGED
|
@@ -15114,7 +15114,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
15114
15114
|
onlyEquality?: boolean;
|
|
15115
15115
|
}];
|
|
15116
15116
|
// Names of all the configs
|
|
15117
|
-
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/stylistic/ts' | 'isentinel/stylistic/js' | 'isentinel/stylistic/markdown-code' | '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';
|
|
15117
|
+
type ConfigNames = 'isentinel/eslint/comments' | 'isentinel/eslint/comments/src' | 'isentinel/eslint-plugin/setup' | 'isentinel/eslint-plugin/rules' | 'isentinel/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/stylistic/ts' | 'isentinel/stylistic/js' | 'isentinel/stylistic/markdown-code' | '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';
|
|
15118
15118
|
//#endregion
|
|
15119
15119
|
//#region src/types.d.ts
|
|
15120
15120
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -15536,7 +15536,7 @@ declare function sonarjs(options: Required<OptionsIsInEditor>): Promise<Array<Ty
|
|
|
15536
15536
|
*
|
|
15537
15537
|
* @returns An array of flat configuration items.
|
|
15538
15538
|
*/
|
|
15539
|
-
declare function sortGithubAction():
|
|
15539
|
+
declare function sortGithubAction(): Array<TypedFlatConfigItem>;
|
|
15540
15540
|
/**
|
|
15541
15541
|
* Sort tsconfig.json.
|
|
15542
15542
|
*
|
package/dist/index.js
CHANGED
|
@@ -326,40 +326,33 @@ async function comments(options = {}) {
|
|
|
326
326
|
interopDefault(import("@eslint-community/eslint-plugin-eslint-comments")),
|
|
327
327
|
interopDefault(import("@stylistic/eslint-plugin"))
|
|
328
328
|
]);
|
|
329
|
-
return [
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
"style": pluginStylistic
|
|
336
|
-
},
|
|
337
|
-
rules: {
|
|
338
|
-
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
339
|
-
"eslint-comments/no-aggregating-enable": "error",
|
|
340
|
-
"eslint-comments/no-duplicate-disable": "error",
|
|
341
|
-
"eslint-comments/no-unlimited-disable": "error",
|
|
342
|
-
"eslint-comments/no-unused-enable": "error",
|
|
343
|
-
"eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }],
|
|
344
|
-
...stylistic$1 !== false ? {
|
|
345
|
-
"no-inline-comments": "error",
|
|
346
|
-
"style/multiline-comment-style": ["error", "separate-lines"]
|
|
347
|
-
} : {}
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
files: [GLOB_YAML],
|
|
352
|
-
rules: { "no-inline-comments": "off" }
|
|
329
|
+
return [{
|
|
330
|
+
name: "isentinel/eslint/comments",
|
|
331
|
+
plugins: {
|
|
332
|
+
"comment-length": pluginCommentLength,
|
|
333
|
+
"eslint-comments": pluginComments,
|
|
334
|
+
"style": pluginStylistic
|
|
353
335
|
},
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
336
|
+
rules: {
|
|
337
|
+
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
338
|
+
"eslint-comments/no-aggregating-enable": "error",
|
|
339
|
+
"eslint-comments/no-duplicate-disable": "error",
|
|
340
|
+
"eslint-comments/no-unlimited-disable": "error",
|
|
341
|
+
"eslint-comments/no-unused-enable": "error",
|
|
342
|
+
"eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }],
|
|
343
|
+
...stylistic$1 !== false ? {
|
|
344
|
+
"no-inline-comments": "error",
|
|
345
|
+
"style/multiline-comment-style": ["error", "separate-lines"]
|
|
346
|
+
} : {}
|
|
347
|
+
}
|
|
348
|
+
}, ...stylistic$1 !== false ? [{
|
|
349
|
+
files: [GLOB_SRC],
|
|
350
|
+
name: "isentinel/eslint/comments/src",
|
|
351
|
+
rules: { "comment-length/limit-single-line-comments": ["error", {
|
|
352
|
+
maxLength: Number(prettierOptions["jsdocPrintWidth"]) + 2,
|
|
353
|
+
tabSize: prettierOptions.tabWidth
|
|
354
|
+
}] }
|
|
355
|
+
}] : []];
|
|
363
356
|
}
|
|
364
357
|
|
|
365
358
|
//#endregion
|
|
@@ -437,6 +430,11 @@ async function disables() {
|
|
|
437
430
|
"sonar/file-name-differ-from-class": "off",
|
|
438
431
|
"unicorn/filename-case": "off"
|
|
439
432
|
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
files: [GLOB_YAML],
|
|
436
|
+
name: "isentinel/disables/yaml",
|
|
437
|
+
rules: { "no-inline-comments": "off" }
|
|
440
438
|
}
|
|
441
439
|
];
|
|
442
440
|
}
|
|
@@ -496,9 +494,14 @@ async function eslintPlugin(options = {}) {
|
|
|
496
494
|
async function gitignore(options = {}) {
|
|
497
495
|
const { config = true, explicit = false } = options;
|
|
498
496
|
if (config === false) return [];
|
|
499
|
-
if (typeof config !== "boolean")
|
|
497
|
+
if (typeof config !== "boolean") {
|
|
498
|
+
const resolved = await interopDefault(import("eslint-config-flat-gitignore"));
|
|
499
|
+
const configWithName = Object.assign({}, config, { name: "isentinel/gitignore" });
|
|
500
|
+
return [resolved(configWithName)];
|
|
501
|
+
}
|
|
500
502
|
if (fs.existsSync(".gitignore")) return [(await interopDefault(import("eslint-config-flat-gitignore")))({
|
|
501
503
|
files: [".gitignore", ".git/info/exclude"],
|
|
504
|
+
name: "isentinel/gitignore",
|
|
502
505
|
strict: false
|
|
503
506
|
})];
|
|
504
507
|
if (explicit) throw new Error("gitignore option is enabled but no .gitignore file was found in the current directory");
|
|
@@ -5104,9 +5107,9 @@ async function sonarjs(options) {
|
|
|
5104
5107
|
*
|
|
5105
5108
|
* @returns An array of flat configuration items.
|
|
5106
5109
|
*/
|
|
5107
|
-
|
|
5110
|
+
function sortGithubAction() {
|
|
5108
5111
|
return [{
|
|
5109
|
-
files: [`.github/workflows/${GLOB_YAML}
|
|
5112
|
+
files: [`.github/workflows/${GLOB_YAML}`],
|
|
5110
5113
|
name: "isentinel/sort/github-actions",
|
|
5111
5114
|
rules: { "yaml/sort-keys": [
|
|
5112
5115
|
"error",
|
|
@@ -5245,6 +5248,49 @@ async function sortGithubAction() {
|
|
|
5245
5248
|
order: ["group", "cancel-in-progress"],
|
|
5246
5249
|
pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
|
|
5247
5250
|
},
|
|
5251
|
+
{
|
|
5252
|
+
order: [
|
|
5253
|
+
"name",
|
|
5254
|
+
"permissions",
|
|
5255
|
+
"needs",
|
|
5256
|
+
"if",
|
|
5257
|
+
"runs-on",
|
|
5258
|
+
"environment",
|
|
5259
|
+
"concurrency",
|
|
5260
|
+
"outputs",
|
|
5261
|
+
"env",
|
|
5262
|
+
"defaults",
|
|
5263
|
+
"steps",
|
|
5264
|
+
"timeout-minutes",
|
|
5265
|
+
"strategy",
|
|
5266
|
+
"continue-on-error",
|
|
5267
|
+
"container",
|
|
5268
|
+
"services",
|
|
5269
|
+
"uses",
|
|
5270
|
+
"with",
|
|
5271
|
+
"secrets"
|
|
5272
|
+
],
|
|
5273
|
+
pathPattern: "^jobs\\. [^.]+$"
|
|
5274
|
+
},
|
|
5275
|
+
{
|
|
5276
|
+
order: [
|
|
5277
|
+
"id",
|
|
5278
|
+
"if",
|
|
5279
|
+
"name",
|
|
5280
|
+
"uses",
|
|
5281
|
+
"run",
|
|
5282
|
+
"working-directory",
|
|
5283
|
+
"with",
|
|
5284
|
+
"env",
|
|
5285
|
+
"continue-on-error",
|
|
5286
|
+
"timeout-minutes"
|
|
5287
|
+
],
|
|
5288
|
+
pathPattern: "^jobs\\.[^.]+\\.steps\\.[^.]+$"
|
|
5289
|
+
},
|
|
5290
|
+
{
|
|
5291
|
+
order: ["args", "entrypoint"],
|
|
5292
|
+
pathPattern: "^jobs\\.[^.]+\\.steps\\.[^.]+\\.with$"
|
|
5293
|
+
},
|
|
5248
5294
|
{
|
|
5249
5295
|
order: [
|
|
5250
5296
|
"matrix",
|
|
@@ -5253,11 +5299,89 @@ async function sortGithubAction() {
|
|
|
5253
5299
|
],
|
|
5254
5300
|
pathPattern: "^jobs\\.[^.]+\\.strategy$"
|
|
5255
5301
|
},
|
|
5302
|
+
{
|
|
5303
|
+
order: ["include", "exclude"],
|
|
5304
|
+
pathPattern: "^jobs\\.[^.]+\\.strategy\\.matrix$"
|
|
5305
|
+
},
|
|
5306
|
+
{
|
|
5307
|
+
order: [
|
|
5308
|
+
"image",
|
|
5309
|
+
"credentials",
|
|
5310
|
+
"env",
|
|
5311
|
+
"ports",
|
|
5312
|
+
"volumes",
|
|
5313
|
+
"options"
|
|
5314
|
+
],
|
|
5315
|
+
pathPattern: "^jobs\\.[^.]+\\.container$"
|
|
5316
|
+
},
|
|
5317
|
+
{
|
|
5318
|
+
order: [
|
|
5319
|
+
"image",
|
|
5320
|
+
"credentials",
|
|
5321
|
+
"env",
|
|
5322
|
+
"ports",
|
|
5323
|
+
"volumes",
|
|
5324
|
+
"options"
|
|
5325
|
+
],
|
|
5326
|
+
pathPattern: "^jobs\\.[^.]+\\.services\\.[^.]+$"
|
|
5327
|
+
},
|
|
5256
5328
|
{
|
|
5257
5329
|
order: { type: "asc" },
|
|
5258
5330
|
pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
|
|
5259
5331
|
}
|
|
5260
5332
|
] }
|
|
5333
|
+
}, {
|
|
5334
|
+
files: [`.github/actions/${GLOB_YAML}`],
|
|
5335
|
+
name: "isentinel/sort/github-composite-actions",
|
|
5336
|
+
rules: { "yaml/sort-keys": [
|
|
5337
|
+
"error",
|
|
5338
|
+
{
|
|
5339
|
+
order: [
|
|
5340
|
+
"name",
|
|
5341
|
+
"description",
|
|
5342
|
+
"inputs",
|
|
5343
|
+
"outputs",
|
|
5344
|
+
"runs"
|
|
5345
|
+
],
|
|
5346
|
+
pathPattern: "^$"
|
|
5347
|
+
},
|
|
5348
|
+
{
|
|
5349
|
+
order: [
|
|
5350
|
+
"description",
|
|
5351
|
+
"required",
|
|
5352
|
+
"default"
|
|
5353
|
+
],
|
|
5354
|
+
pathPattern: "^inputs\\.[^.]+$"
|
|
5355
|
+
},
|
|
5356
|
+
{
|
|
5357
|
+
order: ["description", "value"],
|
|
5358
|
+
pathPattern: "^outputs\\.[^.]+$"
|
|
5359
|
+
},
|
|
5360
|
+
{
|
|
5361
|
+
order: ["using", "steps"],
|
|
5362
|
+
pathPattern: "^runs$"
|
|
5363
|
+
},
|
|
5364
|
+
{
|
|
5365
|
+
order: [
|
|
5366
|
+
"id",
|
|
5367
|
+
"if",
|
|
5368
|
+
"name",
|
|
5369
|
+
"uses",
|
|
5370
|
+
"run",
|
|
5371
|
+
"working-directory",
|
|
5372
|
+
"with",
|
|
5373
|
+
"env",
|
|
5374
|
+
"shell",
|
|
5375
|
+
"continue-on-error",
|
|
5376
|
+
"timeout-minutes"
|
|
5377
|
+
],
|
|
5378
|
+
pathPattern: "^runs\\.steps\\.[^.]+$"
|
|
5379
|
+
},
|
|
5380
|
+
{
|
|
5381
|
+
order: { type: "asc" },
|
|
5382
|
+
pathPattern: "^(?!^$|inputs\\.[^.]+$|outputs\\.[^.]+$|runs$|runs\\.steps\\.[^.]+$).*"
|
|
5383
|
+
}
|
|
5384
|
+
] }
|
|
5261
5385
|
}];
|
|
5262
5386
|
}
|
|
5263
5387
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.7",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"tsdown": "0.14.2",
|
|
119
119
|
"type-fest": "4.41.0",
|
|
120
120
|
"typescript": "5.8.3",
|
|
121
|
-
"@isentinel/eslint-config": "3.0.0-beta.
|
|
121
|
+
"@isentinel/eslint-config": "3.0.0-beta.7"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"@eslint-react/eslint-plugin": "^1.45.0",
|