@isentinel/eslint-config 6.3.0 → 6.5.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 +7 -5
- package/dist/cli.mjs +6 -6
- package/dist/index.d.mts +962 -144
- package/dist/index.mjs +650 -383
- package/dist/lint-cli.mjs +64 -54
- package/dist/oxfmt.mjs +17 -6
- package/dist/oxlint.d.mts +1010 -92
- package/dist/oxlint.mjs +195 -53
- package/package.json +18 -18
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
1
|
+
import { createRequire, findPackageJSON } from "node:module";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
3
|
import { findUp, findUpSync } from "find-up-simple";
|
|
4
4
|
import { isPackageExists } from "local-pkg";
|
|
@@ -10,8 +10,8 @@ import * as yamlESLintParser from "yaml-eslint-parser";
|
|
|
10
10
|
import { VisitorKeys, getStaticYAMLValue, parseForESLint, parseYAML, traverseNodes } from "yaml-eslint-parser";
|
|
11
11
|
import { isMainThread } from "node:worker_threads";
|
|
12
12
|
import { minVersion } from "semver";
|
|
13
|
-
import fs$1 from "node:fs/promises";
|
|
14
13
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
14
|
+
import fs$1 from "node:fs/promises";
|
|
15
15
|
import globals from "globals";
|
|
16
16
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
17
17
|
import { eslintCompatPlugin } from "@oxlint/plugins";
|
|
@@ -334,8 +334,6 @@ function parseState(raw) {
|
|
|
334
334
|
const envelope = parsed;
|
|
335
335
|
return envelope.version === 2 ? envelope.data : void 0;
|
|
336
336
|
}
|
|
337
|
-
//#endregion
|
|
338
|
-
//#region src/hybrid-status.ts
|
|
339
337
|
/**
|
|
340
338
|
* Absolute path to the hybrid-status file for a project root.
|
|
341
339
|
*
|
|
@@ -358,12 +356,12 @@ function readHybridStatus(cwd) {
|
|
|
358
356
|
}
|
|
359
357
|
/**
|
|
360
358
|
* Passively record whether the resolved ESLint config runs in hybrid mode.
|
|
361
|
-
* Called from the factory on every config evaluation, so an
|
|
362
|
-
* touched rather than rewritten: the file must not churn
|
|
363
|
-
* lint passes re-evaluate the config, yet its mtime must stay ahead of
|
|
364
|
-
* config's or the CLI re-runs its ~3s probe every lint. Every failure is
|
|
365
|
-
* swallowed — config evaluation must never throw for this, and the CLI treats
|
|
366
|
-
* missing or stale file as "unknown" and re-probes.
|
|
359
|
+
* Called from the factory on every config evaluation in a lint child, so an
|
|
360
|
+
* unchanged status is touched rather than rewritten: the file must not churn
|
|
361
|
+
* as both lint passes re-evaluate the config, yet its mtime must stay ahead of
|
|
362
|
+
* the config's or the CLI re-runs its ~3s probe every lint. Every failure is
|
|
363
|
+
* swallowed — config evaluation must never throw for this, and the CLI treats
|
|
364
|
+
* a missing or stale file as "unknown" and re-probes.
|
|
367
365
|
*
|
|
368
366
|
* Skipped entirely when `node_modules` is absent (nothing installed, so no
|
|
369
367
|
* cache home and no CLI to read it).
|
|
@@ -388,11 +386,13 @@ function writeHybridStatus(cwd, oxlint) {
|
|
|
388
386
|
}
|
|
389
387
|
/**
|
|
390
388
|
* Convenience wrapper defaulting the project root to `process.cwd()`, used by
|
|
391
|
-
* the factory so the passive write stays a one-liner at the call site.
|
|
389
|
+
* the factory so the passive write stays a one-liner at the call site. Writes
|
|
390
|
+
* only inside an `isentinel-lint` ESLint child (see {@link HYBRID_STATUS_ENV}).
|
|
392
391
|
*
|
|
393
392
|
* @param oxlint - Whether the config enabled hybrid mode.
|
|
394
393
|
*/
|
|
395
394
|
function writeHybridStatusForCwd(oxlint) {
|
|
395
|
+
if (process.env["ISENTINEL_WRITE_HYBRID_STATUS"] !== "1") return;
|
|
396
396
|
writeHybridStatus(process.cwd(), oxlint);
|
|
397
397
|
}
|
|
398
398
|
//#endregion
|
|
@@ -739,6 +739,17 @@ function resolveEditorConfigOptions(cwd) {
|
|
|
739
739
|
return editorConfigToPrettier(properties);
|
|
740
740
|
}
|
|
741
741
|
/**
|
|
742
|
+
* Read a numeric `.editorconfig` value. An absent or empty value sets nothing.
|
|
743
|
+
*
|
|
744
|
+
* @param value - The raw property value.
|
|
745
|
+
* @returns The finite number, or `undefined`.
|
|
746
|
+
*/
|
|
747
|
+
function editorConfigNumber(value) {
|
|
748
|
+
if (value === void 0 || value === "") return;
|
|
749
|
+
const parsed = Number(value);
|
|
750
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
742
753
|
* Map one `.editorconfig` section to oxfmt options, as the rule's config
|
|
743
754
|
* loader does.
|
|
744
755
|
*
|
|
@@ -753,12 +764,12 @@ function editorConfigToOxfmt(properties) {
|
|
|
753
764
|
if (indentStyle === "tab" || indentStyle === "space") options["useTabs"] = indentStyle === "tab";
|
|
754
765
|
const quoteType = properties["quote_type"];
|
|
755
766
|
if (quoteType === "single" || quoteType === "double") options["singleQuote"] = quoteType === "single";
|
|
756
|
-
const indentSize =
|
|
757
|
-
const tabWidth =
|
|
758
|
-
if (
|
|
759
|
-
else if (
|
|
760
|
-
const printWidth =
|
|
761
|
-
if (
|
|
767
|
+
const indentSize = editorConfigNumber(properties["indent_size"]);
|
|
768
|
+
const tabWidth = editorConfigNumber(properties["tab_width"]);
|
|
769
|
+
if (indentSize !== void 0 && options["useTabs"] === false) options["tabWidth"] = indentSize;
|
|
770
|
+
else if (tabWidth !== void 0) options["tabWidth"] = tabWidth;
|
|
771
|
+
const printWidth = editorConfigNumber(properties["max_line_length"]);
|
|
772
|
+
if (printWidth !== void 0) options["printWidth"] = printWidth;
|
|
762
773
|
const finalNewline = properties["insert_final_newline"];
|
|
763
774
|
if (finalNewline === "true" || finalNewline === "false") options["insertFinalNewline"] = finalNewline === "true";
|
|
764
775
|
return options;
|
|
@@ -972,6 +983,7 @@ function mergeRestrictedDomImportRule(rule, domPackage) {
|
|
|
972
983
|
function reactRules({ domPackage, filenameCase = "kebabCase", reactCompiler = true, stylistic = true, testing = false } = {}) {
|
|
973
984
|
const restrictedDomImport = testing ? restrictedDomImportRule(domPackage) : void 0;
|
|
974
985
|
return {
|
|
986
|
+
"flawless/no-unnecessary-prop-alias": ["error", { reportConflicts: true }],
|
|
975
987
|
"flawless/no-unnecessary-use-callback": "error",
|
|
976
988
|
"flawless/no-unnecessary-use-memo": "error",
|
|
977
989
|
"flawless/purity": "error",
|
|
@@ -1882,9 +1894,13 @@ const hydrated = /* @__PURE__ */ new Set();
|
|
|
1882
1894
|
* Register a plugin without loading it.
|
|
1883
1895
|
*
|
|
1884
1896
|
* **Register with `lazyPlugin`; reach for `interopDefault(import(...))` only
|
|
1885
|
-
* when the config module reads the plugin object at composition time
|
|
1886
|
-
*
|
|
1887
|
-
*
|
|
1897
|
+
* when the config module reads the plugin object at composition time**, as
|
|
1898
|
+
* `stylistic.ts` (`configs.customize`) and `typescript.ts` (`pluginTs.configs`,
|
|
1899
|
+
* spread into the rules) do. A module that registers such a prefix again must
|
|
1900
|
+
* reuse that eager object (`react.ts` with `ts`), because a prefix registered
|
|
1901
|
+
* twice has to be the same object. A package whose `exports` has only an
|
|
1902
|
+
* `import` condition (the `eslint-plugin-react-*` family) must also stay eager,
|
|
1903
|
+
* because `hydrate` loads with `require`. Everything else merely puts the
|
|
1888
1904
|
* object in a `plugins` record, and reading it is ESLint's job. Parsers are the
|
|
1889
1905
|
* standing exception and cannot use this at all: ESLint's
|
|
1890
1906
|
* `languageOptionsSchema` merge calls `hasMethod` on `languageOptions.parser`,
|
|
@@ -1901,9 +1917,17 @@ const hydrated = /* @__PURE__ */ new Set();
|
|
|
1901
1917
|
* the resolved rule set, so coverage is unchanged and the cost simply moves to
|
|
1902
1918
|
* the run that needs it.
|
|
1903
1919
|
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1920
|
+
* Plugin identity never hydrates. With `--cache`, ESLint hashes each file's
|
|
1921
|
+
* merged config, and `Config#toJSON()` reads every plugin's `name`, `version`
|
|
1922
|
+
* and `meta` (`getObjectId`) — on warm runs too, where no rule runs. So `meta`
|
|
1923
|
+
* answers `{ name, version }` from the package's `package.json`, and the
|
|
1924
|
+
* top-level `name` and `version` answer `undefined`. Once the plugin is
|
|
1925
|
+
* loaded, `meta` is the real one with the same `name` and `version` laid over
|
|
1926
|
+
* it, so the cache hash is the same before and after hydration. A package
|
|
1927
|
+
* whose nearest `package.json` has no `name` and `version` gets its real
|
|
1928
|
+
* `meta`, which loads it. The cost: `eslint --print-config` prints the package
|
|
1929
|
+
* name and version, which differ from the plugin's own `meta` for a few
|
|
1930
|
+
* plugins (`antfu`, `small-rules`).
|
|
1907
1931
|
*
|
|
1908
1932
|
* @template T - The plugin's shape. Registration-only call sites can leave this
|
|
1909
1933
|
* as the untyped default; where the module reads the object, `import type`
|
|
@@ -1919,17 +1943,34 @@ function lazyPlugin(specifier, transform) {
|
|
|
1919
1943
|
const existing = proxies.get(specifier);
|
|
1920
1944
|
if (existing !== void 0) return existing;
|
|
1921
1945
|
let plugin;
|
|
1946
|
+
/** `false` once the `package.json` turned out to have no identity. */
|
|
1947
|
+
let identity;
|
|
1948
|
+
let loadedMeta;
|
|
1922
1949
|
function load() {
|
|
1923
1950
|
plugin ??= hydrate(specifier, transform);
|
|
1924
1951
|
return plugin;
|
|
1925
1952
|
}
|
|
1953
|
+
function identityMeta() {
|
|
1954
|
+
identity ??= readIdentity(specifier) ?? false;
|
|
1955
|
+
if (identity === false) return Reflect.get(load(), "meta");
|
|
1956
|
+
if (plugin === void 0) return identity;
|
|
1957
|
+
if (loadedMeta === void 0) {
|
|
1958
|
+
const real = Reflect.get(plugin, "meta");
|
|
1959
|
+
loadedMeta = {
|
|
1960
|
+
...isRecord(real) ? real : {},
|
|
1961
|
+
...identity
|
|
1962
|
+
};
|
|
1963
|
+
}
|
|
1964
|
+
return loadedMeta;
|
|
1965
|
+
}
|
|
1926
1966
|
const proxy = new Proxy({}, {
|
|
1927
1967
|
defineProperty: (_target, property, descriptor) => {
|
|
1928
1968
|
return Reflect.defineProperty(load(), property, descriptor);
|
|
1929
1969
|
},
|
|
1930
1970
|
deleteProperty: (_target, property) => Reflect.deleteProperty(load(), property),
|
|
1931
1971
|
get: (_target, property) => {
|
|
1932
|
-
if (property === "then") return;
|
|
1972
|
+
if (property === "then" || property === "name" || property === "version") return;
|
|
1973
|
+
if (property === "meta") return identityMeta();
|
|
1933
1974
|
return Reflect.get(load(), property);
|
|
1934
1975
|
},
|
|
1935
1976
|
getOwnPropertyDescriptor: (_target, property) => {
|
|
@@ -1948,7 +1989,24 @@ function lazyPlugin(specifier, transform) {
|
|
|
1948
1989
|
return proxy;
|
|
1949
1990
|
}
|
|
1950
1991
|
/**
|
|
1951
|
-
*
|
|
1992
|
+
* Read a plugin's identity from the `package.json` nearest to the entry that
|
|
1993
|
+
* `hydrate` would load. This resolves the specifier but does not load it.
|
|
1994
|
+
*
|
|
1995
|
+
* @param specifier - The plugin package.
|
|
1996
|
+
* @returns The package name and version, or `undefined` when the nearest
|
|
1997
|
+
* `package.json` does not have both.
|
|
1998
|
+
*/
|
|
1999
|
+
function readIdentity(specifier) {
|
|
2000
|
+
const manifestPath = findPackageJSON(pathToFileURL(require$2.resolve(specifier)));
|
|
2001
|
+
const manifest = manifestPath === void 0 ? void 0 : require$2(manifestPath);
|
|
2002
|
+
if (!isRecord(manifest) || typeof manifest["name"] !== "string" || typeof manifest["version"] !== "string") return;
|
|
2003
|
+
return {
|
|
2004
|
+
name: manifest["name"],
|
|
2005
|
+
version: manifest["version"]
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* Load a plugin synchronously. `engines.node` is `>=24.15.0`, where
|
|
1952
2010
|
* `require(esm)` is stable, so the ESM-only plugins need no async fallback.
|
|
1953
2011
|
*
|
|
1954
2012
|
* @param specifier - The plugin package to load.
|
|
@@ -2272,9 +2330,27 @@ async function eslintPlugin({ files = [GLOB_SRC], overrides = {} } = {}) {
|
|
|
2272
2330
|
//#endregion
|
|
2273
2331
|
//#region src/rules/flawless.ts
|
|
2274
2332
|
/**
|
|
2333
|
+
* Luau globals whose functions only compute a value, for
|
|
2334
|
+
* `flawless/no-ignored-return`. `table` also has functions that mutate, so
|
|
2335
|
+
* only its pure members are listed.
|
|
2336
|
+
*/
|
|
2337
|
+
const ROBLOX_PURE_FUNCTIONS = [
|
|
2338
|
+
"bit32",
|
|
2339
|
+
"buffer",
|
|
2340
|
+
"math",
|
|
2341
|
+
"os",
|
|
2342
|
+
"string",
|
|
2343
|
+
"table.clone",
|
|
2344
|
+
"table.create",
|
|
2345
|
+
"table.isfrozen",
|
|
2346
|
+
"utf8",
|
|
2347
|
+
"vector"
|
|
2348
|
+
];
|
|
2349
|
+
/**
|
|
2275
2350
|
* Base (non-React) flawless rules shared between the ESLint and oxlint
|
|
2276
2351
|
* factories. The React flawless rules live in the react rule map; the
|
|
2277
|
-
* type-aware rules live in {@link flawlessTypeAwareRules}
|
|
2352
|
+
* type-aware rules live in {@link flawlessTypeAwareRules} and
|
|
2353
|
+
* {@link flawlessTypeAwareJsxRules}, plus the type-aware
|
|
2278
2354
|
* `flawless/naming-convention` in its own config; the test-only rules, and the
|
|
2279
2355
|
* non-JS `flawless/no-redundant-tsconfig-options`, `flawless/toml-*` and
|
|
2280
2356
|
* `flawless/yaml-*` rules are configured by their own configs.
|
|
@@ -2284,6 +2360,7 @@ async function eslintPlugin({ files = [GLOB_SRC], overrides = {} } = {}) {
|
|
|
2284
2360
|
*/
|
|
2285
2361
|
function flawlessRules({ antiSlop = false, roblox = true, stylistic = true, ...arrowOptions } = {}) {
|
|
2286
2362
|
return {
|
|
2363
|
+
"flawless/cognitive-complexity": ["warn", { threshold: 15 }],
|
|
2287
2364
|
"flawless/no-export-default-arrow": "error",
|
|
2288
2365
|
"flawless/no-floating-point-equality": "error",
|
|
2289
2366
|
...stylistic === false ? {} : {
|
|
@@ -2307,12 +2384,22 @@ function flawlessRules({ antiSlop = false, roblox = true, stylistic = true, ...a
|
|
|
2307
2384
|
*/
|
|
2308
2385
|
function flawlessTypeAwareRules({ antiSlop = false, roblox = true } = {}) {
|
|
2309
2386
|
return {
|
|
2387
|
+
"flawless/no-ignored-return": roblox ? ["error", { pureFunctions: [...ROBLOX_PURE_FUNCTIONS] }] : "error",
|
|
2310
2388
|
"flawless/no-redundant-type-annotation": "error",
|
|
2311
|
-
"flawless/prefer-read-only-props": "error",
|
|
2312
2389
|
...antiSlop ? antiSlopTypeAwareRules({ roblox }) : {}
|
|
2313
2390
|
};
|
|
2314
2391
|
}
|
|
2315
2392
|
/**
|
|
2393
|
+
* Type-aware flawless rules that only check function components. ESLint only,
|
|
2394
|
+
* like {@link flawlessTypeAwareRules}. Scoped to TSX files: type information is
|
|
2395
|
+
* only available for TypeScript, and components live in `.tsx` files.
|
|
2396
|
+
*
|
|
2397
|
+
* @returns The rule map.
|
|
2398
|
+
*/
|
|
2399
|
+
function flawlessTypeAwareJsxRules() {
|
|
2400
|
+
return { "flawless/prefer-read-only-props": "error" };
|
|
2401
|
+
}
|
|
2402
|
+
/**
|
|
2316
2403
|
* Syntactic anti-slop rules: patterns AI-written code tends to produce.
|
|
2317
2404
|
*
|
|
2318
2405
|
* `flawless/no-reflect-get` is complement-only: `Reflect` has no declaration
|
|
@@ -2323,10 +2410,14 @@ function flawlessTypeAwareRules({ antiSlop = false, roblox = true } = {}) {
|
|
|
2323
2410
|
*/
|
|
2324
2411
|
function antiSlopRules({ roblox = true }) {
|
|
2325
2412
|
return {
|
|
2413
|
+
"flawless/max-comment-length": ["error", { maximumWords: 50 }],
|
|
2326
2414
|
"flawless/no-conditional-empty-object-spread": "error",
|
|
2415
|
+
"flawless/no-em-dash": "error",
|
|
2327
2416
|
"flawless/no-known-value-widening": "error",
|
|
2328
2417
|
"flawless/no-object-parameters": "error",
|
|
2329
2418
|
"flawless/no-shape-in-symbol-names": "error",
|
|
2419
|
+
"flawless/no-trivial-functions": "error",
|
|
2420
|
+
"flawless/no-unknown-parameters": "error",
|
|
2330
2421
|
"flawless/no-unsafe-dictionary-type": "error",
|
|
2331
2422
|
...roblox ? {} : { "flawless/no-reflect-get": "error" }
|
|
2332
2423
|
};
|
|
@@ -2368,9 +2459,9 @@ function antiSlopTypeAwareRules({ roblox = true }) {
|
|
|
2368
2459
|
//#endregion
|
|
2369
2460
|
//#region src/eslint/configs/flawless.ts
|
|
2370
2461
|
init_globs();
|
|
2371
|
-
|
|
2462
|
+
function flawless(options = {}, prettierOptions = {}) {
|
|
2372
2463
|
const { antiSlop = false, complementIgnores, overridesTypeAware = {}, roblox = true, stylistic = true, typeAware = true } = options;
|
|
2373
|
-
const eslintPluginFlawless =
|
|
2464
|
+
const eslintPluginFlawless = lazyPlugin("eslint-plugin-flawless");
|
|
2374
2465
|
const filesTypeAware = [GLOB_TS, GLOB_TSX];
|
|
2375
2466
|
const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md/**`, "**/*.d.{,c,m}ts"];
|
|
2376
2467
|
const isTypeAware = (typeAware ? getTsConfig(options.tsconfigPath) : void 0) !== void 0;
|
|
@@ -2406,6 +2497,12 @@ async function flawless(options = {}, prettierOptions = {}) {
|
|
|
2406
2497
|
roblox: false
|
|
2407
2498
|
})
|
|
2408
2499
|
}] : [],
|
|
2500
|
+
...isTypeAware ? [{
|
|
2501
|
+
name: "isentinel/flawless/tsx/rules-type-aware",
|
|
2502
|
+
files: [GLOB_TSX],
|
|
2503
|
+
ignores: ignoresTypeAware,
|
|
2504
|
+
rules: flawlessTypeAwareJsxRules()
|
|
2505
|
+
}] : [],
|
|
2409
2506
|
...isTypeAware ? [{
|
|
2410
2507
|
name: "isentinel/flawless/rules-type-aware",
|
|
2411
2508
|
files: filesTypeAware,
|
|
@@ -2433,7 +2530,7 @@ async function flawless(options = {}, prettierOptions = {}) {
|
|
|
2433
2530
|
];
|
|
2434
2531
|
}
|
|
2435
2532
|
//#endregion
|
|
2436
|
-
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@eslint/compat/2.1.0/
|
|
2533
|
+
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@eslint/compat/2.1.0/017f2a99c4964fa273bbabeb623136c3c3730f9415cea90ed2501194dbdd23bd/node_modules/@eslint/compat/dist/esm/index.js
|
|
2437
2534
|
/**
|
|
2438
2535
|
* @fileoverview Ignore file utilities for the compat package.
|
|
2439
2536
|
* @author Nicholas C. Zakas
|
|
@@ -2462,7 +2559,7 @@ function convertIgnorePatternToMinimatch(pattern) {
|
|
|
2462
2559
|
}
|
|
2463
2560
|
var init_esm$1 = __esmMin((() => {}));
|
|
2464
2561
|
//#endregion
|
|
2465
|
-
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-config-flat-gitignore/2.3.0/
|
|
2562
|
+
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-config-flat-gitignore/2.3.0/f307e164f36f43b448a8ceebca34f679d5f323ee99520236b96e9853454ef176/node_modules/eslint-config-flat-gitignore/dist/index.mjs
|
|
2466
2563
|
var dist_exports = /* @__PURE__ */ __exportAll$2({ default: () => ignore });
|
|
2467
2564
|
function toArray(array) {
|
|
2468
2565
|
array = array ?? [];
|
|
@@ -2664,6 +2761,21 @@ function imports({ stylistic = true, type = "game" } = {}) {
|
|
|
2664
2761
|
}
|
|
2665
2762
|
//#endregion
|
|
2666
2763
|
//#region src/rules/javascript.ts
|
|
2764
|
+
/** `id-length` options shared by the ESLint rule and the native oxlint rule. */
|
|
2765
|
+
const ID_LENGTH_OPTIONS = {
|
|
2766
|
+
exceptions: [
|
|
2767
|
+
"_",
|
|
2768
|
+
"x",
|
|
2769
|
+
"y",
|
|
2770
|
+
"z",
|
|
2771
|
+
"a",
|
|
2772
|
+
"b",
|
|
2773
|
+
"e"
|
|
2774
|
+
],
|
|
2775
|
+
max: 30,
|
|
2776
|
+
min: 2,
|
|
2777
|
+
properties: "never"
|
|
2778
|
+
};
|
|
2667
2779
|
/**
|
|
2668
2780
|
* Core JavaScript rules shared between the ESLint and oxlint factories.
|
|
2669
2781
|
*
|
|
@@ -2868,20 +2980,6 @@ function javascriptRules({ isInEditor = false, roblox = true, stylistic = true }
|
|
|
2868
2980
|
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
2869
2981
|
"vars-on-top": "error",
|
|
2870
2982
|
...stylistic !== false ? {
|
|
2871
|
-
"id-length": ["error", {
|
|
2872
|
-
exceptions: [
|
|
2873
|
-
"_",
|
|
2874
|
-
"x",
|
|
2875
|
-
"y",
|
|
2876
|
-
"z",
|
|
2877
|
-
"a",
|
|
2878
|
-
"b",
|
|
2879
|
-
"e"
|
|
2880
|
-
],
|
|
2881
|
-
max: 30,
|
|
2882
|
-
min: 2,
|
|
2883
|
-
properties: "never"
|
|
2884
|
-
}],
|
|
2885
2983
|
"max-lines": ["warn", {
|
|
2886
2984
|
max: 300,
|
|
2887
2985
|
skipBlankLines: true,
|
|
@@ -2906,11 +3004,12 @@ function javascriptRules({ isInEditor = false, roblox = true, stylistic = true }
|
|
|
2906
3004
|
//#endregion
|
|
2907
3005
|
//#region src/eslint/configs/javascript.ts
|
|
2908
3006
|
init_globs();
|
|
2909
|
-
|
|
3007
|
+
function javascript({ complementIgnores, isInEditor = false, overrides = {}, roblox = true, stylistic = true } = {}) {
|
|
2910
3008
|
const pluginAntfu = lazyPlugin("eslint-plugin-antfu");
|
|
2911
3009
|
const pluginDeMorgan = lazyPlugin("eslint-plugin-de-morgan");
|
|
2912
3010
|
const pluginMaxParameters = lazyPlugin("eslint-plugin-better-max-params");
|
|
2913
|
-
const pluginUnusedImports =
|
|
3011
|
+
const pluginUnusedImports = lazyPlugin("eslint-plugin-unused-imports");
|
|
3012
|
+
const idLengthRules = stylistic !== false ? { "id-length": ["error", ID_LENGTH_OPTIONS] } : {};
|
|
2914
3013
|
return [
|
|
2915
3014
|
{
|
|
2916
3015
|
name: "isentinel/javascript/setup",
|
|
@@ -2948,6 +3047,7 @@ async function javascript({ complementIgnores, isInEditor = false, overrides = {
|
|
|
2948
3047
|
roblox,
|
|
2949
3048
|
stylistic
|
|
2950
3049
|
}),
|
|
3050
|
+
...idLengthRules,
|
|
2951
3051
|
...overrides
|
|
2952
3052
|
}
|
|
2953
3053
|
},
|
|
@@ -2961,6 +3061,7 @@ async function javascript({ complementIgnores, isInEditor = false, overrides = {
|
|
|
2961
3061
|
roblox: false,
|
|
2962
3062
|
stylistic
|
|
2963
3063
|
}),
|
|
3064
|
+
...idLengthRules,
|
|
2964
3065
|
...overrides
|
|
2965
3066
|
}
|
|
2966
3067
|
}] : []
|
|
@@ -3159,7 +3260,7 @@ init_globs();
|
|
|
3159
3260
|
* loading the plugin. `test/lazy-plugin.spec.ts` asserts the two match.
|
|
3160
3261
|
*/
|
|
3161
3262
|
const MARKDOWN_PROCESSOR_NAME = "@eslint/markdown/markdown";
|
|
3162
|
-
function markdown({ componentExts: componentExtensions = [], files = [GLOB_MARKDOWN], overrides = {}, type = "game" } = {}) {
|
|
3263
|
+
function markdown({ antiSlop = false, componentExts: componentExtensions = [], files = [GLOB_MARKDOWN], overrides = {}, type = "game" } = {}) {
|
|
3163
3264
|
const markdownPlugin = lazyPlugin("@eslint/markdown");
|
|
3164
3265
|
return [
|
|
3165
3266
|
{
|
|
@@ -3203,6 +3304,7 @@ function markdown({ componentExts: componentExtensions = [], files = [GLOB_MARKD
|
|
|
3203
3304
|
"markdown/table-column-count": "error",
|
|
3204
3305
|
"style/indent": "off",
|
|
3205
3306
|
"unicorn/no-missing-local-resource": "error",
|
|
3307
|
+
...antiSlop ? { "flawless/no-em-dash": "error" } : {},
|
|
3206
3308
|
...type === "package" ? {
|
|
3207
3309
|
"markdown/heading-increment": "error",
|
|
3208
3310
|
"markdown/no-bare-urls": "error",
|
|
@@ -3451,9 +3553,9 @@ const REACT_ELEMENT_RETURN_TYPES = [{ returns: {
|
|
|
3451
3553
|
name: "ReactNode",
|
|
3452
3554
|
from: RBXTS_REACT
|
|
3453
3555
|
} }];
|
|
3454
|
-
|
|
3556
|
+
function naming(options = {}) {
|
|
3455
3557
|
const { allowedWords = false, overridesTypeAware = {}, roblox: isRoblox = true, selectors = [], selectorsTsx = [], typeAware = true } = options;
|
|
3456
|
-
const eslintPluginFlawless =
|
|
3558
|
+
const eslintPluginFlawless = lazyPlugin("eslint-plugin-flawless");
|
|
3457
3559
|
const configuredWords = allowedWords === true ? ROBLOX_ALLOWED_WORDS : allowedWords;
|
|
3458
3560
|
const words = configuredWords === false || configuredWords.length === 0 ? void 0 : configuredWords;
|
|
3459
3561
|
const tsFilesTypeAware = [GLOB_TS];
|
|
@@ -3780,6 +3882,12 @@ function reactSelectors() {
|
|
|
3780
3882
|
selector: ["parameter", "variable"],
|
|
3781
3883
|
types: REACT_COMPONENT_TYPES
|
|
3782
3884
|
},
|
|
3885
|
+
{
|
|
3886
|
+
componentProp: true,
|
|
3887
|
+
format: ["StrictPascalCase"],
|
|
3888
|
+
selector: "typeProperty",
|
|
3889
|
+
types: REACT_COMPONENT_TYPES
|
|
3890
|
+
},
|
|
3783
3891
|
{
|
|
3784
3892
|
format: ["strictCamelCase", "StrictPascalCase"],
|
|
3785
3893
|
selector: ["classProperty", "typeProperty"],
|
|
@@ -3940,7 +4048,8 @@ function oxfmtSingleFix(plugin) {
|
|
|
3940
4048
|
}
|
|
3941
4049
|
function editOf({ fix }) {
|
|
3942
4050
|
if (typeof fix !== "function") return;
|
|
3943
|
-
|
|
4051
|
+
const edit = fix(recordingFixer);
|
|
4052
|
+
return edit !== null && "range" in edit ? edit : void 0;
|
|
3944
4053
|
}
|
|
3945
4054
|
/**
|
|
3946
4055
|
* Merge non-overlapping edits into one that spans them all.
|
|
@@ -3951,7 +4060,7 @@ function editOf({ fix }) {
|
|
|
3951
4060
|
*/
|
|
3952
4061
|
function mergeEdits(source, edits) {
|
|
3953
4062
|
const sorted = edits.toSorted((first, second) => first.range[0] - second.range[0]);
|
|
3954
|
-
const start = sorted[0]
|
|
4063
|
+
const start = sorted[0]?.range[0] ?? 0;
|
|
3955
4064
|
let end = start;
|
|
3956
4065
|
let text = "";
|
|
3957
4066
|
for (const { range, text: insert } of sorted) {
|
|
@@ -4002,7 +4111,7 @@ function singleFixRule(rule) {
|
|
|
4002
4111
|
const listeners = rule.create(proxy);
|
|
4003
4112
|
return Object.fromEntries(Object.entries(listeners).map(([selector, listener]) => {
|
|
4004
4113
|
return [selector, (...args) => {
|
|
4005
|
-
listener(
|
|
4114
|
+
if (listener !== void 0) Reflect.apply(listener, void 0, args);
|
|
4006
4115
|
flush();
|
|
4007
4116
|
}];
|
|
4008
4117
|
}));
|
|
@@ -4875,13 +4984,13 @@ async function react(options = {}) {
|
|
|
4875
4984
|
if (testing) await ensurePackages(["eslint-plugin-testing-library"]);
|
|
4876
4985
|
const pluginSmallRules = loadSmallRulesPlugin();
|
|
4877
4986
|
const pluginStylistic = lazyPlugin("@stylistic/eslint-plugin");
|
|
4878
|
-
const
|
|
4987
|
+
const pluginUnicorn = lazyPlugin("eslint-plugin-unicorn");
|
|
4988
|
+
const pluginFlawless = lazyPlugin("eslint-plugin-flawless");
|
|
4989
|
+
const pluginUnusedImports = lazyPlugin("eslint-plugin-unused-imports");
|
|
4990
|
+
const [pluginReactCore, pluginReactJsx, pluginTs] = await Promise.all([
|
|
4879
4991
|
interopDefault(import("eslint-plugin-react-x")),
|
|
4880
4992
|
interopDefault(import("eslint-plugin-react-jsx")),
|
|
4881
|
-
interopDefault(import("eslint-plugin
|
|
4882
|
-
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
4883
|
-
interopDefault(import("eslint-plugin-unicorn")),
|
|
4884
|
-
interopDefault(import("eslint-plugin-unused-imports"))
|
|
4993
|
+
interopDefault(import("@typescript-eslint/eslint-plugin"))
|
|
4885
4994
|
]);
|
|
4886
4995
|
const isTypeAware = (typeAware ? getTsConfig(options.tsconfigPath) : void 0) !== void 0;
|
|
4887
4996
|
const reactSettings = {
|
|
@@ -4915,7 +5024,7 @@ async function react(options = {}) {
|
|
|
4915
5024
|
}] : [],
|
|
4916
5025
|
...testing ? [{
|
|
4917
5026
|
name: "isentinel/react/setup/testing-library",
|
|
4918
|
-
plugins: { "testing-library":
|
|
5027
|
+
plugins: { "testing-library": lazyPlugin("eslint-plugin-testing-library") }
|
|
4919
5028
|
}] : [],
|
|
4920
5029
|
{
|
|
4921
5030
|
name: "isentinel/react/rules",
|
|
@@ -5087,7 +5196,6 @@ async function roblox(options = {}, formatLua = true) {
|
|
|
5087
5196
|
function sonarjsRules({ isInEditor, roblox = true }) {
|
|
5088
5197
|
return {
|
|
5089
5198
|
"sonar/bool-param-default": "error",
|
|
5090
|
-
"sonar/cognitive-complexity": "warn",
|
|
5091
5199
|
"sonar/constructor-for-side-effects": "error",
|
|
5092
5200
|
"sonar/destructuring-assignment-syntax": "error",
|
|
5093
5201
|
"sonar/elseif-without-else": "off",
|
|
@@ -5103,12 +5211,10 @@ function sonarjsRules({ isInEditor, roblox = true }) {
|
|
|
5103
5211
|
"sonar/no-duplicated-branches": "error",
|
|
5104
5212
|
"sonar/no-element-overwrite": "error",
|
|
5105
5213
|
"sonar/no-empty-collection": "error",
|
|
5106
|
-
"sonar/no-floating-point-equality": "error",
|
|
5107
5214
|
"sonar/no-gratuitous-expressions": "off",
|
|
5108
5215
|
"sonar/no-identical-conditions": "error",
|
|
5109
5216
|
"sonar/no-identical-expressions": "error",
|
|
5110
5217
|
"sonar/no-identical-functions": "error",
|
|
5111
|
-
"sonar/no-ignored-return": "error",
|
|
5112
5218
|
"sonar/no-inverted-boolean-check": "error",
|
|
5113
5219
|
"sonar/no-nested-conditional": "error",
|
|
5114
5220
|
"sonar/no-nested-incdec": "error",
|
|
@@ -5154,7 +5260,6 @@ function sonarjsRules({ isInEditor, roblox = true }) {
|
|
|
5154
5260
|
*/
|
|
5155
5261
|
function sonarjsTestRules({ jest = false, roblox = true } = {}) {
|
|
5156
5262
|
return {
|
|
5157
|
-
"sonar/no-incompatible-assertion-types": "error",
|
|
5158
5263
|
...jest ? {
|
|
5159
5264
|
"sonar/no-mixed-completion-style": "error",
|
|
5160
5265
|
"sonar/synchronous-suite-callback": "error"
|
|
@@ -5165,10 +5270,10 @@ function sonarjsTestRules({ jest = false, roblox = true } = {}) {
|
|
|
5165
5270
|
//#endregion
|
|
5166
5271
|
//#region src/eslint/configs/sonarjs.ts
|
|
5167
5272
|
init_globs();
|
|
5168
|
-
|
|
5273
|
+
function sonarjs({ complementIgnores, isInEditor, roblox }) {
|
|
5169
5274
|
return [{
|
|
5170
5275
|
name: "isentinel/sonarjs",
|
|
5171
|
-
plugins: { sonar:
|
|
5276
|
+
plugins: { sonar: lazyPlugin("eslint-plugin-sonarjs") },
|
|
5172
5277
|
rules: sonarjsRules({
|
|
5173
5278
|
isInEditor,
|
|
5174
5279
|
roblox
|
|
@@ -5187,177 +5292,293 @@ async function sonarjs({ complementIgnores, isInEditor, roblox }) {
|
|
|
5187
5292
|
//#region src/eslint/configs/sort.ts
|
|
5188
5293
|
init_globs();
|
|
5189
5294
|
/**
|
|
5190
|
-
* Sort GitHub Actions workflow files.
|
|
5295
|
+
* Sort GitHub Actions workflow, composite action and label files.
|
|
5191
5296
|
*
|
|
5192
5297
|
* Requires `yaml` config.
|
|
5193
5298
|
*
|
|
5194
5299
|
* @returns An array of flat configuration items.
|
|
5195
5300
|
*/
|
|
5196
5301
|
function sortGithubAction() {
|
|
5197
|
-
return [
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5302
|
+
return [
|
|
5303
|
+
{
|
|
5304
|
+
name: "isentinel/sort/github-actions",
|
|
5305
|
+
files: [`.github/workflows/${GLOB_YAML}`],
|
|
5306
|
+
rules: {
|
|
5307
|
+
"yaml/sort-keys": [
|
|
5308
|
+
"error",
|
|
5309
|
+
{
|
|
5310
|
+
order: [
|
|
5311
|
+
"name",
|
|
5312
|
+
"run-name",
|
|
5313
|
+
"on",
|
|
5314
|
+
"permissions",
|
|
5315
|
+
"env",
|
|
5316
|
+
"concurrency",
|
|
5317
|
+
"jobs"
|
|
5318
|
+
],
|
|
5319
|
+
pathPattern: "^$"
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
order: [
|
|
5323
|
+
"name",
|
|
5324
|
+
"permissions",
|
|
5325
|
+
"needs",
|
|
5326
|
+
"if",
|
|
5327
|
+
"runs-on",
|
|
5328
|
+
"environment",
|
|
5329
|
+
"concurrency",
|
|
5330
|
+
"outputs",
|
|
5331
|
+
"env",
|
|
5332
|
+
"defaults",
|
|
5333
|
+
"steps",
|
|
5334
|
+
"timeout-minutes",
|
|
5335
|
+
"strategy",
|
|
5336
|
+
"continue-on-error",
|
|
5337
|
+
"container",
|
|
5338
|
+
"services",
|
|
5339
|
+
"uses",
|
|
5340
|
+
"with",
|
|
5341
|
+
"secrets"
|
|
5342
|
+
],
|
|
5343
|
+
pathPattern: "^jobs\\.[^.]+$"
|
|
5344
|
+
},
|
|
5345
|
+
{
|
|
5346
|
+
order: [
|
|
5347
|
+
"check_run",
|
|
5348
|
+
"check_suite",
|
|
5349
|
+
"create",
|
|
5350
|
+
"delete",
|
|
5351
|
+
"deployment",
|
|
5352
|
+
"deployment_status",
|
|
5353
|
+
"discussion",
|
|
5354
|
+
"discussion_comment",
|
|
5355
|
+
"fork",
|
|
5356
|
+
"gollum",
|
|
5357
|
+
"issue_comment",
|
|
5358
|
+
"issues",
|
|
5359
|
+
"label",
|
|
5360
|
+
"merge_group",
|
|
5361
|
+
"milestone",
|
|
5362
|
+
"page_build",
|
|
5363
|
+
"public",
|
|
5364
|
+
"pull_request",
|
|
5365
|
+
"pull_request_comment",
|
|
5366
|
+
"pull_request_review",
|
|
5367
|
+
"pull_request_review_comment",
|
|
5368
|
+
"pull_request_target",
|
|
5369
|
+
"push",
|
|
5370
|
+
"registry_package",
|
|
5371
|
+
"release",
|
|
5372
|
+
"repository_dispatch",
|
|
5373
|
+
"schedule",
|
|
5374
|
+
"status",
|
|
5375
|
+
"watch",
|
|
5376
|
+
"workflow_call",
|
|
5377
|
+
"workflow_dispatch",
|
|
5378
|
+
"workflow_run"
|
|
5379
|
+
],
|
|
5380
|
+
pathPattern: "^on$"
|
|
5381
|
+
},
|
|
5382
|
+
{
|
|
5383
|
+
order: [
|
|
5384
|
+
"branches",
|
|
5385
|
+
"branches-ignore",
|
|
5386
|
+
"paths",
|
|
5387
|
+
"paths-ignore"
|
|
5388
|
+
],
|
|
5389
|
+
pathPattern: "^on\\.pull_request$"
|
|
5390
|
+
},
|
|
5391
|
+
{
|
|
5392
|
+
order: [
|
|
5393
|
+
"branches",
|
|
5394
|
+
"branches-ignore",
|
|
5395
|
+
"paths",
|
|
5396
|
+
"paths-ignore"
|
|
5397
|
+
],
|
|
5398
|
+
pathPattern: "^on\\.pull_request_target$"
|
|
5399
|
+
},
|
|
5400
|
+
{
|
|
5401
|
+
order: [
|
|
5402
|
+
"branches",
|
|
5403
|
+
"tags",
|
|
5404
|
+
"branches-ignore",
|
|
5405
|
+
"tags-ignore",
|
|
5406
|
+
"paths",
|
|
5407
|
+
"paths-ignore"
|
|
5408
|
+
],
|
|
5409
|
+
pathPattern: "^on\\.push$"
|
|
5410
|
+
},
|
|
5411
|
+
{
|
|
5412
|
+
order: [
|
|
5413
|
+
"inputs",
|
|
5414
|
+
"outputs",
|
|
5415
|
+
"secrets"
|
|
5416
|
+
],
|
|
5417
|
+
pathPattern: "^on\\.workflow_call$"
|
|
5418
|
+
},
|
|
5419
|
+
{
|
|
5420
|
+
order: ["inputs"],
|
|
5421
|
+
pathPattern: "^on\\.workflow_dispatch$"
|
|
5422
|
+
},
|
|
5423
|
+
{
|
|
5424
|
+
order: ["branches", "branches-ignore"],
|
|
5425
|
+
pathPattern: "^on\\.workflow_run$"
|
|
5426
|
+
},
|
|
5427
|
+
{
|
|
5428
|
+
order: [
|
|
5429
|
+
"description",
|
|
5430
|
+
"required",
|
|
5431
|
+
"default",
|
|
5432
|
+
"type"
|
|
5433
|
+
],
|
|
5434
|
+
pathPattern: "^on\\.(workflow_call|workflow_dispatch)\\.inputs\\.[^.]+$"
|
|
5435
|
+
},
|
|
5436
|
+
{
|
|
5437
|
+
order: ["shell", "working-directory"],
|
|
5438
|
+
pathPattern: "^(defaults\\.run|jobs\\.[^.]+\\.defaults\\.run)$"
|
|
5439
|
+
},
|
|
5440
|
+
{
|
|
5441
|
+
order: ["group", "cancel-in-progress"],
|
|
5442
|
+
pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
|
|
5443
|
+
},
|
|
5444
|
+
{
|
|
5445
|
+
order: [
|
|
5446
|
+
"name",
|
|
5447
|
+
"permissions",
|
|
5448
|
+
"needs",
|
|
5449
|
+
"if",
|
|
5450
|
+
"runs-on",
|
|
5451
|
+
"environment",
|
|
5452
|
+
"concurrency",
|
|
5453
|
+
"outputs",
|
|
5454
|
+
"env",
|
|
5455
|
+
"defaults",
|
|
5456
|
+
"steps",
|
|
5457
|
+
"timeout-minutes",
|
|
5458
|
+
"strategy",
|
|
5459
|
+
"continue-on-error",
|
|
5460
|
+
"container",
|
|
5461
|
+
"services",
|
|
5462
|
+
"uses",
|
|
5463
|
+
"with",
|
|
5464
|
+
"secrets"
|
|
5465
|
+
],
|
|
5466
|
+
pathPattern: "^jobs\\. [^.]+$"
|
|
5467
|
+
},
|
|
5468
|
+
{
|
|
5469
|
+
order: [
|
|
5470
|
+
"id",
|
|
5471
|
+
"if",
|
|
5472
|
+
"name",
|
|
5473
|
+
"uses",
|
|
5474
|
+
"run",
|
|
5475
|
+
"working-directory",
|
|
5476
|
+
"with",
|
|
5477
|
+
"env",
|
|
5478
|
+
"continue-on-error",
|
|
5479
|
+
"timeout-minutes"
|
|
5480
|
+
],
|
|
5481
|
+
pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]$"
|
|
5482
|
+
},
|
|
5483
|
+
{
|
|
5484
|
+
order: ["args", "entrypoint"],
|
|
5485
|
+
pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]\\.with$"
|
|
5486
|
+
},
|
|
5487
|
+
{
|
|
5488
|
+
order: [
|
|
5489
|
+
"matrix",
|
|
5490
|
+
"fail-fast",
|
|
5491
|
+
"max-parallel"
|
|
5492
|
+
],
|
|
5493
|
+
pathPattern: "^jobs\\.[^.]+\\.strategy$"
|
|
5494
|
+
},
|
|
5495
|
+
{
|
|
5496
|
+
order: ["include", "exclude"],
|
|
5497
|
+
pathPattern: "^jobs\\.[^.]+\\.strategy\\.matrix$"
|
|
5498
|
+
},
|
|
5499
|
+
{
|
|
5500
|
+
order: [
|
|
5501
|
+
"image",
|
|
5502
|
+
"credentials",
|
|
5503
|
+
"env",
|
|
5504
|
+
"ports",
|
|
5505
|
+
"volumes",
|
|
5506
|
+
"options"
|
|
5507
|
+
],
|
|
5508
|
+
pathPattern: "^jobs\\.[^.]+\\.container$"
|
|
5509
|
+
},
|
|
5510
|
+
{
|
|
5511
|
+
order: [
|
|
5512
|
+
"image",
|
|
5513
|
+
"credentials",
|
|
5514
|
+
"env",
|
|
5515
|
+
"ports",
|
|
5516
|
+
"volumes",
|
|
5517
|
+
"options"
|
|
5518
|
+
],
|
|
5519
|
+
pathPattern: "^jobs\\.[^.]+\\.services\\.[^.]+$"
|
|
5520
|
+
},
|
|
5521
|
+
{
|
|
5522
|
+
order: { type: "asc" },
|
|
5523
|
+
pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
|
|
5524
|
+
}
|
|
5525
|
+
],
|
|
5526
|
+
"yaml/sort-sequence-values": [
|
|
5527
|
+
"error",
|
|
5528
|
+
{
|
|
5529
|
+
order: {
|
|
5530
|
+
natural: true,
|
|
5531
|
+
type: "asc"
|
|
5532
|
+
},
|
|
5533
|
+
pathPattern: "^on$"
|
|
5534
|
+
},
|
|
5535
|
+
{
|
|
5536
|
+
order: {
|
|
5537
|
+
natural: true,
|
|
5538
|
+
type: "asc"
|
|
5539
|
+
},
|
|
5540
|
+
pathPattern: "^on\\.[^.]+\\.(branches|branches-ignore|tags|tags-ignore|paths|paths-ignore|types)$"
|
|
5541
|
+
},
|
|
5542
|
+
{
|
|
5543
|
+
order: {
|
|
5544
|
+
natural: true,
|
|
5545
|
+
type: "asc"
|
|
5546
|
+
},
|
|
5547
|
+
pathPattern: "^jobs\\.[^.]+\\.needs$"
|
|
5548
|
+
}
|
|
5549
|
+
]
|
|
5550
|
+
}
|
|
5551
|
+
},
|
|
5552
|
+
{
|
|
5553
|
+
name: "isentinel/sort/github-composite-actions",
|
|
5554
|
+
files: [`.github/actions/${GLOB_YAML}`],
|
|
5555
|
+
rules: { "yaml/sort-keys": [
|
|
5202
5556
|
"error",
|
|
5203
5557
|
{
|
|
5204
5558
|
order: [
|
|
5205
5559
|
"name",
|
|
5206
|
-
"
|
|
5207
|
-
"on",
|
|
5208
|
-
"permissions",
|
|
5209
|
-
"env",
|
|
5210
|
-
"concurrency",
|
|
5211
|
-
"jobs"
|
|
5212
|
-
],
|
|
5213
|
-
pathPattern: "^$"
|
|
5214
|
-
},
|
|
5215
|
-
{
|
|
5216
|
-
order: [
|
|
5217
|
-
"name",
|
|
5218
|
-
"permissions",
|
|
5219
|
-
"needs",
|
|
5220
|
-
"if",
|
|
5221
|
-
"runs-on",
|
|
5222
|
-
"environment",
|
|
5223
|
-
"concurrency",
|
|
5224
|
-
"outputs",
|
|
5225
|
-
"env",
|
|
5226
|
-
"defaults",
|
|
5227
|
-
"steps",
|
|
5228
|
-
"timeout-minutes",
|
|
5229
|
-
"strategy",
|
|
5230
|
-
"continue-on-error",
|
|
5231
|
-
"container",
|
|
5232
|
-
"services",
|
|
5233
|
-
"uses",
|
|
5234
|
-
"with",
|
|
5235
|
-
"secrets"
|
|
5236
|
-
],
|
|
5237
|
-
pathPattern: "^jobs\\.[^.]+$"
|
|
5238
|
-
},
|
|
5239
|
-
{
|
|
5240
|
-
order: [
|
|
5241
|
-
"check_run",
|
|
5242
|
-
"check_suite",
|
|
5243
|
-
"create",
|
|
5244
|
-
"delete",
|
|
5245
|
-
"deployment",
|
|
5246
|
-
"deployment_status",
|
|
5247
|
-
"discussion",
|
|
5248
|
-
"discussion_comment",
|
|
5249
|
-
"fork",
|
|
5250
|
-
"gollum",
|
|
5251
|
-
"issue_comment",
|
|
5252
|
-
"issues",
|
|
5253
|
-
"label",
|
|
5254
|
-
"merge_group",
|
|
5255
|
-
"milestone",
|
|
5256
|
-
"page_build",
|
|
5257
|
-
"public",
|
|
5258
|
-
"pull_request",
|
|
5259
|
-
"pull_request_comment",
|
|
5260
|
-
"pull_request_review",
|
|
5261
|
-
"pull_request_review_comment",
|
|
5262
|
-
"pull_request_target",
|
|
5263
|
-
"push",
|
|
5264
|
-
"registry_package",
|
|
5265
|
-
"release",
|
|
5266
|
-
"repository_dispatch",
|
|
5267
|
-
"schedule",
|
|
5268
|
-
"status",
|
|
5269
|
-
"watch",
|
|
5270
|
-
"workflow_call",
|
|
5271
|
-
"workflow_dispatch",
|
|
5272
|
-
"workflow_run"
|
|
5273
|
-
],
|
|
5274
|
-
pathPattern: "^on$"
|
|
5275
|
-
},
|
|
5276
|
-
{
|
|
5277
|
-
order: [
|
|
5278
|
-
"branches",
|
|
5279
|
-
"branches-ignore",
|
|
5280
|
-
"paths",
|
|
5281
|
-
"paths-ignore"
|
|
5282
|
-
],
|
|
5283
|
-
pathPattern: "^on\\.pull_request$"
|
|
5284
|
-
},
|
|
5285
|
-
{
|
|
5286
|
-
order: [
|
|
5287
|
-
"branches",
|
|
5288
|
-
"branches-ignore",
|
|
5289
|
-
"paths",
|
|
5290
|
-
"paths-ignore"
|
|
5291
|
-
],
|
|
5292
|
-
pathPattern: "^on\\.pull_request_target$"
|
|
5293
|
-
},
|
|
5294
|
-
{
|
|
5295
|
-
order: [
|
|
5296
|
-
"branches",
|
|
5297
|
-
"tags",
|
|
5298
|
-
"branches-ignore",
|
|
5299
|
-
"tags-ignore",
|
|
5300
|
-
"paths",
|
|
5301
|
-
"paths-ignore"
|
|
5302
|
-
],
|
|
5303
|
-
pathPattern: "^on\\.push$"
|
|
5304
|
-
},
|
|
5305
|
-
{
|
|
5306
|
-
order: [
|
|
5560
|
+
"description",
|
|
5307
5561
|
"inputs",
|
|
5308
5562
|
"outputs",
|
|
5309
|
-
"
|
|
5563
|
+
"runs"
|
|
5310
5564
|
],
|
|
5311
|
-
pathPattern: "
|
|
5312
|
-
},
|
|
5313
|
-
{
|
|
5314
|
-
order: ["inputs"],
|
|
5315
|
-
pathPattern: "^on\\.workflow_dispatch$"
|
|
5316
|
-
},
|
|
5317
|
-
{
|
|
5318
|
-
order: ["branches", "branches-ignore"],
|
|
5319
|
-
pathPattern: "^on\\.workflow_run$"
|
|
5565
|
+
pathPattern: "^$"
|
|
5320
5566
|
},
|
|
5321
5567
|
{
|
|
5322
5568
|
order: [
|
|
5323
5569
|
"description",
|
|
5324
5570
|
"required",
|
|
5325
|
-
"default"
|
|
5326
|
-
"type"
|
|
5571
|
+
"default"
|
|
5327
5572
|
],
|
|
5328
|
-
pathPattern: "^
|
|
5573
|
+
pathPattern: "^inputs\\.[^.]+$"
|
|
5329
5574
|
},
|
|
5330
5575
|
{
|
|
5331
|
-
order: ["
|
|
5332
|
-
pathPattern: "^
|
|
5576
|
+
order: ["description", "value"],
|
|
5577
|
+
pathPattern: "^outputs\\.[^.]+$"
|
|
5333
5578
|
},
|
|
5334
5579
|
{
|
|
5335
|
-
order: ["
|
|
5336
|
-
pathPattern: "^
|
|
5337
|
-
},
|
|
5338
|
-
{
|
|
5339
|
-
order: [
|
|
5340
|
-
"name",
|
|
5341
|
-
"permissions",
|
|
5342
|
-
"needs",
|
|
5343
|
-
"if",
|
|
5344
|
-
"runs-on",
|
|
5345
|
-
"environment",
|
|
5346
|
-
"concurrency",
|
|
5347
|
-
"outputs",
|
|
5348
|
-
"env",
|
|
5349
|
-
"defaults",
|
|
5350
|
-
"steps",
|
|
5351
|
-
"timeout-minutes",
|
|
5352
|
-
"strategy",
|
|
5353
|
-
"continue-on-error",
|
|
5354
|
-
"container",
|
|
5355
|
-
"services",
|
|
5356
|
-
"uses",
|
|
5357
|
-
"with",
|
|
5358
|
-
"secrets"
|
|
5359
|
-
],
|
|
5360
|
-
pathPattern: "^jobs\\. [^.]+$"
|
|
5580
|
+
order: ["using", "steps"],
|
|
5581
|
+
pathPattern: "^runs$"
|
|
5361
5582
|
},
|
|
5362
5583
|
{
|
|
5363
5584
|
order: [
|
|
@@ -5369,132 +5590,31 @@ function sortGithubAction() {
|
|
|
5369
5590
|
"working-directory",
|
|
5370
5591
|
"with",
|
|
5371
5592
|
"env",
|
|
5593
|
+
"shell",
|
|
5372
5594
|
"continue-on-error",
|
|
5373
5595
|
"timeout-minutes"
|
|
5374
5596
|
],
|
|
5375
|
-
pathPattern: "^
|
|
5376
|
-
},
|
|
5377
|
-
{
|
|
5378
|
-
order: ["args", "entrypoint"],
|
|
5379
|
-
pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]\\.with$"
|
|
5380
|
-
},
|
|
5381
|
-
{
|
|
5382
|
-
order: [
|
|
5383
|
-
"matrix",
|
|
5384
|
-
"fail-fast",
|
|
5385
|
-
"max-parallel"
|
|
5386
|
-
],
|
|
5387
|
-
pathPattern: "^jobs\\.[^.]+\\.strategy$"
|
|
5388
|
-
},
|
|
5389
|
-
{
|
|
5390
|
-
order: ["include", "exclude"],
|
|
5391
|
-
pathPattern: "^jobs\\.[^.]+\\.strategy\\.matrix$"
|
|
5392
|
-
},
|
|
5393
|
-
{
|
|
5394
|
-
order: [
|
|
5395
|
-
"image",
|
|
5396
|
-
"credentials",
|
|
5397
|
-
"env",
|
|
5398
|
-
"ports",
|
|
5399
|
-
"volumes",
|
|
5400
|
-
"options"
|
|
5401
|
-
],
|
|
5402
|
-
pathPattern: "^jobs\\.[^.]+\\.container$"
|
|
5403
|
-
},
|
|
5404
|
-
{
|
|
5405
|
-
order: [
|
|
5406
|
-
"image",
|
|
5407
|
-
"credentials",
|
|
5408
|
-
"env",
|
|
5409
|
-
"ports",
|
|
5410
|
-
"volumes",
|
|
5411
|
-
"options"
|
|
5412
|
-
],
|
|
5413
|
-
pathPattern: "^jobs\\.[^.]+\\.services\\.[^.]+$"
|
|
5597
|
+
pathPattern: "^runs\\.steps\\[\\d+\\]$"
|
|
5414
5598
|
},
|
|
5415
5599
|
{
|
|
5416
5600
|
order: { type: "asc" },
|
|
5417
|
-
pathPattern: "^(
|
|
5601
|
+
pathPattern: "^(?!^$|inputs\\.[^.]+$|outputs\\.[^.]+$|runs$|runs\\.steps\\[\\d+\\]$).*$"
|
|
5418
5602
|
}
|
|
5419
|
-
]
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
{
|
|
5430
|
-
order: {
|
|
5431
|
-
natural: true,
|
|
5432
|
-
type: "asc"
|
|
5433
|
-
},
|
|
5434
|
-
pathPattern: "^on\\.[^.]+\\.(branches|branches-ignore|tags|tags-ignore|paths|paths-ignore|types)$"
|
|
5603
|
+
] }
|
|
5604
|
+
},
|
|
5605
|
+
{
|
|
5606
|
+
name: "isentinel/sort/github-labels",
|
|
5607
|
+
files: [".github/labels.y{,a}ml"],
|
|
5608
|
+
rules: { "flawless/yaml-sort-sequence-by-key": ["error", {
|
|
5609
|
+
key: "name",
|
|
5610
|
+
order: {
|
|
5611
|
+
natural: true,
|
|
5612
|
+
type: "asc"
|
|
5435
5613
|
},
|
|
5436
|
-
{
|
|
5437
|
-
order: {
|
|
5438
|
-
natural: true,
|
|
5439
|
-
type: "asc"
|
|
5440
|
-
},
|
|
5441
|
-
pathPattern: "^jobs\\.[^.]+\\.needs$"
|
|
5442
|
-
}
|
|
5443
|
-
]
|
|
5444
|
-
}
|
|
5445
|
-
}, {
|
|
5446
|
-
name: "isentinel/sort/github-composite-actions",
|
|
5447
|
-
files: [`.github/actions/${GLOB_YAML}`],
|
|
5448
|
-
rules: { "yaml/sort-keys": [
|
|
5449
|
-
"error",
|
|
5450
|
-
{
|
|
5451
|
-
order: [
|
|
5452
|
-
"name",
|
|
5453
|
-
"description",
|
|
5454
|
-
"inputs",
|
|
5455
|
-
"outputs",
|
|
5456
|
-
"runs"
|
|
5457
|
-
],
|
|
5458
5614
|
pathPattern: "^$"
|
|
5459
|
-
}
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
"description",
|
|
5463
|
-
"required",
|
|
5464
|
-
"default"
|
|
5465
|
-
],
|
|
5466
|
-
pathPattern: "^inputs\\.[^.]+$"
|
|
5467
|
-
},
|
|
5468
|
-
{
|
|
5469
|
-
order: ["description", "value"],
|
|
5470
|
-
pathPattern: "^outputs\\.[^.]+$"
|
|
5471
|
-
},
|
|
5472
|
-
{
|
|
5473
|
-
order: ["using", "steps"],
|
|
5474
|
-
pathPattern: "^runs$"
|
|
5475
|
-
},
|
|
5476
|
-
{
|
|
5477
|
-
order: [
|
|
5478
|
-
"id",
|
|
5479
|
-
"if",
|
|
5480
|
-
"name",
|
|
5481
|
-
"uses",
|
|
5482
|
-
"run",
|
|
5483
|
-
"working-directory",
|
|
5484
|
-
"with",
|
|
5485
|
-
"env",
|
|
5486
|
-
"shell",
|
|
5487
|
-
"continue-on-error",
|
|
5488
|
-
"timeout-minutes"
|
|
5489
|
-
],
|
|
5490
|
-
pathPattern: "^runs\\.steps\\[\\d+\\]$"
|
|
5491
|
-
},
|
|
5492
|
-
{
|
|
5493
|
-
order: { type: "asc" },
|
|
5494
|
-
pathPattern: "^(?!^$|inputs\\.[^.]+$|outputs\\.[^.]+$|runs$|runs\\.steps\\[\\d+\\]$).*$"
|
|
5495
|
-
}
|
|
5496
|
-
] }
|
|
5497
|
-
}];
|
|
5615
|
+
}] }
|
|
5616
|
+
}
|
|
5617
|
+
];
|
|
5498
5618
|
}
|
|
5499
5619
|
/**
|
|
5500
5620
|
* Sort mise configuration files by category.
|
|
@@ -5503,8 +5623,8 @@ function sortGithubAction() {
|
|
|
5503
5623
|
*
|
|
5504
5624
|
* @returns A promise resolving to an array of flat configuration items.
|
|
5505
5625
|
*/
|
|
5506
|
-
|
|
5507
|
-
const eslintPluginFlawless =
|
|
5626
|
+
function sortMiseToml() {
|
|
5627
|
+
const eslintPluginFlawless = lazyPlugin("eslint-plugin-flawless");
|
|
5508
5628
|
return [{
|
|
5509
5629
|
name: "isentinel/sort/mise-toml",
|
|
5510
5630
|
files: [...GLOB_MISE],
|
|
@@ -5949,13 +6069,23 @@ function sortCspell() {
|
|
|
5949
6069
|
"**/.cspell.y{,a}ml",
|
|
5950
6070
|
"**/.cspell.config.y{,a}ml"
|
|
5951
6071
|
],
|
|
5952
|
-
rules: {
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
6072
|
+
rules: {
|
|
6073
|
+
"flawless/yaml-sort-sequence-by-key": ["error", {
|
|
6074
|
+
key: "name",
|
|
6075
|
+
order: {
|
|
6076
|
+
natural: true,
|
|
6077
|
+
type: "asc"
|
|
6078
|
+
},
|
|
6079
|
+
pathPattern: "^((overrides|languageSettings)\\[\\d+\\]\\.)?dictionaryDefinitions$"
|
|
6080
|
+
}],
|
|
6081
|
+
"yaml/sort-sequence-values": ["error", {
|
|
6082
|
+
order: {
|
|
6083
|
+
natural: true,
|
|
6084
|
+
type: "asc"
|
|
6085
|
+
},
|
|
6086
|
+
pathPattern: "^((overrides|languageSettings)\\[\\d+\\]\\.)?(words|userWords|ignoreWords|noSuggestWords|flagWords|ignorePaths|dictionaries|enableFiletypes)$"
|
|
6087
|
+
}]
|
|
6088
|
+
}
|
|
5959
6089
|
}];
|
|
5960
6090
|
}
|
|
5961
6091
|
//#endregion
|
|
@@ -6021,13 +6151,12 @@ function spelling(options = {}) {
|
|
|
6021
6151
|
* @param options - Resolved stylistic options.
|
|
6022
6152
|
* @returns The rule map.
|
|
6023
6153
|
*/
|
|
6024
|
-
function stylisticRules({
|
|
6154
|
+
function stylisticRules({ quotes = "double" } = {}) {
|
|
6025
6155
|
return {
|
|
6026
6156
|
"antfu/consistent-list-newline": "off",
|
|
6027
6157
|
"antfu/if-newline": "off",
|
|
6028
6158
|
"antfu/top-level-function": "error",
|
|
6029
6159
|
"curly": ["error", "all"],
|
|
6030
|
-
...jsx ? { "style/jsx-curly-brace-presence": ["error", { propElementValues: "always" }] } : {},
|
|
6031
6160
|
"style/lines-between-class-members": ["error", { enforce: [{
|
|
6032
6161
|
blankLine: "always",
|
|
6033
6162
|
next: "method",
|
|
@@ -6078,6 +6207,17 @@ function stylisticRules({ jsx = true, quotes = "double" } = {}) {
|
|
|
6078
6207
|
]
|
|
6079
6208
|
};
|
|
6080
6209
|
}
|
|
6210
|
+
/**
|
|
6211
|
+
* JSX-specific stylistic rules shared between the ESLint and oxlint factories.
|
|
6212
|
+
* Scoped to JSX/TSX files: a `.ts` or `.js` file cannot contain JSX, so the
|
|
6213
|
+
* rules would only cost a traversal there.
|
|
6214
|
+
*
|
|
6215
|
+
* @param options - Resolved stylistic options.
|
|
6216
|
+
* @returns The rule map.
|
|
6217
|
+
*/
|
|
6218
|
+
function stylisticJsxRules({ jsx = true } = {}) {
|
|
6219
|
+
return jsx ? { "style/jsx-curly-brace-presence": ["error", { propElementValues: "always" }] } : {};
|
|
6220
|
+
}
|
|
6081
6221
|
//#endregion
|
|
6082
6222
|
//#region src/eslint/configs/stylistic.ts
|
|
6083
6223
|
init_globs();
|
|
@@ -6101,25 +6241,47 @@ function stylistic(options = {}) {
|
|
|
6101
6241
|
quotes,
|
|
6102
6242
|
semi
|
|
6103
6243
|
});
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6244
|
+
const presetRules = Object.entries(config.rules ?? {});
|
|
6245
|
+
return [
|
|
6246
|
+
{
|
|
6247
|
+
name: "isentinel/stylistic/setup",
|
|
6248
|
+
plugins: {
|
|
6249
|
+
antfu: pluginAntfu,
|
|
6250
|
+
style: pluginStylistic
|
|
6251
|
+
}
|
|
6252
|
+
},
|
|
6253
|
+
{
|
|
6254
|
+
name: "isentinel/stylistic",
|
|
6255
|
+
files: [GLOB_SRC],
|
|
6256
|
+
rules: {
|
|
6257
|
+
...Object.fromEntries(presetRules.filter((entry) => !isJsxRule(entry))),
|
|
6258
|
+
...stylisticRules({
|
|
6259
|
+
indent,
|
|
6260
|
+
jsx,
|
|
6261
|
+
quotes,
|
|
6262
|
+
semi
|
|
6263
|
+
})
|
|
6264
|
+
}
|
|
6265
|
+
},
|
|
6266
|
+
...jsx === false ? [] : [{
|
|
6267
|
+
name: "isentinel/stylistic/jsx",
|
|
6268
|
+
files: [GLOB_JSX, GLOB_TSX],
|
|
6269
|
+
rules: {
|
|
6270
|
+
...Object.fromEntries(presetRules.filter(isJsxRule)),
|
|
6271
|
+
...stylisticJsxRules({ jsx })
|
|
6272
|
+
}
|
|
6273
|
+
}]
|
|
6274
|
+
];
|
|
6275
|
+
}
|
|
6276
|
+
/**
|
|
6277
|
+
* The preset's `style/jsx-*` rules only report on JSX, which a `.ts` or `.js`
|
|
6278
|
+
* file cannot contain, so they go to their own JSX/TSX-scoped block.
|
|
6279
|
+
*
|
|
6280
|
+
* @param entry - A `[name, entry]` pair from the preset rules.
|
|
6281
|
+
* @returns Whether the rule is a `style/jsx-*` rule.
|
|
6282
|
+
*/
|
|
6283
|
+
function isJsxRule([name]) {
|
|
6284
|
+
return name.startsWith("style/jsx-");
|
|
6123
6285
|
}
|
|
6124
6286
|
//#endregion
|
|
6125
6287
|
//#region src/rules/test.ts
|
|
@@ -6172,6 +6334,7 @@ function jestExtendedRules() {
|
|
|
6172
6334
|
*/
|
|
6173
6335
|
function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = true, stylistic = true } = {}) {
|
|
6174
6336
|
return {
|
|
6337
|
+
"flawless/no-incompatible-assertion-types": "error",
|
|
6175
6338
|
"flawless/no-shared-mocks": "error",
|
|
6176
6339
|
"flawless/prefer-expect-assertions-count": "error",
|
|
6177
6340
|
"jest/consistent-test-it": "error",
|
|
@@ -6251,6 +6414,7 @@ function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = tr
|
|
|
6251
6414
|
function vitestRules({ extended = false, isInEditor = false, stylistic = true } = {}) {
|
|
6252
6415
|
return {
|
|
6253
6416
|
"flawless/no-conditional-in-test": ["error", { allowOptionalChaining: false }],
|
|
6417
|
+
"flawless/no-incompatible-assertion-types": "error",
|
|
6254
6418
|
"flawless/no-shared-mocks": "error",
|
|
6255
6419
|
"flawless/prefer-ending-with-an-expect": ["warn", { assertFunctionNames: [
|
|
6256
6420
|
"expect",
|
|
@@ -6593,6 +6757,7 @@ function typescriptTypeAwareRules({ roblox = true } = {}) {
|
|
|
6593
6757
|
ignoreVoid: true
|
|
6594
6758
|
}],
|
|
6595
6759
|
"ts/no-for-in-array": "error",
|
|
6760
|
+
"ts/no-generated-empty-object-type": "error",
|
|
6596
6761
|
"ts/no-implied-eval": "error",
|
|
6597
6762
|
"ts/no-meaningless-void-operator": "error",
|
|
6598
6763
|
"ts/no-misused-promises": "error",
|
|
@@ -6612,6 +6777,7 @@ function typescriptTypeAwareRules({ roblox = true } = {}) {
|
|
|
6612
6777
|
"ts/no-unsafe-argument": "error",
|
|
6613
6778
|
"ts/no-unsafe-assignment": "error",
|
|
6614
6779
|
"ts/no-unsafe-call": "error",
|
|
6780
|
+
"ts/no-unsafe-enum-assignment": "error",
|
|
6615
6781
|
"ts/no-unsafe-enum-comparison": "error",
|
|
6616
6782
|
"ts/no-unsafe-member-access": "error",
|
|
6617
6783
|
"ts/no-unsafe-return": "error",
|
|
@@ -6937,8 +7103,8 @@ function unicornRootRules(options = {}) {
|
|
|
6937
7103
|
//#endregion
|
|
6938
7104
|
//#region src/eslint/configs/unicorn.ts
|
|
6939
7105
|
init_globs();
|
|
6940
|
-
|
|
6941
|
-
const pluginUnicorn =
|
|
7106
|
+
function unicorn({ complementIgnores, nameReplacements, roblox = true, root: customRootGlobs, stylistic = true } = {}) {
|
|
7107
|
+
const pluginUnicorn = lazyPlugin("eslint-plugin-unicorn");
|
|
6942
7108
|
const rootGlobs = mergeGlobs(GLOB_ROOT.map(toSourceGlob), customRootGlobs?.map(toSourceGlob));
|
|
6943
7109
|
return [
|
|
6944
7110
|
{
|
|
@@ -6983,7 +7149,7 @@ async function unicorn({ complementIgnores, nameReplacements, roblox = true, roo
|
|
|
6983
7149
|
];
|
|
6984
7150
|
}
|
|
6985
7151
|
//#endregion
|
|
6986
|
-
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-plugin-yml/3.5.0/
|
|
7152
|
+
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-plugin-yml/3.5.0/dab6fa0a572e2f603776d82efad12c6f3caccb36940fd989e9c4ddfa6a0dd18e/node_modules/eslint-plugin-yml/lib/chunk-CfYAbeIz.mjs
|
|
6987
7153
|
var __defProp$1, __exportAll$1;
|
|
6988
7154
|
var init_chunk_CfYAbeIz = __esmMin((() => {
|
|
6989
7155
|
__defProp$1 = Object.defineProperty;
|
|
@@ -10166,7 +10332,7 @@ var init_lib$1 = __esmMin((() => {
|
|
|
10166
10332
|
({ ...meta_exports$1 });
|
|
10167
10333
|
}));
|
|
10168
10334
|
//#endregion
|
|
10169
|
-
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-plugin-yml/3.5.0/
|
|
10335
|
+
//#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-plugin-yml/3.5.0/dab6fa0a572e2f603776d82efad12c6f3caccb36940fd989e9c4ddfa6a0dd18e/node_modules/eslint-plugin-yml/lib/index.mjs
|
|
10170
10336
|
var lib_exports = /* @__PURE__ */ __exportAll$2({
|
|
10171
10337
|
configs: () => configs,
|
|
10172
10338
|
default: () => src_default,
|
|
@@ -16070,12 +16236,9 @@ var init_lib = __esmMin((() => {
|
|
|
16070
16236
|
//#endregion
|
|
16071
16237
|
//#region src/eslint/configs/yaml.ts
|
|
16072
16238
|
init_globs();
|
|
16073
|
-
async function yaml({ files = [GLOB_YAML, "**/github-actions-workflow"], overrides = {}, stylistic = true } = {}) {
|
|
16074
|
-
const
|
|
16075
|
-
|
|
16076
|
-
interopDefault(import("yaml-eslint-parser")),
|
|
16077
|
-
interopDefault(import("eslint-plugin-flawless"))
|
|
16078
|
-
]);
|
|
16239
|
+
async function yaml({ files = [GLOB_YAML, "**/github-actions-workflow"], overrides = {}, prettierOptions = {}, stylistic = true } = {}) {
|
|
16240
|
+
const eslintPluginFlawless = lazyPlugin("eslint-plugin-flawless");
|
|
16241
|
+
const [pluginYaml, parserYaml] = await Promise.all([interopDefault(Promise.resolve().then(() => (init_lib(), lib_exports))), interopDefault(import("yaml-eslint-parser"))]);
|
|
16079
16242
|
return [{
|
|
16080
16243
|
name: "isentinel/yaml/setup",
|
|
16081
16244
|
plugins: {
|
|
@@ -16097,6 +16260,13 @@ async function yaml({ files = [GLOB_YAML, "**/github-actions-workflow"], overrid
|
|
|
16097
16260
|
"yaml/plain-scalar": "error",
|
|
16098
16261
|
...stylistic !== false ? {
|
|
16099
16262
|
"flawless/yaml-block-key-blank-lines": "error",
|
|
16263
|
+
"style/max-len": ["error", {
|
|
16264
|
+
code: prettierOptions.printWidth ?? 100,
|
|
16265
|
+
comments: Number(prettierOptions["jsdocPrintWidth"]) || 80,
|
|
16266
|
+
ignorePattern: String.raw`^\s*(?:-\s+)?uses:\s`,
|
|
16267
|
+
ignoreUrls: true,
|
|
16268
|
+
tabWidth: 2
|
|
16269
|
+
}],
|
|
16100
16270
|
"yaml/block-mapping": "error",
|
|
16101
16271
|
"yaml/block-mapping-colon-indicator-newline": "error",
|
|
16102
16272
|
"yaml/block-mapping-question-indicator-newline": "error",
|
|
@@ -16194,6 +16364,8 @@ const typeAwarePrefixes = /* @__PURE__ */ new Set([
|
|
|
16194
16364
|
const typeAwareRuleIds = /* @__PURE__ */ new Set([
|
|
16195
16365
|
"eslint-plugin/no-property-in-node",
|
|
16196
16366
|
"flawless/naming-convention",
|
|
16367
|
+
"flawless/no-ignored-return",
|
|
16368
|
+
"flawless/no-incompatible-assertion-types",
|
|
16197
16369
|
"flawless/no-materialized-filter-map",
|
|
16198
16370
|
"flawless/no-redundant-type-annotation",
|
|
16199
16371
|
"flawless/no-reflect-set",
|
|
@@ -16294,6 +16466,7 @@ const typeAwareRuleIds = /* @__PURE__ */ new Set([
|
|
|
16294
16466
|
"ts/no-duplicate-type-constituents",
|
|
16295
16467
|
"ts/no-floating-promises",
|
|
16296
16468
|
"ts/no-for-in-array",
|
|
16469
|
+
"ts/no-generated-empty-object-type",
|
|
16297
16470
|
"ts/no-implied-eval",
|
|
16298
16471
|
"ts/no-meaningless-void-operator",
|
|
16299
16472
|
"ts/no-misused-promises",
|
|
@@ -16311,6 +16484,7 @@ const typeAwareRuleIds = /* @__PURE__ */ new Set([
|
|
|
16311
16484
|
"ts/no-unsafe-argument",
|
|
16312
16485
|
"ts/no-unsafe-assignment",
|
|
16313
16486
|
"ts/no-unsafe-call",
|
|
16487
|
+
"ts/no-unsafe-enum-assignment",
|
|
16314
16488
|
"ts/no-unsafe-enum-comparison",
|
|
16315
16489
|
"ts/no-unsafe-member-access",
|
|
16316
16490
|
"ts/no-unsafe-return",
|
|
@@ -16453,6 +16627,8 @@ var init_adapters = __esmMin((() => {
|
|
|
16453
16627
|
]);
|
|
16454
16628
|
typeAwareJsPluginRules = /* @__PURE__ */ new Set([
|
|
16455
16629
|
"eslint-plugin/no-property-in-node",
|
|
16630
|
+
"flawless/no-ignored-return",
|
|
16631
|
+
"flawless/no-incompatible-assertion-types",
|
|
16456
16632
|
"jest/no-error-equal",
|
|
16457
16633
|
"jest/no-unnecessary-assertion",
|
|
16458
16634
|
"jest/unbound-method",
|
|
@@ -16462,12 +16638,9 @@ var init_adapters = __esmMin((() => {
|
|
|
16462
16638
|
"react/no-implicit-ref",
|
|
16463
16639
|
"react/no-leaked-conditional-rendering",
|
|
16464
16640
|
"react/no-unused-props",
|
|
16465
|
-
"sonar/no-ignored-return",
|
|
16466
|
-
"sonar/no-incompatible-assertion-types",
|
|
16467
16641
|
"sonar/no-redundant-optional",
|
|
16468
16642
|
"sonar/no-try-promise",
|
|
16469
16643
|
"sonar/prefer-immediate-return",
|
|
16470
|
-
"ts/prefer-destructuring",
|
|
16471
16644
|
"unicorn/no-non-function-verb-prefix"
|
|
16472
16645
|
]);
|
|
16473
16646
|
ESLINT_ONLY = "eslint-only";
|
|
@@ -16519,7 +16692,8 @@ var init_adapters = __esmMin((() => {
|
|
|
16519
16692
|
"no-shadow",
|
|
16520
16693
|
"no-unused-expressions",
|
|
16521
16694
|
"no-unused-private-class-members",
|
|
16522
|
-
"no-useless-constructor"
|
|
16695
|
+
"no-useless-constructor",
|
|
16696
|
+
"prefer-destructuring"
|
|
16523
16697
|
]);
|
|
16524
16698
|
UNICORN_NATIVE_RENAMES = { "no-for-each": "no-array-for-each" };
|
|
16525
16699
|
}));
|
|
@@ -16833,14 +17007,19 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
16833
17007
|
"eslint-plugin/test-case-shorthand-strings",
|
|
16834
17008
|
"eslint-plugin/unique-test-case-names",
|
|
16835
17009
|
"flawless/arrow-return-style",
|
|
17010
|
+
"flawless/cognitive-complexity",
|
|
16836
17011
|
"flawless/jsx-shorthand-boolean",
|
|
16837
17012
|
"flawless/jsx-shorthand-fragment",
|
|
17013
|
+
"flawless/max-comment-length",
|
|
16838
17014
|
"flawless/max-lines-per-function",
|
|
16839
17015
|
"flawless/naming-convention",
|
|
16840
17016
|
"flawless/no-conditional-empty-object-spread",
|
|
16841
17017
|
"flawless/no-conditional-in-test",
|
|
17018
|
+
"flawless/no-em-dash",
|
|
16842
17019
|
"flawless/no-export-default-arrow",
|
|
16843
17020
|
"flawless/no-floating-point-equality",
|
|
17021
|
+
"flawless/no-ignored-return",
|
|
17022
|
+
"flawless/no-incompatible-assertion-types",
|
|
16844
17023
|
"flawless/no-known-value-widening",
|
|
16845
17024
|
"flawless/no-materialized-filter-map",
|
|
16846
17025
|
"flawless/no-object-parameters",
|
|
@@ -16851,8 +17030,10 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
16851
17030
|
"flawless/no-shape-in-symbol-names",
|
|
16852
17031
|
"flawless/no-shared-mocks",
|
|
16853
17032
|
"flawless/no-shared-test-state",
|
|
17033
|
+
"flawless/no-trivial-functions",
|
|
16854
17034
|
"flawless/no-unknown-parameters",
|
|
16855
17035
|
"flawless/no-unknown-returns",
|
|
17036
|
+
"flawless/no-unnecessary-prop-alias",
|
|
16856
17037
|
"flawless/no-unnecessary-use-callback",
|
|
16857
17038
|
"flawless/no-unnecessary-use-memo",
|
|
16858
17039
|
"flawless/no-unsafe-dictionary-type",
|
|
@@ -16868,6 +17049,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
16868
17049
|
"flawless/react-namespace",
|
|
16869
17050
|
"flawless/toml-sort-keys",
|
|
16870
17051
|
"flawless/yaml-block-key-blank-lines",
|
|
17052
|
+
"flawless/yaml-sort-sequence-by-key",
|
|
16871
17053
|
"for-direction",
|
|
16872
17054
|
"func-call-spacing",
|
|
16873
17055
|
"func-name-matching",
|
|
@@ -17005,6 +17187,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17005
17187
|
"jsdoc/no-restricted-syntax",
|
|
17006
17188
|
"jsdoc/no-types",
|
|
17007
17189
|
"jsdoc/no-undefined-types",
|
|
17190
|
+
"jsdoc/no-unnecessary-type-assertion",
|
|
17008
17191
|
"jsdoc/normalize-see-links",
|
|
17009
17192
|
"jsdoc/prefer-import-tag",
|
|
17010
17193
|
"jsdoc/reject-any-type",
|
|
@@ -17044,6 +17227,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17044
17227
|
"jsdoc/sort-tags",
|
|
17045
17228
|
"jsdoc/tag-lines",
|
|
17046
17229
|
"jsdoc/text-escaping",
|
|
17230
|
+
"jsdoc/ts-ban-ts-comment",
|
|
17047
17231
|
"jsdoc/ts-method-signature-style",
|
|
17048
17232
|
"jsdoc/ts-no-empty-object-type",
|
|
17049
17233
|
"jsdoc/ts-no-unnecessary-template-expression",
|
|
@@ -17297,6 +17481,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17297
17481
|
"perfectionist/sort-array-includes",
|
|
17298
17482
|
"perfectionist/sort-arrays",
|
|
17299
17483
|
"perfectionist/sort-classes",
|
|
17484
|
+
"perfectionist/sort-constructor-parameters",
|
|
17300
17485
|
"perfectionist/sort-decorators",
|
|
17301
17486
|
"perfectionist/sort-enums",
|
|
17302
17487
|
"perfectionist/sort-export-attributes",
|
|
@@ -17458,6 +17643,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17458
17643
|
"small-rules/ban-react-fc",
|
|
17459
17644
|
"small-rules/ban-types",
|
|
17460
17645
|
"small-rules/consistent-compound-words",
|
|
17646
|
+
"small-rules/curly",
|
|
17461
17647
|
"small-rules/directive-disable-enable-pair",
|
|
17462
17648
|
"small-rules/directive-no-aggregating-enable",
|
|
17463
17649
|
"small-rules/directive-no-duplicate-disable",
|
|
@@ -17469,53 +17655,89 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17469
17655
|
"small-rules/enforce-ianitor-check-type",
|
|
17470
17656
|
"small-rules/isolated-functions",
|
|
17471
17657
|
"small-rules/memoized-effect-dependencies",
|
|
17658
|
+
"small-rules/no-adjust-state-on-prop-change",
|
|
17472
17659
|
"small-rules/no-array-constructor-elements",
|
|
17473
17660
|
"small-rules/no-array-constructor-index-assignment",
|
|
17474
17661
|
"small-rules/no-array-size-assignment",
|
|
17475
17662
|
"small-rules/no-async-constructor",
|
|
17476
17663
|
"small-rules/no-async-in-system",
|
|
17477
17664
|
"small-rules/no-cascading-set-state",
|
|
17665
|
+
"small-rules/no-chain-state-updates",
|
|
17666
|
+
"small-rules/no-chained-type-assertions",
|
|
17667
|
+
"small-rules/no-cliffy-action-wrapper",
|
|
17478
17668
|
"small-rules/no-color3-constructor",
|
|
17479
17669
|
"small-rules/no-commented-code",
|
|
17670
|
+
"small-rules/no-conditional-empty-object-spread",
|
|
17480
17671
|
"small-rules/no-constant-condition-with-break",
|
|
17481
17672
|
"small-rules/no-dead-store",
|
|
17673
|
+
"small-rules/no-derived-state",
|
|
17674
|
+
"small-rules/no-discarded-rejection",
|
|
17482
17675
|
"small-rules/no-error",
|
|
17676
|
+
"small-rules/no-event-handler",
|
|
17483
17677
|
"small-rules/no-events-in-events-callback",
|
|
17678
|
+
"small-rules/no-external-store-subscription",
|
|
17484
17679
|
"small-rules/no-filter-map-chain",
|
|
17485
17680
|
"small-rules/no-floating-point-equality",
|
|
17486
17681
|
"small-rules/no-giant-component",
|
|
17487
17682
|
"small-rules/no-god-components",
|
|
17683
|
+
"small-rules/no-has-before-remove-in-jecs",
|
|
17488
17684
|
"small-rules/no-ianitor-in-function-body",
|
|
17489
17685
|
"small-rules/no-ianitor-success-access",
|
|
17490
17686
|
"small-rules/no-identity-map",
|
|
17491
17687
|
"small-rules/no-increment-decrement",
|
|
17688
|
+
"small-rules/no-initialize-state",
|
|
17492
17689
|
"small-rules/no-inline-property-on-memo-component",
|
|
17690
|
+
"small-rules/no-inline-signature-types",
|
|
17493
17691
|
"small-rules/no-instance-methods-without-this",
|
|
17692
|
+
"small-rules/no-jsx-spread-child",
|
|
17693
|
+
"small-rules/no-known-value-widening",
|
|
17494
17694
|
"small-rules/no-loop-iterable-mutation",
|
|
17695
|
+
"small-rules/no-module-mocking",
|
|
17696
|
+
"small-rules/no-multiple-cliffy-commands",
|
|
17495
17697
|
"small-rules/no-native-properties-spread",
|
|
17698
|
+
"small-rules/no-nested-hook-calls",
|
|
17496
17699
|
"small-rules/no-new-instance-in-use-memo",
|
|
17700
|
+
"small-rules/no-object-parameters",
|
|
17701
|
+
"small-rules/no-pass-data-to-parent",
|
|
17702
|
+
"small-rules/no-pass-live-state-to-parent",
|
|
17497
17703
|
"small-rules/no-print",
|
|
17704
|
+
"small-rules/no-real-temporary-directory",
|
|
17498
17705
|
"small-rules/no-recursive",
|
|
17706
|
+
"small-rules/no-reduce-accumulator-copy",
|
|
17499
17707
|
"small-rules/no-redundant-aspect-ratio-constraint",
|
|
17708
|
+
"small-rules/no-reflect-apply",
|
|
17709
|
+
"small-rules/no-reflect-get",
|
|
17500
17710
|
"small-rules/no-render-helper-functions",
|
|
17711
|
+
"small-rules/no-reset-all-state-on-prop-change",
|
|
17501
17712
|
"small-rules/no-restricted-property-assignment",
|
|
17713
|
+
"small-rules/no-runtime-in-type-files",
|
|
17714
|
+
"small-rules/no-runtime-typeof",
|
|
17715
|
+
"small-rules/no-shape-in-symbol-names",
|
|
17502
17716
|
"small-rules/no-spec-file-extension",
|
|
17503
17717
|
"small-rules/no-static-react-create-element",
|
|
17504
17718
|
"small-rules/no-table-create-map",
|
|
17505
17719
|
"small-rules/no-task-wait",
|
|
17720
|
+
"small-rules/no-test-timeout",
|
|
17506
17721
|
"small-rules/no-trivial-assertions",
|
|
17507
17722
|
"small-rules/no-underscore-react-props",
|
|
17723
|
+
"small-rules/no-unknown-parameters",
|
|
17724
|
+
"small-rules/no-unknown-returns",
|
|
17725
|
+
"small-rules/no-unknown-type-aliases",
|
|
17726
|
+
"small-rules/no-unsafe-dictionary-type",
|
|
17727
|
+
"small-rules/no-unsupported-syntax",
|
|
17508
17728
|
"small-rules/no-unused-imports",
|
|
17509
17729
|
"small-rules/no-unused-use-memo",
|
|
17510
17730
|
"small-rules/no-use-memo-simple-expression",
|
|
17511
17731
|
"small-rules/no-use-of-empty-return-value",
|
|
17512
17732
|
"small-rules/no-useless-constants",
|
|
17513
17733
|
"small-rules/no-useless-default",
|
|
17734
|
+
"small-rules/no-useless-empty-string-comparison",
|
|
17514
17735
|
"small-rules/no-useless-use-effect",
|
|
17515
17736
|
"small-rules/no-useless-use-memo",
|
|
17516
17737
|
"small-rules/no-useless-use-spring",
|
|
17517
17738
|
"small-rules/no-variadic-spread",
|
|
17518
17739
|
"small-rules/no-warn",
|
|
17740
|
+
"small-rules/no-widen-then-assert",
|
|
17519
17741
|
"small-rules/only-type-imports",
|
|
17520
17742
|
"small-rules/prefer-class-properties",
|
|
17521
17743
|
"small-rules/prefer-constant-dispatch",
|
|
@@ -17528,12 +17750,15 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17528
17750
|
"small-rules/prefer-idiv",
|
|
17529
17751
|
"small-rules/prefer-local-portal-component",
|
|
17530
17752
|
"small-rules/prefer-math-min-max",
|
|
17753
|
+
"small-rules/prefer-membership-filter-in-jecs",
|
|
17531
17754
|
"small-rules/prefer-modding-inspect",
|
|
17532
17755
|
"small-rules/prefer-module-scope-constants",
|
|
17756
|
+
"small-rules/prefer-native-collection-copy",
|
|
17757
|
+
"small-rules/prefer-optional-parameter",
|
|
17533
17758
|
"small-rules/prefer-padding-components",
|
|
17534
17759
|
"small-rules/prefer-pascal-case-enums",
|
|
17535
17760
|
"small-rules/prefer-sequence-overloads",
|
|
17536
|
-
"small-rules/prefer-single-world-query",
|
|
17761
|
+
"small-rules/prefer-single-world-query-in-jecs",
|
|
17537
17762
|
"small-rules/prefer-singular-enums",
|
|
17538
17763
|
"small-rules/prefer-ternary-conditional-rendering",
|
|
17539
17764
|
"small-rules/prefer-udim2-shorthand",
|
|
@@ -17546,10 +17771,14 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
17546
17771
|
"small-rules/require-paired-calls",
|
|
17547
17772
|
"small-rules/require-react-component-keys",
|
|
17548
17773
|
"small-rules/require-react-display-names",
|
|
17774
|
+
"small-rules/require-readable-spacing",
|
|
17775
|
+
"small-rules/require-safety-comment-for-type-assertion",
|
|
17549
17776
|
"small-rules/require-switch-case-braces",
|
|
17550
17777
|
"small-rules/require-throw-error-capture",
|
|
17778
|
+
"small-rules/require-tsx-for-hooks",
|
|
17551
17779
|
"small-rules/require-unicode-regex",
|
|
17552
17780
|
"small-rules/rerender-memo-with-default-value",
|
|
17781
|
+
"small-rules/starts-with-verb",
|
|
17553
17782
|
"small-rules/strict-component-boundaries",
|
|
17554
17783
|
"small-rules/use-exhaustive-dependencies",
|
|
17555
17784
|
"small-rules/use-hook-at-top-level",
|
|
@@ -18014,6 +18243,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18014
18243
|
"ts/no-extraneous-class",
|
|
18015
18244
|
"ts/no-floating-promises",
|
|
18016
18245
|
"ts/no-for-in-array",
|
|
18246
|
+
"ts/no-generated-empty-object-type",
|
|
18017
18247
|
"ts/no-implied-eval",
|
|
18018
18248
|
"ts/no-import-type-side-effects",
|
|
18019
18249
|
"ts/no-inferrable-types",
|
|
@@ -18053,6 +18283,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18053
18283
|
"ts/no-unsafe-assignment",
|
|
18054
18284
|
"ts/no-unsafe-call",
|
|
18055
18285
|
"ts/no-unsafe-declaration-merging",
|
|
18286
|
+
"ts/no-unsafe-enum-assignment",
|
|
18056
18287
|
"ts/no-unsafe-enum-comparison",
|
|
18057
18288
|
"ts/no-unsafe-function-type",
|
|
18058
18289
|
"ts/no-unsafe-member-access",
|
|
@@ -18543,6 +18774,8 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18543
18774
|
typeAwareJsPluginRuleNames = /* @__PURE__ */ new Set([
|
|
18544
18775
|
"eslint-plugin/no-property-in-node",
|
|
18545
18776
|
"flawless/naming-convention",
|
|
18777
|
+
"flawless/no-ignored-return",
|
|
18778
|
+
"flawless/no-incompatible-assertion-types",
|
|
18546
18779
|
"flawless/no-materialized-filter-map",
|
|
18547
18780
|
"flawless/no-redundant-type-annotation",
|
|
18548
18781
|
"flawless/no-reflect-set",
|
|
@@ -18643,6 +18876,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18643
18876
|
"ts/no-duplicate-type-constituents",
|
|
18644
18877
|
"ts/no-floating-promises",
|
|
18645
18878
|
"ts/no-for-in-array",
|
|
18879
|
+
"ts/no-generated-empty-object-type",
|
|
18646
18880
|
"ts/no-implied-eval",
|
|
18647
18881
|
"ts/no-meaningless-void-operator",
|
|
18648
18882
|
"ts/no-misused-promises",
|
|
@@ -18660,6 +18894,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18660
18894
|
"ts/no-unsafe-argument",
|
|
18661
18895
|
"ts/no-unsafe-assignment",
|
|
18662
18896
|
"ts/no-unsafe-call",
|
|
18897
|
+
"ts/no-unsafe-enum-assignment",
|
|
18663
18898
|
"ts/no-unsafe-enum-comparison",
|
|
18664
18899
|
"ts/no-unsafe-member-access",
|
|
18665
18900
|
"ts/no-unsafe-return",
|
|
@@ -18786,13 +19021,18 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18786
19021
|
"eslint-plugin/test-case-shorthand-strings",
|
|
18787
19022
|
"eslint-plugin/unique-test-case-names",
|
|
18788
19023
|
"flawless/arrow-return-style",
|
|
19024
|
+
"flawless/cognitive-complexity",
|
|
18789
19025
|
"flawless/jsx-shorthand-boolean",
|
|
18790
19026
|
"flawless/jsx-shorthand-fragment",
|
|
19027
|
+
"flawless/max-comment-length",
|
|
18791
19028
|
"flawless/max-lines-per-function",
|
|
18792
19029
|
"flawless/no-conditional-empty-object-spread",
|
|
18793
19030
|
"flawless/no-conditional-in-test",
|
|
19031
|
+
"flawless/no-em-dash",
|
|
18794
19032
|
"flawless/no-export-default-arrow",
|
|
18795
19033
|
"flawless/no-floating-point-equality",
|
|
19034
|
+
"flawless/no-ignored-return",
|
|
19035
|
+
"flawless/no-incompatible-assertion-types",
|
|
18796
19036
|
"flawless/no-known-value-widening",
|
|
18797
19037
|
"flawless/no-materialized-filter-map",
|
|
18798
19038
|
"flawless/no-object-parameters",
|
|
@@ -18801,7 +19041,10 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
18801
19041
|
"flawless/no-reflect-set",
|
|
18802
19042
|
"flawless/no-shape-in-symbol-names",
|
|
18803
19043
|
"flawless/no-shared-mocks",
|
|
19044
|
+
"flawless/no-trivial-functions",
|
|
19045
|
+
"flawless/no-unknown-parameters",
|
|
18804
19046
|
"flawless/no-unknown-returns",
|
|
19047
|
+
"flawless/no-unnecessary-prop-alias",
|
|
18805
19048
|
"flawless/no-unnecessary-use-callback",
|
|
18806
19049
|
"flawless/no-unnecessary-use-memo",
|
|
18807
19050
|
"flawless/no-unsafe-dictionary-type",
|
|
@@ -19171,7 +19414,6 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
19171
19414
|
"small-rules/require-async-suffix",
|
|
19172
19415
|
"small-rules/strict-component-boundaries",
|
|
19173
19416
|
"sonar/bool-param-default",
|
|
19174
|
-
"sonar/cognitive-complexity",
|
|
19175
19417
|
"sonar/constructor-for-side-effects",
|
|
19176
19418
|
"sonar/destructuring-assignment-syntax",
|
|
19177
19419
|
"sonar/elseif-without-else",
|
|
@@ -19188,13 +19430,10 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
19188
19430
|
"sonar/no-duplicated-branches",
|
|
19189
19431
|
"sonar/no-element-overwrite",
|
|
19190
19432
|
"sonar/no-empty-collection",
|
|
19191
|
-
"sonar/no-floating-point-equality",
|
|
19192
19433
|
"sonar/no-gratuitous-expressions",
|
|
19193
19434
|
"sonar/no-identical-conditions",
|
|
19194
19435
|
"sonar/no-identical-expressions",
|
|
19195
19436
|
"sonar/no-identical-functions",
|
|
19196
|
-
"sonar/no-ignored-return",
|
|
19197
|
-
"sonar/no-incompatible-assertion-types",
|
|
19198
19437
|
"sonar/no-inverted-boolean-check",
|
|
19199
19438
|
"sonar/no-mixed-completion-style",
|
|
19200
19439
|
"sonar/no-nested-conditional",
|
|
@@ -19262,6 +19501,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
19262
19501
|
"ts/no-extraneous-class",
|
|
19263
19502
|
"ts/no-floating-promises",
|
|
19264
19503
|
"ts/no-for-in-array",
|
|
19504
|
+
"ts/no-generated-empty-object-type",
|
|
19265
19505
|
"ts/no-implied-eval",
|
|
19266
19506
|
"ts/no-import-type-side-effects",
|
|
19267
19507
|
"ts/no-inferrable-types",
|
|
@@ -19294,6 +19534,7 @@ var init_oxlint_capabilities = __esmMin((() => {
|
|
|
19294
19534
|
"ts/no-unsafe-assignment",
|
|
19295
19535
|
"ts/no-unsafe-call",
|
|
19296
19536
|
"ts/no-unsafe-declaration-merging",
|
|
19537
|
+
"ts/no-unsafe-enum-assignment",
|
|
19297
19538
|
"ts/no-unsafe-enum-comparison",
|
|
19298
19539
|
"ts/no-unsafe-function-type",
|
|
19299
19540
|
"ts/no-unsafe-member-access",
|
|
@@ -19935,16 +20176,24 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
19935
20176
|
"react-perf/jsx-no-new-function-as-prop",
|
|
19936
20177
|
"react-perf/jsx-no-new-object-as-prop",
|
|
19937
20178
|
"react/button-has-type",
|
|
20179
|
+
"react/capitalized-calls",
|
|
19938
20180
|
"react/checked-requires-onchange-or-readonly",
|
|
19939
20181
|
"react/display-name",
|
|
20182
|
+
"react/error-boundaries",
|
|
19940
20183
|
"react/exhaustive-deps",
|
|
20184
|
+
"react/exhaustive-effect-dependencies",
|
|
19941
20185
|
"react/forbid-component-props",
|
|
19942
20186
|
"react/forbid-dom-props",
|
|
19943
20187
|
"react/forbid-elements",
|
|
19944
20188
|
"react/forward-ref-uses-ref",
|
|
19945
20189
|
"react/function-component-definition",
|
|
20190
|
+
"react/globals",
|
|
19946
20191
|
"react/hook-use-state",
|
|
20192
|
+
"react/hooks",
|
|
19947
20193
|
"react/iframe-missing-sandbox",
|
|
20194
|
+
"react/immutability",
|
|
20195
|
+
"react/incompatible-library",
|
|
20196
|
+
"react/invariant",
|
|
19948
20197
|
"react/jsx-boolean-value",
|
|
19949
20198
|
"react/jsx-curly-brace-presence",
|
|
19950
20199
|
"react/jsx-filename-extension",
|
|
@@ -19963,11 +20212,13 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
19963
20212
|
"react/jsx-pascal-case",
|
|
19964
20213
|
"react/jsx-props-no-spread-multi",
|
|
19965
20214
|
"react/jsx-props-no-spreading",
|
|
20215
|
+
"react/memo-dependencies",
|
|
19966
20216
|
"react/no-array-index-key",
|
|
19967
20217
|
"react/no-children-prop",
|
|
19968
20218
|
"react/no-clone-element",
|
|
19969
20219
|
"react/no-danger",
|
|
19970
20220
|
"react/no-danger-with-children",
|
|
20221
|
+
"react/no-deriving-state-in-effects",
|
|
19971
20222
|
"react/no-did-mount-set-state",
|
|
19972
20223
|
"react/no-did-update-set-state",
|
|
19973
20224
|
"react/no-direct-mutation-state",
|
|
@@ -19990,14 +20241,25 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
19990
20241
|
"react/only-export-components",
|
|
19991
20242
|
"react/prefer-es6-class",
|
|
19992
20243
|
"react/prefer-function-component",
|
|
19993
|
-
"react/
|
|
20244
|
+
"react/preserve-manual-memoization",
|
|
20245
|
+
"react/purity",
|
|
19994
20246
|
"react/react-in-jsx-scope",
|
|
20247
|
+
"react/refs",
|
|
19995
20248
|
"react/require-render-return",
|
|
20249
|
+
"react/rule-suppression",
|
|
19996
20250
|
"react/rules-of-hooks",
|
|
19997
20251
|
"react/self-closing-comp",
|
|
20252
|
+
"react/set-state-in-effect",
|
|
20253
|
+
"react/set-state-in-render",
|
|
19998
20254
|
"react/state-in-constructor",
|
|
20255
|
+
"react/static-components",
|
|
19999
20256
|
"react/style-prop-object",
|
|
20257
|
+
"react/syntax",
|
|
20258
|
+
"react/todo",
|
|
20259
|
+
"react/unsupported-syntax",
|
|
20260
|
+
"react/use-memo",
|
|
20000
20261
|
"react/void-dom-elements-no-children",
|
|
20262
|
+
"react/void-use-memo",
|
|
20001
20263
|
"require-await",
|
|
20002
20264
|
"require-unicode-regexp",
|
|
20003
20265
|
"require-yield",
|
|
@@ -20039,6 +20301,7 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
20039
20301
|
"typescript/no-extraneous-class",
|
|
20040
20302
|
"typescript/no-floating-promises",
|
|
20041
20303
|
"typescript/no-for-in-array",
|
|
20304
|
+
"typescript/no-generated-empty-object-type",
|
|
20042
20305
|
"typescript/no-implied-eval",
|
|
20043
20306
|
"typescript/no-import-type-side-effects",
|
|
20044
20307
|
"typescript/no-inferrable-types",
|
|
@@ -20070,6 +20333,7 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
20070
20333
|
"typescript/no-unsafe-assignment",
|
|
20071
20334
|
"typescript/no-unsafe-call",
|
|
20072
20335
|
"typescript/no-unsafe-declaration-merging",
|
|
20336
|
+
"typescript/no-unsafe-enum-assignment",
|
|
20073
20337
|
"typescript/no-unsafe-enum-comparison",
|
|
20074
20338
|
"typescript/no-unsafe-function-type",
|
|
20075
20339
|
"typescript/no-unsafe-member-access",
|
|
@@ -20390,6 +20654,7 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
20390
20654
|
"typescript/no-duplicate-type-constituents",
|
|
20391
20655
|
"typescript/no-floating-promises",
|
|
20392
20656
|
"typescript/no-for-in-array",
|
|
20657
|
+
"typescript/no-generated-empty-object-type",
|
|
20393
20658
|
"typescript/no-implied-eval",
|
|
20394
20659
|
"typescript/no-meaningless-void-operator",
|
|
20395
20660
|
"typescript/no-misused-promises",
|
|
@@ -20407,6 +20672,7 @@ var init_oxlint_native = __esmMin((() => {
|
|
|
20407
20672
|
"typescript/no-unsafe-argument",
|
|
20408
20673
|
"typescript/no-unsafe-assignment",
|
|
20409
20674
|
"typescript/no-unsafe-call",
|
|
20675
|
+
"typescript/no-unsafe-enum-assignment",
|
|
20410
20676
|
"typescript/no-unsafe-enum-comparison",
|
|
20411
20677
|
"typescript/no-unsafe-member-access",
|
|
20412
20678
|
"typescript/no-unsafe-return",
|
|
@@ -20593,7 +20859,6 @@ var init_routing = __esmMin((() => {
|
|
|
20593
20859
|
"sentinel/explicit-size-check"
|
|
20594
20860
|
]);
|
|
20595
20861
|
KNOWN_INCOMPATIBLE_RULES = {
|
|
20596
|
-
"jsdoc/require-param": "Oxlint applies an unexported outer function's JSDoc to a nested function (https://github.com/oxc-project/oxc/issues/27470).",
|
|
20597
20862
|
"style/jsx-function-call-newline": "Formatting-rule ownership remains with ESLint and oxfmt.",
|
|
20598
20863
|
"ts/no-shadow": "Oxlint skips every member of a declare namespace or declare module in .d.ts files (https://github.com/oxc-project/oxc/issues/27469).",
|
|
20599
20864
|
"unicorn/no-missing-local-resource": "The preset only enables this rule for Markdown virtual files, which Oxlint cannot lint.",
|
|
@@ -20601,9 +20866,9 @@ var init_routing = __esmMin((() => {
|
|
|
20601
20866
|
"vitest/prefer-each": "Oxlint ignores where test functions are imported from (https://github.com/oxc-project/oxc/issues/27471)."
|
|
20602
20867
|
};
|
|
20603
20868
|
JS_PLUGIN_PREFERRED_RULES = /* @__PURE__ */ new Set([
|
|
20604
|
-
"id-length",
|
|
20605
20869
|
"no-loop-func",
|
|
20606
|
-
"unicorn/no-lonely-if"
|
|
20870
|
+
"unicorn/no-lonely-if",
|
|
20871
|
+
"unicorn/no-useless-undefined"
|
|
20607
20872
|
]);
|
|
20608
20873
|
}));
|
|
20609
20874
|
//#endregion
|
|
@@ -21061,6 +21326,7 @@ async function isentinel(options, ...userConfigs) {
|
|
|
21061
21326
|
if (enableYaml !== false && !typeAwareOnly) {
|
|
21062
21327
|
configs.push(yaml({
|
|
21063
21328
|
...getOverrides(options, "yaml"),
|
|
21329
|
+
prettierOptions: widthSettings,
|
|
21064
21330
|
stylistic: stylisticOptions
|
|
21065
21331
|
}));
|
|
21066
21332
|
if (stylisticOptions !== false) configs.push(sortGithubAction());
|
|
@@ -21081,6 +21347,7 @@ async function isentinel(options, ...userConfigs) {
|
|
|
21081
21347
|
}
|
|
21082
21348
|
if (enableMarkdown !== false && !typeAwareOnly) configs.push(markdown({
|
|
21083
21349
|
...getOverrides(options, "markdown"),
|
|
21350
|
+
antiSlop,
|
|
21084
21351
|
componentExts: componentExtensions,
|
|
21085
21352
|
type: projectType
|
|
21086
21353
|
}));
|