@isentinel/eslint-config 3.0.0-beta.5 → 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/chunk-BLXvPPr8.js +30 -0
- package/dist/cli.js +2 -1
- package/dist/index.d.ts +15 -6
- package/dist/index.js +191 -79
- package/dist/lib-BHBu_Td_.js +10936 -0
- package/package.json +3 -2
- /package/dist/{dist-CRJXXCjc.js → dist-BZ6CjJ0d.js} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJS = (cb, mod) => function() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { __commonJS, __require, __toESM };
|
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",
|
|
@@ -114,6 +114,7 @@ var devDependencies = {
|
|
|
114
114
|
"@vitest/eslint-plugin": "catalog:peer",
|
|
115
115
|
"bumpp": "catalog:dev",
|
|
116
116
|
"eslint": "catalog:peer",
|
|
117
|
+
"eslint-plugin-erasable-syntax-only": "catalog:peer",
|
|
117
118
|
"eslint-plugin-eslint-plugin": "catalog:peer",
|
|
118
119
|
"eslint-plugin-jest": "catalog:peer",
|
|
119
120
|
"eslint-plugin-n": "catalog:peer",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Options, Options as PrettierOptions } from "prettier";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
3
|
import { FlatConfig } from "@eslint/compat";
|
|
4
|
+
import { Linter } from "eslint";
|
|
4
5
|
import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
5
6
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
6
7
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
7
8
|
import { ESLintReactSettings } from "@eslint-react/shared";
|
|
8
|
-
import { Linter } from "eslint";
|
|
9
9
|
|
|
10
10
|
//#region src/typegen.d.ts
|
|
11
11
|
interface RuleOptions {
|
|
@@ -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/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;
|
|
@@ -15360,7 +15360,16 @@ interface OptionsTestFramework {
|
|
|
15360
15360
|
/** Enable Vitest support. */
|
|
15361
15361
|
vitest?: boolean;
|
|
15362
15362
|
}
|
|
15363
|
-
type OptionsTypescript = (OptionsOverrides & OptionsTypeScriptParserOptions) | (OptionsOverrides & OptionsTypeScriptWithTypes);
|
|
15363
|
+
type OptionsTypescript = (OptionsOverrides & OptionsTypeScriptErasableOnly & OptionsTypeScriptParserOptions) | (OptionsOverrides & OptionsTypeScriptErasableOnly & OptionsTypeScriptWithTypes);
|
|
15364
|
+
interface OptionsTypeScriptErasableOnly {
|
|
15365
|
+
/**
|
|
15366
|
+
* Enable erasable syntax only rules.
|
|
15367
|
+
*
|
|
15368
|
+
* @see https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only
|
|
15369
|
+
* @default false
|
|
15370
|
+
*/
|
|
15371
|
+
erasableOnly?: boolean;
|
|
15372
|
+
}
|
|
15364
15373
|
interface OptionsTypeScriptParserOptions {
|
|
15365
15374
|
/**
|
|
15366
15375
|
* Glob patterns for files that should be type aware.
|
|
@@ -15527,7 +15536,7 @@ declare function sonarjs(options: Required<OptionsIsInEditor>): Promise<Array<Ty
|
|
|
15527
15536
|
*
|
|
15528
15537
|
* @returns An array of flat configuration items.
|
|
15529
15538
|
*/
|
|
15530
|
-
declare function sortGithubAction():
|
|
15539
|
+
declare function sortGithubAction(): Array<TypedFlatConfigItem>;
|
|
15531
15540
|
/**
|
|
15532
15541
|
* Sort tsconfig.json.
|
|
15533
15542
|
*
|
|
@@ -15548,7 +15557,7 @@ declare function stylistic(options?: StylisticConfig, prettierOptions?: Prettier
|
|
|
15548
15557
|
declare function toml(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
15549
15558
|
//#endregion
|
|
15550
15559
|
//#region src/configs/typescript.d.ts
|
|
15551
|
-
declare function typescript(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & OptionsStylistic & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
|
|
15560
|
+
declare function typescript(options?: OptionsComponentExtensions & OptionsFiles & OptionsOverrides & OptionsStylistic & OptionsTypeScriptErasableOnly & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes): Promise<Array<TypedFlatConfigItem>>;
|
|
15552
15561
|
//#endregion
|
|
15553
15562
|
//#region src/configs/unicorn.d.ts
|
|
15554
15563
|
declare function unicorn(options?: OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
|
@@ -15742,4 +15751,4 @@ declare function resolveWithDefaults<T>(value: boolean | T | undefined, defaults
|
|
|
15742
15751
|
*/
|
|
15743
15752
|
declare function shouldEnableFeature<T extends Record<string, any>>(options: boolean | T | undefined, key: keyof T, defaultValue?: boolean): boolean;
|
|
15744
15753
|
//#endregion
|
|
15745
|
-
export { Awaitable, type ConfigNames, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_ROOT, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, GitignoreOptions, JsDocOptions, OptionsComponentExtensions, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRoblox, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, PerfectionistConfig, type PrettierOptions, PrettierRuleOptions, ReactConfig, ResolvedOptions, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, createTsParser, isentinel as default, defaultPluginRenaming, disables, ensurePackages, eslintPlugin, getOverrides, getTsConfig, gitignore, ignores, imports, interopDefault, isInEditorEnvironment, isInGitHooksOrLintStaged, isentinel, javascript, jsdoc, jsonc, markdown, mergePrettierOptions, node, packageJson, parserPlain, perfectionist, pnpm, prettier, promise, react, renamePluginInConfigs, renameRules, require, resolvePrettierConfigOptions, resolveSubOptions, resolveWithDefaults, roblox, shopify, shouldEnableFeature, sonarjs, sortGithubAction, sortTsconfig, spelling, stylistic, toml, typescript, unicorn, yaml };
|
|
15754
|
+
export { Awaitable, type ConfigNames, GLOB_ALL_JSON, GLOB_ALL_SRC, GLOB_BUILD_TOOLS, GLOB_CSS, GLOB_DTS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LUA, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_ROOT, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, GitignoreOptions, JsDocOptions, OptionsComponentExtensions, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRoblox, OptionsStylistic, OptionsTestFramework, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, PerfectionistConfig, type PrettierOptions, PrettierRuleOptions, ReactConfig, ResolvedOptions, Rules, SpellCheckConfig, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, createTsParser, isentinel as default, defaultPluginRenaming, disables, ensurePackages, eslintPlugin, getOverrides, getTsConfig, gitignore, ignores, imports, interopDefault, isInEditorEnvironment, isInGitHooksOrLintStaged, isentinel, javascript, jsdoc, jsonc, markdown, mergePrettierOptions, node, packageJson, parserPlain, perfectionist, pnpm, prettier, promise, react, renamePluginInConfigs, renameRules, require, resolvePrettierConfigOptions, resolveSubOptions, resolveWithDefaults, roblox, shopify, shouldEnableFeature, sonarjs, sortGithubAction, sortTsconfig, spelling, stylistic, toml, typescript, unicorn, yaml };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __commonJS, __toESM } from "./chunk-BLXvPPr8.js";
|
|
1
2
|
import { createRequire } from "node:module";
|
|
2
3
|
import process from "node:process";
|
|
3
4
|
import fs from "node:fs";
|
|
@@ -9,32 +10,6 @@ import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
|
9
10
|
import { pathToFileURL } from "node:url";
|
|
10
11
|
import { fixupPluginRules } from "@eslint/compat";
|
|
11
12
|
|
|
12
|
-
//#region rolldown:runtime
|
|
13
|
-
var __create = Object.create;
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
18
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
|
-
var __commonJS = (cb, mod) => function() {
|
|
20
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
21
|
-
};
|
|
22
|
-
var __copyProps = (to, from, except, desc) => {
|
|
23
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
24
|
-
key = keys[i];
|
|
25
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
26
|
-
get: ((k) => from[k]).bind(null, key),
|
|
27
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return to;
|
|
31
|
-
};
|
|
32
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
33
|
-
value: mod,
|
|
34
|
-
enumerable: true
|
|
35
|
-
}) : target, mod));
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
13
|
//#region src/globs.ts
|
|
39
14
|
const GLOB_ROOT = "*.?([cm])[jt]s?(x)";
|
|
40
15
|
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -351,40 +326,33 @@ async function comments(options = {}) {
|
|
|
351
326
|
interopDefault(import("@eslint-community/eslint-plugin-eslint-comments")),
|
|
352
327
|
interopDefault(import("@stylistic/eslint-plugin"))
|
|
353
328
|
]);
|
|
354
|
-
return [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
"style": pluginStylistic
|
|
361
|
-
},
|
|
362
|
-
rules: {
|
|
363
|
-
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
364
|
-
"eslint-comments/no-aggregating-enable": "error",
|
|
365
|
-
"eslint-comments/no-duplicate-disable": "error",
|
|
366
|
-
"eslint-comments/no-unlimited-disable": "error",
|
|
367
|
-
"eslint-comments/no-unused-enable": "error",
|
|
368
|
-
"eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }],
|
|
369
|
-
...stylistic$1 !== false ? {
|
|
370
|
-
"no-inline-comments": "error",
|
|
371
|
-
"style/multiline-comment-style": ["error", "separate-lines"]
|
|
372
|
-
} : {}
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
files: [GLOB_YAML],
|
|
377
|
-
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
|
|
378
335
|
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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
|
+
}] : []];
|
|
388
356
|
}
|
|
389
357
|
|
|
390
358
|
//#endregion
|
|
@@ -462,6 +430,11 @@ async function disables() {
|
|
|
462
430
|
"sonar/file-name-differ-from-class": "off",
|
|
463
431
|
"unicorn/filename-case": "off"
|
|
464
432
|
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
files: [GLOB_YAML],
|
|
436
|
+
name: "isentinel/disables/yaml",
|
|
437
|
+
rules: { "no-inline-comments": "off" }
|
|
465
438
|
}
|
|
466
439
|
];
|
|
467
440
|
}
|
|
@@ -521,9 +494,14 @@ async function eslintPlugin(options = {}) {
|
|
|
521
494
|
async function gitignore(options = {}) {
|
|
522
495
|
const { config = true, explicit = false } = options;
|
|
523
496
|
if (config === false) return [];
|
|
524
|
-
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
|
+
}
|
|
525
502
|
if (fs.existsSync(".gitignore")) return [(await interopDefault(import("eslint-config-flat-gitignore")))({
|
|
526
503
|
files: [".gitignore", ".git/info/exclude"],
|
|
504
|
+
name: "isentinel/gitignore",
|
|
527
505
|
strict: false
|
|
528
506
|
})];
|
|
529
507
|
if (explicit) throw new Error("gitignore option is enabled but no .gitignore file was found in the current directory");
|
|
@@ -3592,7 +3570,7 @@ async function javascript(options = {}) {
|
|
|
3592
3570
|
interopDefault(import("eslint-plugin-antfu")),
|
|
3593
3571
|
interopDefault(import("eslint-plugin-de-morgan")),
|
|
3594
3572
|
interopDefault(import("eslint-plugin-better-max-params")),
|
|
3595
|
-
interopDefault(import("./dist-
|
|
3573
|
+
interopDefault(import("./dist-BZ6CjJ0d.js"))
|
|
3596
3574
|
]);
|
|
3597
3575
|
return [{
|
|
3598
3576
|
languageOptions: {
|
|
@@ -4794,7 +4772,7 @@ async function promise() {
|
|
|
4794
4772
|
//#endregion
|
|
4795
4773
|
//#region src/configs/react.ts
|
|
4796
4774
|
async function react(options = {}) {
|
|
4797
|
-
const { additionalComponents, additionalHooks, filenameCase = "kebabCase", files = [
|
|
4775
|
+
const { additionalComponents, additionalHooks, filenameCase = "kebabCase", files = [GLOB_JSX, GLOB_TSX], filesTypeAware = [GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`], importSource, jsxPragma, overrides = {}, skipImportCheck, stylistic: stylistic$1 = true, typeAware = true } = options;
|
|
4798
4776
|
await ensurePackages(["@eslint-react/eslint-plugin", "eslint-plugin-react-roblox-hooks"]);
|
|
4799
4777
|
const [pluginReact, pluginReactHooks, pluginStylistic, pluginTs, pluginUnicorn, pluginUnusedImports] = await Promise.all([
|
|
4800
4778
|
interopDefault(import("@eslint-react/eslint-plugin")),
|
|
@@ -4802,7 +4780,7 @@ async function react(options = {}) {
|
|
|
4802
4780
|
interopDefault(import("@stylistic/eslint-plugin")),
|
|
4803
4781
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
4804
4782
|
interopDefault(import("eslint-plugin-unicorn")),
|
|
4805
|
-
interopDefault(import("./dist-
|
|
4783
|
+
interopDefault(import("./dist-BZ6CjJ0d.js"))
|
|
4806
4784
|
]);
|
|
4807
4785
|
const { plugins } = pluginReact.configs.all;
|
|
4808
4786
|
const isTypeAware = (typeAware ? getTsConfig(options.tsconfigPath) : void 0) !== void 0;
|
|
@@ -4840,6 +4818,7 @@ async function react(options = {}) {
|
|
|
4840
4818
|
},
|
|
4841
4819
|
name: "isentinel/react/rules",
|
|
4842
4820
|
rules: {
|
|
4821
|
+
"max-lines-per-function": "off",
|
|
4843
4822
|
"react-hooks-extra/no-direct-set-state-in-use-effect": "off",
|
|
4844
4823
|
"react-hooks-extra/no-direct-set-state-in-use-layout-effect": "off",
|
|
4845
4824
|
"react-hooks-extra/no-unnecessary-use-callback": "error",
|
|
@@ -4849,7 +4828,7 @@ async function react(options = {}) {
|
|
|
4849
4828
|
"react-hooks-roblox/exhaustive-deps": "warn",
|
|
4850
4829
|
"react-hooks-roblox/rules-of-hooks": "error",
|
|
4851
4830
|
"react-naming-convention/context-name": "error",
|
|
4852
|
-
"react-naming-convention/filename-extension":
|
|
4831
|
+
"react-naming-convention/filename-extension": "off",
|
|
4853
4832
|
"react-naming-convention/use-state": "error",
|
|
4854
4833
|
"react/ensure-forward-ref-using-ref": "warn",
|
|
4855
4834
|
"react/jsx-no-duplicate-props": "off",
|
|
@@ -4898,6 +4877,11 @@ async function react(options = {}) {
|
|
|
4898
4877
|
"react/no-unused-state": "warn",
|
|
4899
4878
|
"react/no-use-context": "off",
|
|
4900
4879
|
"react/no-useless-forward-ref": "error",
|
|
4880
|
+
"unicorn/filename-case": ["error", {
|
|
4881
|
+
case: filenameCase,
|
|
4882
|
+
ignore: ["^[A-Z0-9]+.md$"],
|
|
4883
|
+
multipleFileExtensions: true
|
|
4884
|
+
}],
|
|
4901
4885
|
...stylistic$1 !== false ? {
|
|
4902
4886
|
"one-var": "off",
|
|
4903
4887
|
"react/avoid-shorthand-boolean": "warn",
|
|
@@ -4930,18 +4914,7 @@ async function react(options = {}) {
|
|
|
4930
4914
|
ignores: ignoresTypeAware,
|
|
4931
4915
|
name: "isentinel/react/type-aware-rules",
|
|
4932
4916
|
rules: { ...typeAwareRules }
|
|
4933
|
-
}] : []
|
|
4934
|
-
{
|
|
4935
|
-
files: [GLOB_TSX],
|
|
4936
|
-
rules: {
|
|
4937
|
-
"max-lines-per-function": "off",
|
|
4938
|
-
"unicorn/filename-case": ["error", {
|
|
4939
|
-
case: filenameCase,
|
|
4940
|
-
ignore: ["^[A-Z0-9]+.md$"],
|
|
4941
|
-
multipleFileExtensions: true
|
|
4942
|
-
}]
|
|
4943
|
-
}
|
|
4944
|
-
}
|
|
4917
|
+
}] : []
|
|
4945
4918
|
];
|
|
4946
4919
|
}
|
|
4947
4920
|
|
|
@@ -5134,9 +5107,9 @@ async function sonarjs(options) {
|
|
|
5134
5107
|
*
|
|
5135
5108
|
* @returns An array of flat configuration items.
|
|
5136
5109
|
*/
|
|
5137
|
-
|
|
5110
|
+
function sortGithubAction() {
|
|
5138
5111
|
return [{
|
|
5139
|
-
files: [`.github/workflows/${GLOB_YAML}
|
|
5112
|
+
files: [`.github/workflows/${GLOB_YAML}`],
|
|
5140
5113
|
name: "isentinel/sort/github-actions",
|
|
5141
5114
|
rules: { "yaml/sort-keys": [
|
|
5142
5115
|
"error",
|
|
@@ -5275,6 +5248,49 @@ async function sortGithubAction() {
|
|
|
5275
5248
|
order: ["group", "cancel-in-progress"],
|
|
5276
5249
|
pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
|
|
5277
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
|
+
},
|
|
5278
5294
|
{
|
|
5279
5295
|
order: [
|
|
5280
5296
|
"matrix",
|
|
@@ -5283,11 +5299,89 @@ async function sortGithubAction() {
|
|
|
5283
5299
|
],
|
|
5284
5300
|
pathPattern: "^jobs\\.[^.]+\\.strategy$"
|
|
5285
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
|
+
},
|
|
5286
5328
|
{
|
|
5287
5329
|
order: { type: "asc" },
|
|
5288
5330
|
pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
|
|
5289
5331
|
}
|
|
5290
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
|
+
] }
|
|
5291
5385
|
}];
|
|
5292
5386
|
}
|
|
5293
5387
|
/**
|
|
@@ -5523,14 +5617,17 @@ async function stylistic(options = {}, prettierOptions = {}) {
|
|
|
5523
5617
|
},
|
|
5524
5618
|
{
|
|
5525
5619
|
files: [GLOB_TS, GLOB_TSX],
|
|
5620
|
+
name: "isentinel/stylistic/ts",
|
|
5526
5621
|
rules: { ...createArrowStyleRule("oxc-ts") }
|
|
5527
5622
|
},
|
|
5528
5623
|
{
|
|
5529
5624
|
files: [GLOB_JS, GLOB_JSX],
|
|
5625
|
+
name: "isentinel/stylistic/js",
|
|
5530
5626
|
rules: { ...createArrowStyleRule("oxc") }
|
|
5531
5627
|
},
|
|
5532
5628
|
{
|
|
5533
5629
|
files: [GLOB_MARKDOWN_CODE],
|
|
5630
|
+
name: "isentinel/stylistic/markdown-code",
|
|
5534
5631
|
rules: { ...createArrowStyleRule("oxc", Number(prettierOptions["jsdocPrintWidth"]) || 80) }
|
|
5535
5632
|
}
|
|
5536
5633
|
];
|
|
@@ -5580,7 +5677,7 @@ async function toml(options = {}) {
|
|
|
5580
5677
|
//#endregion
|
|
5581
5678
|
//#region src/configs/typescript.ts
|
|
5582
5679
|
async function typescript(options = {}) {
|
|
5583
|
-
const { componentExts: componentExtensions = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, stylistic: stylistic$1 = true, typeAware = true } = options;
|
|
5680
|
+
const { componentExts: componentExtensions = [], erasableOnly = false, overrides = {}, overridesTypeAware = {}, parserOptions = {}, stylistic: stylistic$1 = true, typeAware = true } = options;
|
|
5584
5681
|
const files = options.files ?? [
|
|
5585
5682
|
GLOB_TS,
|
|
5586
5683
|
GLOB_TSX,
|
|
@@ -5667,6 +5764,11 @@ async function typescript(options = {}) {
|
|
|
5667
5764
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
5668
5765
|
interopDefault(import("eslint-plugin-antfu"))
|
|
5669
5766
|
]);
|
|
5767
|
+
const erasablePlugin = await (async () => {
|
|
5768
|
+
if (!erasableOnly) return;
|
|
5769
|
+
await ensurePackages(["eslint-plugin-erasable-syntax-only"]);
|
|
5770
|
+
return interopDefault(import("./lib-BHBu_Td_.js"));
|
|
5771
|
+
})();
|
|
5670
5772
|
function makeParser(usesTypeInformation, parserFiles, ignores$1) {
|
|
5671
5773
|
return createTsParser({
|
|
5672
5774
|
componentExtensions,
|
|
@@ -5762,6 +5864,16 @@ async function typescript(options = {}) {
|
|
|
5762
5864
|
...typeAwareRules,
|
|
5763
5865
|
...overridesTypeAware
|
|
5764
5866
|
}
|
|
5867
|
+
}] : [],
|
|
5868
|
+
...erasableOnly ? [{
|
|
5869
|
+
name: "isentinel/typescript/erasable-syntax-only",
|
|
5870
|
+
plugins: { "erasable-syntax-only": erasablePlugin },
|
|
5871
|
+
rules: {
|
|
5872
|
+
"erasable-syntax-only/enums": "error",
|
|
5873
|
+
"erasable-syntax-only/import-aliases": "error",
|
|
5874
|
+
"erasable-syntax-only/namespaces": "error",
|
|
5875
|
+
"erasable-syntax-only/parameter-properties": "error"
|
|
5876
|
+
}
|
|
5765
5877
|
}] : []
|
|
5766
5878
|
];
|
|
5767
5879
|
}
|