@isentinel/eslint-config 6.0.0-beta.7 → 6.0.0-beta.8
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/index.d.mts +2615 -2811
- package/dist/index.mjs +304 -273
- package/dist/oxlint.d.mts +6605 -6437
- package/dist/oxlint.mjs +383 -285
- package/package.json +12 -11
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import globals from "globals";
|
|
|
12
12
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
13
13
|
import * as yamlESLintParser from "yaml-eslint-parser";
|
|
14
14
|
import { VisitorKeys, getStaticYAMLValue, parseForESLint, parseYAML, traverseNodes } from "yaml-eslint-parser";
|
|
15
|
+
import { eslintCompatPlugin } from "@oxlint/plugins";
|
|
15
16
|
//#region \0rolldown/runtime.js
|
|
16
17
|
var __create = Object.create;
|
|
17
18
|
var __defProp$2 = Object.defineProperty;
|
|
@@ -432,67 +433,6 @@ function shouldEnableFeature(options, key, defaultValue = true) {
|
|
|
432
433
|
return options[key] !== false;
|
|
433
434
|
}
|
|
434
435
|
//#endregion
|
|
435
|
-
//#region src/rules/cease-nonsense.ts
|
|
436
|
-
/**
|
|
437
|
-
* Cease-nonsense rules shared between the ESLint and oxlint factories.
|
|
438
|
-
*
|
|
439
|
-
* These do not require type information; `cease-nonsense/prefer-read-only-props`
|
|
440
|
-
* is type-aware and stays in the ESLint config.
|
|
441
|
-
*
|
|
442
|
-
* @param options - Shared rule options.
|
|
443
|
-
* @returns The rule map.
|
|
444
|
-
*/
|
|
445
|
-
function ceaseNonsenseRules({ isInEditor = false, stylistic = true } = {}) {
|
|
446
|
-
return {
|
|
447
|
-
"cease-nonsense/no-commented-code": isInEditor ? "off" : "error",
|
|
448
|
-
"cease-nonsense/prefer-class-properties": "error",
|
|
449
|
-
"cease-nonsense/prefer-early-return": ["error", { maximumStatements: 1 }],
|
|
450
|
-
"cease-nonsense/strict-component-boundaries": "error",
|
|
451
|
-
...stylistic !== false ? {
|
|
452
|
-
"cease-nonsense/prefer-module-scope-constants": "error",
|
|
453
|
-
"cease-nonsense/prefer-singular-enums": "error"
|
|
454
|
-
} : {}
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
//#endregion
|
|
458
|
-
//#region src/eslint/configs/cease-nonsense.ts
|
|
459
|
-
async function ceaseNonsense(options = {}) {
|
|
460
|
-
const { componentExts: componentExtensions = [], isInEditor = false, overridesTypeAware = {}, stylistic = true, typeAware = true } = options;
|
|
461
|
-
const pluginCeaseNonsense = await interopDefault(import("@pobammer-ts/eslint-cease-nonsense-rules"));
|
|
462
|
-
const files = options.files ?? [
|
|
463
|
-
"**/*.{,c,m}ts",
|
|
464
|
-
"**/*.{,c,m}tsx",
|
|
465
|
-
...componentExtensions.map((extension) => `**/*.${extension}`)
|
|
466
|
-
];
|
|
467
|
-
const filesTypeAware = options.filesTypeAware ?? ["**/*.{,c,m}ts", "**/*.{,c,m}tsx"];
|
|
468
|
-
const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md/**`];
|
|
469
|
-
const isTypeAware = (typeAware ? getTsConfig(options.tsconfigPath) : void 0) !== void 0;
|
|
470
|
-
return [
|
|
471
|
-
{
|
|
472
|
-
name: "isentinel/cease-nonsense/setup",
|
|
473
|
-
plugins: { "cease-nonsense": pluginCeaseNonsense }
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
name: "isentinel/cease-nonsense",
|
|
477
|
-
files,
|
|
478
|
-
plugins: { "cease-nonsense": pluginCeaseNonsense },
|
|
479
|
-
rules: ceaseNonsenseRules({
|
|
480
|
-
isInEditor,
|
|
481
|
-
stylistic
|
|
482
|
-
})
|
|
483
|
-
},
|
|
484
|
-
...isTypeAware ? [{
|
|
485
|
-
name: "isentinel/typescript/rules-type-aware",
|
|
486
|
-
files: filesTypeAware,
|
|
487
|
-
ignores: ignoresTypeAware,
|
|
488
|
-
rules: {
|
|
489
|
-
"cease-nonsense/prefer-read-only-props": "error",
|
|
490
|
-
...overridesTypeAware
|
|
491
|
-
}
|
|
492
|
-
}] : []
|
|
493
|
-
];
|
|
494
|
-
}
|
|
495
|
-
//#endregion
|
|
496
436
|
//#region src/rules/comments.ts
|
|
497
437
|
/**
|
|
498
438
|
* Comment style rules shared between the ESLint and oxlint factories.
|
|
@@ -599,13 +539,13 @@ async function disables({ root }) {
|
|
|
599
539
|
name: "isentinel/disables/dts",
|
|
600
540
|
files: [GLOB_DTS],
|
|
601
541
|
rules: {
|
|
602
|
-
"cease-nonsense/prefer-class-properties": "off",
|
|
603
542
|
"eslint-comments/no-unlimited-disable": "off",
|
|
604
543
|
"import/no-default-export": "off",
|
|
605
544
|
"max-lines": "off",
|
|
606
545
|
"no-duplicate-imports": "off",
|
|
607
546
|
"no-restricted-syntax": "off",
|
|
608
547
|
"roblox/no-namespace-merging": "off",
|
|
548
|
+
"small-rules/prefer-class-properties": "off",
|
|
609
549
|
"sonar/no-duplicate-string": "off",
|
|
610
550
|
"unused-imports/no-unused-vars": "off"
|
|
611
551
|
}
|
|
@@ -788,18 +728,35 @@ function flawlessRules({ stylistic = true } = {}) {
|
|
|
788
728
|
}
|
|
789
729
|
//#endregion
|
|
790
730
|
//#region src/eslint/configs/flawless.ts
|
|
791
|
-
async function flawless(
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
731
|
+
async function flawless(options = {}) {
|
|
732
|
+
const { overridesTypeAware = {}, stylistic = true, typeAware = true } = options;
|
|
733
|
+
const eslintPluginFlawless = await interopDefault(import("eslint-plugin-flawless"));
|
|
734
|
+
const filesTypeAware = [GLOB_TS, GLOB_TSX];
|
|
735
|
+
const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md/**`, "**/*.d.{,c,m}ts"];
|
|
736
|
+
const isTypeAware = (typeAware ? getTsConfig(options.tsconfigPath) : void 0) !== void 0;
|
|
737
|
+
return [
|
|
738
|
+
{
|
|
739
|
+
name: "isentinel/flawless/setup",
|
|
740
|
+
plugins: { flawless: eslintPluginFlawless }
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
name: "isentinel/flawless/rules",
|
|
744
|
+
files: [GLOB_TS],
|
|
745
|
+
rules: flawlessRules({ stylistic })
|
|
746
|
+
},
|
|
747
|
+
...isTypeAware ? [{
|
|
748
|
+
name: "isentinel/flawless/rules-type-aware",
|
|
749
|
+
files: filesTypeAware,
|
|
750
|
+
ignores: ignoresTypeAware,
|
|
751
|
+
rules: {
|
|
752
|
+
"flawless/prefer-read-only-props": "error",
|
|
753
|
+
...overridesTypeAware
|
|
754
|
+
}
|
|
755
|
+
}] : []
|
|
756
|
+
];
|
|
800
757
|
}
|
|
801
758
|
//#endregion
|
|
802
|
-
//#region node_modules/.pnpm/@eslint+compat@2.1.0_eslint@10.
|
|
759
|
+
//#region node_modules/.pnpm/@eslint+compat@2.1.0_eslint@10.7.0_jiti@2.7.0_/node_modules/@eslint/compat/dist/esm/index.js
|
|
803
760
|
/**
|
|
804
761
|
* @fileoverview Ignore file utilities for the compat package.
|
|
805
762
|
* @author Nicholas C. Zakas
|
|
@@ -828,7 +785,7 @@ function convertIgnorePatternToMinimatch(pattern) {
|
|
|
828
785
|
}
|
|
829
786
|
var init_esm$1 = __esmMin((() => {}));
|
|
830
787
|
//#endregion
|
|
831
|
-
//#region node_modules/.pnpm/eslint-config-flat-gitignore@2.3.0_patch_hash=
|
|
788
|
+
//#region node_modules/.pnpm/eslint-config-flat-gitignore@2.3.0_patch_hash=c0af6384f070a0837fdab77e0920cd119c0824908_aa7e2a67d4f9a3d7fe9b5f9f8afb3fe3/node_modules/eslint-config-flat-gitignore/dist/index.mjs
|
|
832
789
|
var dist_exports = /* @__PURE__ */ __exportAll$2({ default: () => ignore });
|
|
833
790
|
function toArray(array) {
|
|
834
791
|
array = array ?? [];
|
|
@@ -2580,10 +2537,10 @@ async function promise() {
|
|
|
2580
2537
|
*/
|
|
2581
2538
|
function reactRules({ filenameCase = "kebabCase", reactCompiler = true, stylistic = true } = {}) {
|
|
2582
2539
|
return {
|
|
2583
|
-
"cease-nonsense/react-hooks-strict-return": "error",
|
|
2584
2540
|
"flawless/no-unnecessary-use-callback": "error",
|
|
2585
2541
|
"flawless/no-unnecessary-use-memo": "error",
|
|
2586
2542
|
"flawless/purity": "error",
|
|
2543
|
+
"small-rules/react-hooks-strict-return": "error",
|
|
2587
2544
|
...reactCompiler ? {
|
|
2588
2545
|
"react/globals": "error",
|
|
2589
2546
|
"react/refs": "error"
|
|
@@ -2701,12 +2658,71 @@ function reactRules({ filenameCase = "kebabCase", reactCompiler = true, stylisti
|
|
|
2701
2658
|
};
|
|
2702
2659
|
}
|
|
2703
2660
|
//#endregion
|
|
2661
|
+
//#region src/rules/small-rules.ts
|
|
2662
|
+
/**
|
|
2663
|
+
* Small-rules rules shared between the ESLint and oxlint factories.
|
|
2664
|
+
*
|
|
2665
|
+
* These do not require type information. The type-aware
|
|
2666
|
+
* `flawless/prefer-read-only-props` replaces the former read-only-props rule and
|
|
2667
|
+
* is configured by the flawless config.
|
|
2668
|
+
*
|
|
2669
|
+
* @param options - Shared rule options.
|
|
2670
|
+
* @returns The rule map.
|
|
2671
|
+
*/
|
|
2672
|
+
function smallRulesRules({ isInEditor = false, stylistic = true } = {}) {
|
|
2673
|
+
return {
|
|
2674
|
+
"small-rules/no-commented-code": isInEditor ? "off" : "error",
|
|
2675
|
+
"small-rules/prefer-class-properties": "error",
|
|
2676
|
+
"small-rules/prefer-early-return": ["error", { maximumStatements: 1 }],
|
|
2677
|
+
"small-rules/strict-component-boundaries": "error",
|
|
2678
|
+
...stylistic !== false ? {
|
|
2679
|
+
"small-rules/prefer-module-scope-constants": "error",
|
|
2680
|
+
"small-rules/prefer-singular-enums": "error"
|
|
2681
|
+
} : {}
|
|
2682
|
+
};
|
|
2683
|
+
}
|
|
2684
|
+
//#endregion
|
|
2685
|
+
//#region src/eslint/configs/small-rules.ts
|
|
2686
|
+
/**
|
|
2687
|
+
* Load the Oxlint-native `@pobammer-ts/small-rules` plugin and adapt it for
|
|
2688
|
+
* ESLint. `eslintCompatPlugin` generates an ESLint `create` for the plugin's
|
|
2689
|
+
* `createOnce` rules (`prefer-singular-enums`); it mutates the module in place
|
|
2690
|
+
* and is idempotent, so the shared plugin object works under both linters
|
|
2691
|
+
* wherever it is registered.
|
|
2692
|
+
*
|
|
2693
|
+
* @returns The ESLint-compatible small-rules plugin.
|
|
2694
|
+
*/
|
|
2695
|
+
async function loadSmallRulesPlugin() {
|
|
2696
|
+
return eslintCompatPlugin(await interopDefault(import("@pobammer-ts/small-rules")));
|
|
2697
|
+
}
|
|
2698
|
+
async function smallRules(options = {}) {
|
|
2699
|
+
const { componentExts: componentExtensions = [], isInEditor = false, stylistic = true } = options;
|
|
2700
|
+
const pluginSmallRules = await loadSmallRulesPlugin();
|
|
2701
|
+
const files = options.files ?? [
|
|
2702
|
+
"**/*.{,c,m}ts",
|
|
2703
|
+
"**/*.{,c,m}tsx",
|
|
2704
|
+
...componentExtensions.map((extension) => `**/*.${extension}`)
|
|
2705
|
+
];
|
|
2706
|
+
return [{
|
|
2707
|
+
name: "isentinel/small-rules/setup",
|
|
2708
|
+
plugins: { "small-rules": pluginSmallRules }
|
|
2709
|
+
}, {
|
|
2710
|
+
name: "isentinel/small-rules",
|
|
2711
|
+
files,
|
|
2712
|
+
plugins: { "small-rules": pluginSmallRules },
|
|
2713
|
+
rules: smallRulesRules({
|
|
2714
|
+
isInEditor,
|
|
2715
|
+
stylistic
|
|
2716
|
+
})
|
|
2717
|
+
}];
|
|
2718
|
+
}
|
|
2719
|
+
//#endregion
|
|
2704
2720
|
//#region src/eslint/configs/react.ts
|
|
2705
2721
|
async function react(options = {}) {
|
|
2706
2722
|
const { filenameCase = "kebabCase", files = [GLOB_JSX, GLOB_TSX], filesTypeAware = [GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`], importSource, overrides = {}, overridesTypeAware, reactCompiler = true, stylistic = true, typeAware = true } = options;
|
|
2707
2723
|
await ensurePackages(["eslint-plugin-react-x", "eslint-plugin-react-jsx"]);
|
|
2708
2724
|
if (stylistic !== false) await ensurePackages(["eslint-plugin-react-naming-convention"]);
|
|
2709
|
-
const [pluginReactCore, pluginReactJsx, pluginFlawless, pluginStylistic, pluginTs, pluginUnicorn, pluginUnusedImports,
|
|
2725
|
+
const [pluginReactCore, pluginReactJsx, pluginFlawless, pluginStylistic, pluginTs, pluginUnicorn, pluginUnusedImports, pluginSmallRules] = await Promise.all([
|
|
2710
2726
|
interopDefault(import("eslint-plugin-react-x")),
|
|
2711
2727
|
interopDefault(import("eslint-plugin-react-jsx")),
|
|
2712
2728
|
interopDefault(import("eslint-plugin-flawless")),
|
|
@@ -2714,7 +2730,7 @@ async function react(options = {}) {
|
|
|
2714
2730
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
2715
2731
|
interopDefault(import("eslint-plugin-unicorn")),
|
|
2716
2732
|
interopDefault(import("eslint-plugin-unused-imports")),
|
|
2717
|
-
|
|
2733
|
+
loadSmallRulesPlugin()
|
|
2718
2734
|
]);
|
|
2719
2735
|
const isTypeAware = (typeAware ? getTsConfig(options.tsconfigPath) : void 0) !== void 0;
|
|
2720
2736
|
const reactSettings = {
|
|
@@ -2732,10 +2748,10 @@ async function react(options = {}) {
|
|
|
2732
2748
|
{
|
|
2733
2749
|
name: "isentinel/react/setup",
|
|
2734
2750
|
plugins: {
|
|
2735
|
-
"cease-nonsense": pluginCeaseNonsense,
|
|
2736
2751
|
"flawless": pluginFlawless,
|
|
2737
2752
|
"react": pluginReactCore,
|
|
2738
2753
|
"react-jsx": pluginReactJsx,
|
|
2754
|
+
"small-rules": pluginSmallRules,
|
|
2739
2755
|
"style": pluginStylistic,
|
|
2740
2756
|
"ts": pluginTs,
|
|
2741
2757
|
"unicorn": pluginUnicorn,
|
|
@@ -2787,7 +2803,6 @@ async function react(options = {}) {
|
|
|
2787
2803
|
*/
|
|
2788
2804
|
function robloxRules({ stylistic = true } = {}) {
|
|
2789
2805
|
return {
|
|
2790
|
-
"cease-nonsense/no-array-size-assignment": "error",
|
|
2791
2806
|
"roblox/no-any": "error",
|
|
2792
2807
|
"roblox/no-enum-merging": "error",
|
|
2793
2808
|
"roblox/no-export-assignment-let": "error",
|
|
@@ -2804,9 +2819,10 @@ function robloxRules({ stylistic = true } = {}) {
|
|
|
2804
2819
|
"roblox/no-value-typeof": "error",
|
|
2805
2820
|
"roblox/prefer-get-players": "error",
|
|
2806
2821
|
"roblox/prefer-task-library": "error",
|
|
2822
|
+
"small-rules/no-array-size-assignment": "error",
|
|
2807
2823
|
...stylistic !== false ? {
|
|
2808
|
-
"
|
|
2809
|
-
"
|
|
2824
|
+
"sentinel/prefer-math-min-max": "error",
|
|
2825
|
+
"small-rules/no-array-constructor-elements": "error"
|
|
2810
2826
|
} : {}
|
|
2811
2827
|
};
|
|
2812
2828
|
}
|
|
@@ -2814,11 +2830,11 @@ function robloxRules({ stylistic = true } = {}) {
|
|
|
2814
2830
|
//#region src/eslint/configs/roblox.ts
|
|
2815
2831
|
async function roblox(options = {}, formatLua = true) {
|
|
2816
2832
|
const { componentExts: componentExtensions = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, stylistic = true, typeAware = true } = options;
|
|
2817
|
-
const [parserTs, pluginRobloxTs, pluginSentinel,
|
|
2833
|
+
const [parserTs, pluginRobloxTs, pluginSentinel, pluginSmallRules] = await Promise.all([
|
|
2818
2834
|
interopDefault(import("@typescript-eslint/parser")),
|
|
2819
2835
|
interopDefault(import("eslint-plugin-roblox-ts")),
|
|
2820
2836
|
interopDefault(import("eslint-plugin-sentinel")),
|
|
2821
|
-
|
|
2837
|
+
loadSmallRulesPlugin()
|
|
2822
2838
|
]);
|
|
2823
2839
|
const files = options.files ?? [
|
|
2824
2840
|
"**/*/*.{,c,m}ts",
|
|
@@ -2856,9 +2872,9 @@ async function roblox(options = {}, formatLua = true) {
|
|
|
2856
2872
|
{
|
|
2857
2873
|
name: "isentinel/roblox/setup",
|
|
2858
2874
|
plugins: {
|
|
2859
|
-
"cease-nonsense": pluginCeaseNonsense,
|
|
2860
2875
|
"roblox": pluginRobloxTs,
|
|
2861
|
-
"sentinel": pluginSentinel
|
|
2876
|
+
"sentinel": pluginSentinel,
|
|
2877
|
+
"small-rules": pluginSmallRules
|
|
2862
2878
|
}
|
|
2863
2879
|
},
|
|
2864
2880
|
...isTypeAware ? [makeParser(false, files), makeParser(true, filesTypeAware, ignoresTypeAware)] : [makeParser(false, files)],
|
|
@@ -3756,7 +3772,7 @@ function spellingRules({ inEditor, isInEditor = false, language = "en-US" } = {}
|
|
|
3756
3772
|
path: urlRbxts.href
|
|
3757
3773
|
}],
|
|
3758
3774
|
language,
|
|
3759
|
-
words: ["isentinel"]
|
|
3775
|
+
words: ["isentinel", "uninvoked"]
|
|
3760
3776
|
},
|
|
3761
3777
|
generateSuggestions: isInEditor,
|
|
3762
3778
|
numSuggestions: isInEditor ? 8 : 0
|
|
@@ -3966,68 +3982,68 @@ function jestExtendedRules() {
|
|
|
3966
3982
|
*/
|
|
3967
3983
|
function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = true, stylistic = true } = {}) {
|
|
3968
3984
|
return {
|
|
3969
|
-
"
|
|
3970
|
-
"
|
|
3971
|
-
"
|
|
3972
|
-
"
|
|
3973
|
-
"
|
|
3974
|
-
"
|
|
3975
|
-
"
|
|
3976
|
-
"
|
|
3977
|
-
"
|
|
3978
|
-
"
|
|
3979
|
-
"
|
|
3980
|
-
"
|
|
3981
|
-
"
|
|
3982
|
-
"
|
|
3983
|
-
"
|
|
3984
|
-
"
|
|
3985
|
-
"
|
|
3986
|
-
"
|
|
3987
|
-
"
|
|
3988
|
-
"
|
|
3989
|
-
"
|
|
3990
|
-
"
|
|
3991
|
-
"
|
|
3992
|
-
"
|
|
3993
|
-
"
|
|
3994
|
-
"
|
|
3995
|
-
"
|
|
3996
|
-
"
|
|
3997
|
-
"
|
|
3998
|
-
"
|
|
3999
|
-
"
|
|
4000
|
-
"
|
|
4001
|
-
"
|
|
4002
|
-
"
|
|
4003
|
-
"
|
|
4004
|
-
"
|
|
4005
|
-
"
|
|
4006
|
-
"
|
|
4007
|
-
"
|
|
4008
|
-
"
|
|
4009
|
-
"
|
|
4010
|
-
"
|
|
4011
|
-
"
|
|
4012
|
-
"
|
|
4013
|
-
"
|
|
4014
|
-
"
|
|
4015
|
-
"
|
|
4016
|
-
"
|
|
4017
|
-
"
|
|
3985
|
+
"jest/consistent-test-it": "error",
|
|
3986
|
+
"jest/expect-expect": "warn",
|
|
3987
|
+
"jest/max-expects": "error",
|
|
3988
|
+
"jest/max-nested-describe": ["error", { max: 4 }],
|
|
3989
|
+
"jest/no-alias-methods": "error",
|
|
3990
|
+
"jest/no-commented-out-tests": "warn",
|
|
3991
|
+
"jest/no-conditional-expect": "error",
|
|
3992
|
+
"jest/no-conditional-in-test": ["error", { allowOptionalChaining: false }],
|
|
3993
|
+
"jest/no-disabled-tests": isInEditor ? "off" : "error",
|
|
3994
|
+
"jest/no-done-callback": "error",
|
|
3995
|
+
"jest/no-duplicate-hooks": "error",
|
|
3996
|
+
"jest/no-error-equal": isRoblox ? "off" : "error",
|
|
3997
|
+
"jest/no-export": "error",
|
|
3998
|
+
"jest/no-focused-tests": isInEditor ? "off" : "error",
|
|
3999
|
+
"jest/no-hooks": "error",
|
|
4000
|
+
"jest/no-identical-title": "error",
|
|
4001
|
+
"jest/no-standalone-expect": "error",
|
|
4002
|
+
"jest/no-test-prefixes": "error",
|
|
4003
|
+
"jest/no-test-return-statement": "error",
|
|
4004
|
+
"jest/no-unnecessary-assertion": "error",
|
|
4005
|
+
"jest/no-unneeded-async-expect-function": "error",
|
|
4006
|
+
"jest/no-untyped-mock-factory": "error",
|
|
4007
|
+
"jest/prefer-called-with": "warn",
|
|
4008
|
+
"jest/prefer-comparison-matcher": "warn",
|
|
4009
|
+
"jest/prefer-each": "warn",
|
|
4010
|
+
"jest/prefer-ending-with-an-expect": "warn",
|
|
4011
|
+
"jest/prefer-equality-matcher": "warn",
|
|
4012
|
+
"jest/prefer-expect-assertions": "error",
|
|
4013
|
+
"jest/prefer-hooks-in-order": "warn",
|
|
4014
|
+
"jest/prefer-lowercase-title": "warn",
|
|
4015
|
+
"jest/prefer-mock-promise-shorthand": "error",
|
|
4016
|
+
"jest/prefer-mock-return-shorthand": "error",
|
|
4017
|
+
"jest/prefer-spy-on": "warn",
|
|
4018
|
+
"jest/prefer-strict-equal": "error",
|
|
4019
|
+
"jest/prefer-to-be": "error",
|
|
4020
|
+
"jest/prefer-to-contain": "error",
|
|
4021
|
+
"jest/prefer-to-have-been-called": "error",
|
|
4022
|
+
"jest/prefer-to-have-been-called-times": "error",
|
|
4023
|
+
"jest/prefer-to-have-length": "error",
|
|
4024
|
+
"jest/prefer-todo": "warn",
|
|
4025
|
+
"jest/require-hook": "error",
|
|
4026
|
+
"jest/require-to-throw-message": "warn",
|
|
4027
|
+
"jest/require-top-level-describe": "error",
|
|
4028
|
+
"jest/unbound-method": "error",
|
|
4029
|
+
"jest/valid-describe-callback": "error",
|
|
4030
|
+
"jest/valid-expect": isRoblox ? "off" : "error",
|
|
4031
|
+
"jest/valid-expect-in-promise": "error",
|
|
4032
|
+
"jest/valid-expect-with-promise": "error",
|
|
4033
|
+
"jest/valid-title": ["error", {
|
|
4018
4034
|
ignoreTypeOfDescribeName: true,
|
|
4019
4035
|
mustMatch: { it: ["^should", "Test title must start with \"should\""] }
|
|
4020
4036
|
}],
|
|
4021
4037
|
...extended ? jestExtendedRules() : {},
|
|
4022
|
-
...stylistic !== false ? { "
|
|
4038
|
+
...stylistic !== false ? { "jest/padding-around-all": "warn" } : {}
|
|
4023
4039
|
};
|
|
4024
4040
|
}
|
|
4025
4041
|
/**
|
|
4026
4042
|
* Vitest rules shared between the ESLint and oxlint factories.
|
|
4027
4043
|
*
|
|
4028
|
-
*
|
|
4029
|
-
* `
|
|
4030
|
-
*
|
|
4044
|
+
* The ESLint factory runs `@vitest/eslint-plugin` (an optional peer). The oxlint
|
|
4045
|
+
* factory runs the family as native rules, except `padding-around-all` and
|
|
4046
|
+
* `prefer-vi-mocked` (no native port) which run via the plugin as a jsPlugin.
|
|
4031
4047
|
*
|
|
4032
4048
|
* @param options - Shared rule options.
|
|
4033
4049
|
* @returns The rule map.
|
|
@@ -4114,7 +4130,7 @@ function vitestRules({ extended = false, isInEditor = false, stylistic = true }
|
|
|
4114
4130
|
}
|
|
4115
4131
|
//#endregion
|
|
4116
4132
|
//#region src/eslint/configs/test.ts
|
|
4117
|
-
let
|
|
4133
|
+
let pluginJest;
|
|
4118
4134
|
let pluginJestExtended;
|
|
4119
4135
|
let pluginVitest;
|
|
4120
4136
|
async function test({ files = GLOB_TESTS, isInEditor = false, jest = false, overrides = {}, roblox: isRoblox = true, stylistic = true, type = "game", vitest = false } = {}) {
|
|
@@ -4127,19 +4143,19 @@ async function test({ files = GLOB_TESTS, isInEditor = false, jest = false, over
|
|
|
4127
4143
|
const configs = [];
|
|
4128
4144
|
if (enableJest) {
|
|
4129
4145
|
await ensurePackages(["eslint-plugin-jest"]);
|
|
4130
|
-
const
|
|
4146
|
+
const jestPlugin = await interopDefault(import("eslint-plugin-jest"));
|
|
4131
4147
|
const useJestExtended = jestOptions.extended === true;
|
|
4132
4148
|
const jestExtendedPlugin = await (async () => {
|
|
4133
4149
|
if (!useJestExtended) return;
|
|
4134
4150
|
await ensurePackages(["eslint-plugin-jest-extended"]);
|
|
4135
4151
|
return interopDefault(import("eslint-plugin-jest-extended"));
|
|
4136
4152
|
})();
|
|
4137
|
-
|
|
4153
|
+
pluginJest ??= { ...jestPlugin };
|
|
4138
4154
|
pluginJestExtended ??= { ...jestExtendedPlugin };
|
|
4139
4155
|
configs.push({
|
|
4140
4156
|
name: "isentinel/test/jest/setup",
|
|
4141
4157
|
plugins: {
|
|
4142
|
-
|
|
4158
|
+
jest: pluginJest,
|
|
4143
4159
|
...useJestExtended ? { "jest-extended": pluginJestExtended } : {}
|
|
4144
4160
|
}
|
|
4145
4161
|
}, {
|
|
@@ -4694,7 +4710,7 @@ async function unicorn({ nameReplacements, roblox = true, root: customRootGlobs,
|
|
|
4694
4710
|
];
|
|
4695
4711
|
}
|
|
4696
4712
|
//#endregion
|
|
4697
|
-
//#region node_modules/.pnpm/eslint-plugin-yml@3.5.0_patch_hash=
|
|
4713
|
+
//#region node_modules/.pnpm/eslint-plugin-yml@3.5.0_patch_hash=a0c23f5bc2638aedacbb693b99b4bc77d33a7f52fd066d636cf2_c7cd0136eef7a30979475bedcc06bee4/node_modules/eslint-plugin-yml/lib/chunk-CfYAbeIz.mjs
|
|
4698
4714
|
var __defProp$1, __exportAll$1;
|
|
4699
4715
|
var init_chunk_CfYAbeIz = __esmMin((() => {
|
|
4700
4716
|
__defProp$1 = Object.defineProperty;
|
|
@@ -7741,7 +7757,7 @@ var init_lib$1 = __esmMin((() => {
|
|
|
7741
7757
|
({ ...meta_exports$1 });
|
|
7742
7758
|
}));
|
|
7743
7759
|
//#endregion
|
|
7744
|
-
//#region node_modules/.pnpm/eslint-plugin-yml@3.5.0_patch_hash=
|
|
7760
|
+
//#region node_modules/.pnpm/eslint-plugin-yml@3.5.0_patch_hash=a0c23f5bc2638aedacbb693b99b4bc77d33a7f52fd066d636cf2_c7cd0136eef7a30979475bedcc06bee4/node_modules/eslint-plugin-yml/lib/index.mjs
|
|
7745
7761
|
var lib_exports = /* @__PURE__ */ __exportAll$2({
|
|
7746
7762
|
configs: () => configs,
|
|
7747
7763
|
default: () => src_default,
|
|
@@ -13970,7 +13986,6 @@ const oxlintRuleMapping = {
|
|
|
13970
13986
|
"unicorn/consistent-tuple-labels": "js-plugin",
|
|
13971
13987
|
"unicorn/isolated-functions": "js-plugin",
|
|
13972
13988
|
"unicorn/name-replacements": "js-plugin",
|
|
13973
|
-
"unicorn/no-accidental-bitwise-operator": "js-plugin",
|
|
13974
13989
|
"unicorn/no-array-concat-in-loop": "js-plugin",
|
|
13975
13990
|
"unicorn/no-array-sort-for-min-max": "js-plugin",
|
|
13976
13991
|
"unicorn/no-async-promise-finally": "js-plugin",
|
|
@@ -14101,7 +14116,6 @@ const oxlintRuleMapping = {
|
|
|
14101
14116
|
"sonar/fixme-tag": "js-plugin",
|
|
14102
14117
|
"sonar/max-switch-cases": "js-plugin",
|
|
14103
14118
|
"sonar/misplaced-loop-counter": "js-plugin",
|
|
14104
|
-
"sonar/no-all-duplicated-branches": "js-plugin",
|
|
14105
14119
|
"sonar/no-async-constructor": "js-plugin",
|
|
14106
14120
|
"sonar/no-collapsible-if": "js-plugin",
|
|
14107
14121
|
"sonar/no-dead-store": "js-plugin",
|
|
@@ -14192,15 +14206,15 @@ const oxlintRuleMapping = {
|
|
|
14192
14206
|
"style/quotes": "js-plugin",
|
|
14193
14207
|
"style/spaced-comment": "js-plugin",
|
|
14194
14208
|
"comment-length/limit-single-line-comments": "js-plugin",
|
|
14195
|
-
"
|
|
14196
|
-
"
|
|
14197
|
-
"
|
|
14198
|
-
"
|
|
14199
|
-
"
|
|
14200
|
-
"
|
|
14201
|
-
"
|
|
14202
|
-
"
|
|
14203
|
-
"
|
|
14209
|
+
"small-rules/no-array-constructor-elements": "js-plugin",
|
|
14210
|
+
"small-rules/no-array-size-assignment": "js-plugin",
|
|
14211
|
+
"small-rules/no-commented-code": "js-plugin",
|
|
14212
|
+
"small-rules/prefer-class-properties": "js-plugin",
|
|
14213
|
+
"small-rules/prefer-early-return": "js-plugin",
|
|
14214
|
+
"small-rules/prefer-module-scope-constants": "js-plugin",
|
|
14215
|
+
"small-rules/prefer-singular-enums": "js-plugin",
|
|
14216
|
+
"small-rules/react-hooks-strict-return": "js-plugin",
|
|
14217
|
+
"small-rules/strict-component-boundaries": "js-plugin",
|
|
14204
14218
|
"flawless/jsx-shorthand-boolean": "js-plugin",
|
|
14205
14219
|
"flawless/jsx-shorthand-fragment": "js-plugin",
|
|
14206
14220
|
"flawless/no-unnecessary-use-callback": "js-plugin",
|
|
@@ -14262,120 +14276,122 @@ const oxlintRuleMapping = {
|
|
|
14262
14276
|
"react-jsx/no-useless-fragment": "js-plugin",
|
|
14263
14277
|
"react-naming-convention/context-name": "js-plugin",
|
|
14264
14278
|
"react-naming-convention/ref-name": "js-plugin",
|
|
14265
|
-
"
|
|
14266
|
-
"
|
|
14267
|
-
"
|
|
14268
|
-
"
|
|
14269
|
-
"
|
|
14270
|
-
"
|
|
14271
|
-
"
|
|
14272
|
-
"
|
|
14273
|
-
"
|
|
14274
|
-
"
|
|
14275
|
-
"
|
|
14276
|
-
"
|
|
14277
|
-
"
|
|
14278
|
-
"
|
|
14279
|
-
"
|
|
14280
|
-
"
|
|
14281
|
-
"
|
|
14282
|
-
"
|
|
14283
|
-
"
|
|
14284
|
-
"
|
|
14285
|
-
"
|
|
14286
|
-
"
|
|
14287
|
-
"
|
|
14288
|
-
"
|
|
14289
|
-
"
|
|
14290
|
-
"
|
|
14291
|
-
"
|
|
14292
|
-
"
|
|
14293
|
-
"
|
|
14294
|
-
"
|
|
14295
|
-
"
|
|
14296
|
-
"
|
|
14297
|
-
"
|
|
14298
|
-
"
|
|
14299
|
-
"
|
|
14300
|
-
"
|
|
14301
|
-
"
|
|
14302
|
-
"
|
|
14303
|
-
"
|
|
14304
|
-
"
|
|
14305
|
-
"
|
|
14306
|
-
"
|
|
14307
|
-
"
|
|
14308
|
-
"
|
|
14309
|
-
"
|
|
14310
|
-
"
|
|
14279
|
+
"jest/consistent-test-it": "js-plugin",
|
|
14280
|
+
"jest/expect-expect": "js-plugin",
|
|
14281
|
+
"jest/max-expects": "js-plugin",
|
|
14282
|
+
"jest/max-nested-describe": "js-plugin",
|
|
14283
|
+
"jest/no-alias-methods": "js-plugin",
|
|
14284
|
+
"jest/no-commented-out-tests": "js-plugin",
|
|
14285
|
+
"jest/no-conditional-expect": "js-plugin",
|
|
14286
|
+
"jest/no-conditional-in-test": "js-plugin",
|
|
14287
|
+
"jest/no-disabled-tests": "js-plugin",
|
|
14288
|
+
"jest/no-done-callback": "js-plugin",
|
|
14289
|
+
"jest/no-duplicate-hooks": "js-plugin",
|
|
14290
|
+
"jest/no-export": "js-plugin",
|
|
14291
|
+
"jest/no-focused-tests": "js-plugin",
|
|
14292
|
+
"jest/no-hooks": "js-plugin",
|
|
14293
|
+
"jest/no-identical-title": "js-plugin",
|
|
14294
|
+
"jest/no-standalone-expect": "js-plugin",
|
|
14295
|
+
"jest/no-test-prefixes": "js-plugin",
|
|
14296
|
+
"jest/no-test-return-statement": "js-plugin",
|
|
14297
|
+
"jest/no-unneeded-async-expect-function": "js-plugin",
|
|
14298
|
+
"jest/no-untyped-mock-factory": "js-plugin",
|
|
14299
|
+
"jest/padding-around-all": "js-plugin",
|
|
14300
|
+
"jest/prefer-called-with": "js-plugin",
|
|
14301
|
+
"jest/prefer-comparison-matcher": "js-plugin",
|
|
14302
|
+
"jest/prefer-each": "js-plugin",
|
|
14303
|
+
"jest/prefer-ending-with-an-expect": "js-plugin",
|
|
14304
|
+
"jest/prefer-equality-matcher": "js-plugin",
|
|
14305
|
+
"jest/prefer-expect-assertions": "js-plugin",
|
|
14306
|
+
"jest/prefer-hooks-in-order": "js-plugin",
|
|
14307
|
+
"jest/prefer-lowercase-title": "js-plugin",
|
|
14308
|
+
"jest/prefer-mock-promise-shorthand": "js-plugin",
|
|
14309
|
+
"jest/prefer-mock-return-shorthand": "js-plugin",
|
|
14310
|
+
"jest/prefer-spy-on": "js-plugin",
|
|
14311
|
+
"jest/prefer-strict-equal": "js-plugin",
|
|
14312
|
+
"jest/prefer-to-be": "js-plugin",
|
|
14313
|
+
"jest/prefer-to-contain": "js-plugin",
|
|
14314
|
+
"jest/prefer-to-have-been-called": "js-plugin",
|
|
14315
|
+
"jest/prefer-to-have-been-called-times": "js-plugin",
|
|
14316
|
+
"jest/prefer-to-have-length": "js-plugin",
|
|
14317
|
+
"jest/prefer-todo": "js-plugin",
|
|
14318
|
+
"jest/require-hook": "js-plugin",
|
|
14319
|
+
"jest/require-to-throw-message": "js-plugin",
|
|
14320
|
+
"jest/require-top-level-describe": "js-plugin",
|
|
14321
|
+
"jest/valid-describe-callback": "js-plugin",
|
|
14322
|
+
"jest/valid-expect": "js-plugin",
|
|
14323
|
+
"jest/valid-expect-in-promise": "js-plugin",
|
|
14324
|
+
"jest/valid-title": "js-plugin",
|
|
14311
14325
|
"jest-extended/prefer-to-be-array": "js-plugin",
|
|
14312
14326
|
"jest-extended/prefer-to-be-false": "js-plugin",
|
|
14313
14327
|
"jest-extended/prefer-to-be-object": "js-plugin",
|
|
14314
14328
|
"jest-extended/prefer-to-be-true": "js-plugin",
|
|
14315
14329
|
"jest-extended/prefer-to-have-been-called-once": "js-plugin",
|
|
14316
|
-
|
|
14317
|
-
"vitest/consistent-
|
|
14318
|
-
"vitest/consistent-test-
|
|
14319
|
-
"vitest/consistent-
|
|
14320
|
-
"vitest/
|
|
14321
|
-
"vitest/
|
|
14322
|
-
"vitest/
|
|
14323
|
-
"vitest/max-
|
|
14324
|
-
"vitest/
|
|
14325
|
-
"vitest/no-
|
|
14326
|
-
"vitest/no-
|
|
14327
|
-
"vitest/no-conditional-
|
|
14328
|
-
"vitest/no-conditional-
|
|
14329
|
-
"vitest/no-
|
|
14330
|
-
"vitest/no-
|
|
14331
|
-
"vitest/no-
|
|
14332
|
-
"vitest/no-
|
|
14333
|
-
"vitest/no-
|
|
14334
|
-
"vitest/no-
|
|
14335
|
-
"vitest/no-
|
|
14336
|
-
"vitest/no-
|
|
14337
|
-
"vitest/no-
|
|
14338
|
-
"vitest/no-
|
|
14339
|
-
"vitest/no-
|
|
14340
|
-
"vitest/no-test-
|
|
14341
|
-
"vitest/no-
|
|
14330
|
+
// @vitest/eslint-plugin as a jsPlugin, renamed vitest-js.
|
|
14331
|
+
"vitest/consistent-each-for": "native",
|
|
14332
|
+
"vitest/consistent-test-filename": "native",
|
|
14333
|
+
"vitest/consistent-test-it": "native",
|
|
14334
|
+
"vitest/consistent-vitest-vi": "native",
|
|
14335
|
+
"vitest/expect-expect": "native",
|
|
14336
|
+
"vitest/hoisted-apis-on-top": "native",
|
|
14337
|
+
"vitest/max-expects": "native",
|
|
14338
|
+
"vitest/max-nested-describe": "native",
|
|
14339
|
+
"vitest/no-alias-methods": "native",
|
|
14340
|
+
"vitest/no-commented-out-tests": "native",
|
|
14341
|
+
"vitest/no-conditional-expect": "native",
|
|
14342
|
+
"vitest/no-conditional-in-test": "native",
|
|
14343
|
+
"vitest/no-conditional-tests": "native",
|
|
14344
|
+
"vitest/no-disabled-tests": "native",
|
|
14345
|
+
"vitest/no-duplicate-hooks": "native",
|
|
14346
|
+
"vitest/no-focused-tests": "native",
|
|
14347
|
+
"vitest/no-hooks": "native",
|
|
14348
|
+
"vitest/no-identical-title": "native",
|
|
14349
|
+
"vitest/no-import-node-test": "native",
|
|
14350
|
+
"vitest/no-interpolation-in-snapshots": "native",
|
|
14351
|
+
"vitest/no-large-snapshots": "native",
|
|
14352
|
+
"vitest/no-mocks-import": "native",
|
|
14353
|
+
"vitest/no-standalone-expect": "native",
|
|
14354
|
+
"vitest/no-test-prefixes": "native",
|
|
14355
|
+
"vitest/no-test-return-statement": "native",
|
|
14356
|
+
"vitest/no-unneeded-async-expect-function": "native",
|
|
14342
14357
|
"vitest/padding-around-all": "js-plugin",
|
|
14343
|
-
"vitest/prefer-called-exactly-once-with": "
|
|
14344
|
-
"vitest/prefer-called-once": "
|
|
14345
|
-
"vitest/prefer-called-with": "
|
|
14346
|
-
"vitest/prefer-comparison-matcher": "
|
|
14347
|
-
"vitest/prefer-describe-function-title": "
|
|
14348
|
-
"vitest/prefer-each": "
|
|
14349
|
-
"vitest/prefer-equality-matcher": "
|
|
14350
|
-
"vitest/prefer-expect-assertions": "
|
|
14351
|
-
"vitest/prefer-expect-resolves": "
|
|
14352
|
-
"vitest/prefer-expect-type-of": "
|
|
14353
|
-
"vitest/prefer-hooks-in-order": "
|
|
14354
|
-
"vitest/prefer-hooks-on-top": "
|
|
14355
|
-
"vitest/prefer-import-in-mock": "
|
|
14356
|
-
"vitest/prefer-importing-vitest-globals": "
|
|
14357
|
-
"vitest/prefer-lowercase-title": "
|
|
14358
|
-
"vitest/prefer-mock-promise-shorthand": "
|
|
14359
|
-
"vitest/prefer-mock-return-shorthand": "
|
|
14360
|
-
"vitest/prefer-snapshot-hint": "
|
|
14361
|
-
"vitest/prefer-spy-on": "
|
|
14362
|
-
"vitest/prefer-strict-boolean-matchers": "
|
|
14363
|
-
"vitest/prefer-strict-equal": "
|
|
14364
|
-
"vitest/prefer-to-be": "
|
|
14365
|
-
"vitest/prefer-to-be-object": "
|
|
14366
|
-
"vitest/prefer-to-contain": "
|
|
14367
|
-
"vitest/prefer-to-have-been-called-times": "
|
|
14368
|
-
"vitest/prefer-to-have-length": "
|
|
14369
|
-
"vitest/prefer-todo": "
|
|
14358
|
+
"vitest/prefer-called-exactly-once-with": "native",
|
|
14359
|
+
"vitest/prefer-called-once": "native",
|
|
14360
|
+
"vitest/prefer-called-with": "native",
|
|
14361
|
+
"vitest/prefer-comparison-matcher": "native",
|
|
14362
|
+
"vitest/prefer-describe-function-title": "native",
|
|
14363
|
+
"vitest/prefer-each": "native",
|
|
14364
|
+
"vitest/prefer-equality-matcher": "native",
|
|
14365
|
+
"vitest/prefer-expect-assertions": "native",
|
|
14366
|
+
"vitest/prefer-expect-resolves": "native",
|
|
14367
|
+
"vitest/prefer-expect-type-of": "native",
|
|
14368
|
+
"vitest/prefer-hooks-in-order": "native",
|
|
14369
|
+
"vitest/prefer-hooks-on-top": "native",
|
|
14370
|
+
"vitest/prefer-import-in-mock": "native",
|
|
14371
|
+
"vitest/prefer-importing-vitest-globals": "native",
|
|
14372
|
+
"vitest/prefer-lowercase-title": "native",
|
|
14373
|
+
"vitest/prefer-mock-promise-shorthand": "native",
|
|
14374
|
+
"vitest/prefer-mock-return-shorthand": "native",
|
|
14375
|
+
"vitest/prefer-snapshot-hint": "native",
|
|
14376
|
+
"vitest/prefer-spy-on": "native",
|
|
14377
|
+
"vitest/prefer-strict-boolean-matchers": "native",
|
|
14378
|
+
"vitest/prefer-strict-equal": "native",
|
|
14379
|
+
"vitest/prefer-to-be": "native",
|
|
14380
|
+
"vitest/prefer-to-be-object": "native",
|
|
14381
|
+
"vitest/prefer-to-contain": "native",
|
|
14382
|
+
"vitest/prefer-to-have-been-called-times": "native",
|
|
14383
|
+
"vitest/prefer-to-have-length": "native",
|
|
14384
|
+
"vitest/prefer-todo": "native",
|
|
14370
14385
|
"vitest/prefer-vi-mocked": "js-plugin",
|
|
14371
|
-
"vitest/require-awaited-expect-poll": "
|
|
14372
|
-
"vitest/require-local-test-context-for-concurrent-snapshots": "
|
|
14373
|
-
"vitest/require-
|
|
14374
|
-
"vitest/require-
|
|
14375
|
-
"vitest/
|
|
14376
|
-
"vitest/valid-
|
|
14377
|
-
"vitest/valid-expect
|
|
14378
|
-
"vitest/valid-
|
|
14386
|
+
"vitest/require-awaited-expect-poll": "native",
|
|
14387
|
+
"vitest/require-local-test-context-for-concurrent-snapshots": "native",
|
|
14388
|
+
"vitest/require-mock-type-parameters": "native",
|
|
14389
|
+
"vitest/require-to-throw-message": "native",
|
|
14390
|
+
"vitest/require-top-level-describe": "native",
|
|
14391
|
+
"vitest/valid-describe-callback": "native",
|
|
14392
|
+
"vitest/valid-expect": "native",
|
|
14393
|
+
"vitest/valid-expect-in-promise": "native",
|
|
14394
|
+
"vitest/valid-title": "native",
|
|
14379
14395
|
"roblox/no-any": "js-plugin",
|
|
14380
14396
|
"roblox/no-enum-merging": "js-plugin",
|
|
14381
14397
|
"roblox/no-export-assignment-let": "js-plugin",
|
|
@@ -14444,6 +14460,10 @@ const oxlintRuleMapping = {
|
|
|
14444
14460
|
const typeAwareJsPluginRules = /* @__PURE__ */ new Set([
|
|
14445
14461
|
"arrow-style/no-export-default-arrow",
|
|
14446
14462
|
"eslint-plugin/no-property-in-node",
|
|
14463
|
+
"jest/no-error-equal",
|
|
14464
|
+
"jest/no-unnecessary-assertion",
|
|
14465
|
+
"jest/unbound-method",
|
|
14466
|
+
"jest/valid-expect-with-promise",
|
|
14447
14467
|
"react/no-implicit-children",
|
|
14448
14468
|
"react/no-implicit-key",
|
|
14449
14469
|
"react/no-implicit-ref",
|
|
@@ -14452,14 +14472,24 @@ const typeAwareJsPluginRules = /* @__PURE__ */ new Set([
|
|
|
14452
14472
|
"sonar/no-ignored-return",
|
|
14453
14473
|
"sonar/no-redundant-optional",
|
|
14454
14474
|
"sonar/no-try-promise",
|
|
14455
|
-
"
|
|
14456
|
-
"test/no-unnecessary-assertion",
|
|
14457
|
-
"test/unbound-method",
|
|
14458
|
-
"test/valid-expect-with-promise",
|
|
14459
|
-
"unicorn/no-non-function-verb-prefix",
|
|
14460
|
-
"vitest/require-mock-type-parameters"
|
|
14475
|
+
"unicorn/no-non-function-verb-prefix"
|
|
14461
14476
|
]);
|
|
14462
|
-
|
|
14477
|
+
/**
|
|
14478
|
+
* ESLint rules covered on the oxlint side by a differently-named native oxc
|
|
14479
|
+
* rule (rather than by translating the rule itself). They are treated as
|
|
14480
|
+
* oxlint-covered, so hybrid mode drops them from ESLint and lets the oxc rule
|
|
14481
|
+
* run instead; {@link translateRuleToOxlint} resolves them to the oxc rule so
|
|
14482
|
+
* the coverage checks compare against the rule that actually runs. In
|
|
14483
|
+
* ESLint-only mode oxlint does not run, so they stay enabled in ESLint.
|
|
14484
|
+
*
|
|
14485
|
+
* Their canonical ESLint versions must not also run inside oxlint as jsPlugins
|
|
14486
|
+
* (they are in {@link excludedFromOxlint}), which would double-report.
|
|
14487
|
+
*/
|
|
14488
|
+
const oxcCoveredRules = {
|
|
14489
|
+
"sonar/no-all-duplicated-branches": "oxc/branches-sharing-code",
|
|
14490
|
+
"unicorn/no-accidental-bitwise-operator": "oxc/bad-bitwise-operator"
|
|
14491
|
+
};
|
|
14492
|
+
[...Object.keys(oxcCoveredRules), ...typeAwareJsPluginRules];
|
|
14463
14493
|
/**
|
|
14464
14494
|
* Whether the given ESLint rule (canonical renamed name) is covered by oxlint
|
|
14465
14495
|
* in hybrid mode.
|
|
@@ -14468,7 +14498,7 @@ const typeAwareJsPluginRules = /* @__PURE__ */ new Set([
|
|
|
14468
14498
|
* @returns Whether oxlint covers the rule.
|
|
14469
14499
|
*/
|
|
14470
14500
|
function isOxlintCovered(rule) {
|
|
14471
|
-
return rule in oxlintRuleMapping;
|
|
14501
|
+
return rule in oxlintRuleMapping || rule in oxcCoveredRules;
|
|
14472
14502
|
}
|
|
14473
14503
|
/**
|
|
14474
14504
|
* Whether the rule runs via oxlint-tsgolint (`oxlint --type-aware`); such rules
|
|
@@ -14604,7 +14634,7 @@ function markdownVirtualFiles(files) {
|
|
|
14604
14634
|
* `meta.docs.requiresTypeChecking` and are configured outside the type-aware
|
|
14605
14635
|
* config blocks, so neither classification signal catches them.
|
|
14606
14636
|
*/
|
|
14607
|
-
const FUNCTIONALLY_TYPE_AWARE_RULES = /* @__PURE__ */ new Set([...typeAwareJsPluginRules, "
|
|
14637
|
+
const FUNCTIONALLY_TYPE_AWARE_RULES = /* @__PURE__ */ new Set([...typeAwareJsPluginRules, "flawless/prefer-read-only-props"]);
|
|
14608
14638
|
/**
|
|
14609
14639
|
* Collect the names of every type-aware rule referenced by the resolved
|
|
14610
14640
|
* configs.
|
|
@@ -14792,7 +14822,7 @@ async function isentinel(options, ...userConfigs) {
|
|
|
14792
14822
|
config: enableGitignore,
|
|
14793
14823
|
explicit: "gitignore" in options
|
|
14794
14824
|
}));
|
|
14795
|
-
configs.push(
|
|
14825
|
+
configs.push(smallRules({
|
|
14796
14826
|
isInEditor,
|
|
14797
14827
|
stylistic: stylisticOptions
|
|
14798
14828
|
}), comments({
|
|
@@ -14817,6 +14847,7 @@ async function isentinel(options, ...userConfigs) {
|
|
|
14817
14847
|
stylistic: stylisticOptions
|
|
14818
14848
|
}), unicorn({
|
|
14819
14849
|
...resolveSubOptions(options, "unicorn"),
|
|
14850
|
+
roblox: enableRoblox,
|
|
14820
14851
|
root: rootGlobs,
|
|
14821
14852
|
stylistic: stylisticOptions
|
|
14822
14853
|
}));
|
|
@@ -14961,4 +14992,4 @@ async function isentinel(options, ...userConfigs) {
|
|
|
14961
14992
|
return composer;
|
|
14962
14993
|
}
|
|
14963
14994
|
//#endregion
|
|
14964
|
-
export { 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_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, StylisticConfigDefaults,
|
|
14995
|
+
export { 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_BLOCKS, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_MISE, GLOB_POSTCSS, GLOB_ROOT, GLOB_ROOT_SRC, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, comments, isentinel as default, isentinel, defaultPluginRenaming, disables, e18e, eslintPlugin, flawless, gitignore, ignores, imports, isInAgentSession, isInEditorEnvironment, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, loadSmallRulesPlugin, markdown, naming, node, oxfmt, packageJson, perfectionist, pnpm, promise, react, roblox, smallRules, sonarjs, sortCspell, sortGithubAction, sortMiseToml, sortPnpmWorkspace, sortRojoProject, sortTsconfig, spelling, stylistic, test, toml, typescript, unicorn, yaml };
|