@isentinel/eslint-config 6.3.0 → 6.4.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/dist/index.mjs CHANGED
@@ -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 unchanged status is
362
- * touched rather than rewritten: the file must not churn as editors and both
363
- * lint passes re-evaluate the config, yet its mtime must stay ahead of the
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 a
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 = Number(properties["indent_size"]);
757
- const tabWidth = Number(properties["tab_width"]);
758
- if (options["useTabs"] === false && properties["indent_size"] && Number.isFinite(indentSize)) options["tabWidth"] = indentSize;
759
- else if (properties["tab_width"] && Number.isFinite(tabWidth)) options["tabWidth"] = tabWidth;
760
- const printWidth = Number(properties["max_line_length"]);
761
- if (properties["max_line_length"] && Number.isFinite(printWidth)) options["printWidth"] = printWidth;
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",
@@ -1948,7 +1960,7 @@ function lazyPlugin(specifier, transform) {
1948
1960
  return proxy;
1949
1961
  }
1950
1962
  /**
1951
- * Load a plugin synchronously. `engines.node` is `>=24.12.0`, where
1963
+ * Load a plugin synchronously. `engines.node` is `>=24.15.0`, where
1952
1964
  * `require(esm)` is stable, so the ESM-only plugins need no async fallback.
1953
1965
  *
1954
1966
  * @param specifier - The plugin package to load.
@@ -2272,9 +2284,27 @@ async function eslintPlugin({ files = [GLOB_SRC], overrides = {} } = {}) {
2272
2284
  //#endregion
2273
2285
  //#region src/rules/flawless.ts
2274
2286
  /**
2287
+ * Luau globals whose functions only compute a value, for
2288
+ * `flawless/no-ignored-return`. `table` also has functions that mutate, so
2289
+ * only its pure members are listed.
2290
+ */
2291
+ const ROBLOX_PURE_FUNCTIONS = [
2292
+ "bit32",
2293
+ "buffer",
2294
+ "math",
2295
+ "os",
2296
+ "string",
2297
+ "table.clone",
2298
+ "table.create",
2299
+ "table.isfrozen",
2300
+ "utf8",
2301
+ "vector"
2302
+ ];
2303
+ /**
2275
2304
  * Base (non-React) flawless rules shared between the ESLint and oxlint
2276
2305
  * factories. The React flawless rules live in the react rule map; the
2277
- * type-aware rules live in {@link flawlessTypeAwareRules}, plus the type-aware
2306
+ * type-aware rules live in {@link flawlessTypeAwareRules} and
2307
+ * {@link flawlessTypeAwareJsxRules}, plus the type-aware
2278
2308
  * `flawless/naming-convention` in its own config; the test-only rules, and the
2279
2309
  * non-JS `flawless/no-redundant-tsconfig-options`, `flawless/toml-*` and
2280
2310
  * `flawless/yaml-*` rules are configured by their own configs.
@@ -2284,6 +2314,7 @@ async function eslintPlugin({ files = [GLOB_SRC], overrides = {} } = {}) {
2284
2314
  */
2285
2315
  function flawlessRules({ antiSlop = false, roblox = true, stylistic = true, ...arrowOptions } = {}) {
2286
2316
  return {
2317
+ "flawless/cognitive-complexity": ["warn", { threshold: 15 }],
2287
2318
  "flawless/no-export-default-arrow": "error",
2288
2319
  "flawless/no-floating-point-equality": "error",
2289
2320
  ...stylistic === false ? {} : {
@@ -2307,12 +2338,22 @@ function flawlessRules({ antiSlop = false, roblox = true, stylistic = true, ...a
2307
2338
  */
2308
2339
  function flawlessTypeAwareRules({ antiSlop = false, roblox = true } = {}) {
2309
2340
  return {
2341
+ "flawless/no-ignored-return": roblox ? ["error", { pureFunctions: [...ROBLOX_PURE_FUNCTIONS] }] : "error",
2310
2342
  "flawless/no-redundant-type-annotation": "error",
2311
- "flawless/prefer-read-only-props": "error",
2312
2343
  ...antiSlop ? antiSlopTypeAwareRules({ roblox }) : {}
2313
2344
  };
2314
2345
  }
2315
2346
  /**
2347
+ * Type-aware flawless rules that only check function components. ESLint only,
2348
+ * like {@link flawlessTypeAwareRules}. Scoped to TSX files: type information is
2349
+ * only available for TypeScript, and components live in `.tsx` files.
2350
+ *
2351
+ * @returns The rule map.
2352
+ */
2353
+ function flawlessTypeAwareJsxRules() {
2354
+ return { "flawless/prefer-read-only-props": "error" };
2355
+ }
2356
+ /**
2316
2357
  * Syntactic anti-slop rules: patterns AI-written code tends to produce.
2317
2358
  *
2318
2359
  * `flawless/no-reflect-get` is complement-only: `Reflect` has no declaration
@@ -2323,10 +2364,14 @@ function flawlessTypeAwareRules({ antiSlop = false, roblox = true } = {}) {
2323
2364
  */
2324
2365
  function antiSlopRules({ roblox = true }) {
2325
2366
  return {
2367
+ "flawless/max-comment-length": ["error", { maximumWords: 50 }],
2326
2368
  "flawless/no-conditional-empty-object-spread": "error",
2369
+ "flawless/no-em-dash": "error",
2327
2370
  "flawless/no-known-value-widening": "error",
2328
2371
  "flawless/no-object-parameters": "error",
2329
2372
  "flawless/no-shape-in-symbol-names": "error",
2373
+ "flawless/no-trivial-functions": "error",
2374
+ "flawless/no-unknown-parameters": "error",
2330
2375
  "flawless/no-unsafe-dictionary-type": "error",
2331
2376
  ...roblox ? {} : { "flawless/no-reflect-get": "error" }
2332
2377
  };
@@ -2406,6 +2451,12 @@ async function flawless(options = {}, prettierOptions = {}) {
2406
2451
  roblox: false
2407
2452
  })
2408
2453
  }] : [],
2454
+ ...isTypeAware ? [{
2455
+ name: "isentinel/flawless/tsx/rules-type-aware",
2456
+ files: [GLOB_TSX],
2457
+ ignores: ignoresTypeAware,
2458
+ rules: flawlessTypeAwareJsxRules()
2459
+ }] : [],
2409
2460
  ...isTypeAware ? [{
2410
2461
  name: "isentinel/flawless/rules-type-aware",
2411
2462
  files: filesTypeAware,
@@ -2433,7 +2484,7 @@ async function flawless(options = {}, prettierOptions = {}) {
2433
2484
  ];
2434
2485
  }
2435
2486
  //#endregion
2436
- //#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@eslint/compat/2.1.0/c5793be99df3f1294a68a791ed84f1ed609714ef294e5fa5fdeeff97455db3c8/node_modules/@eslint/compat/dist/esm/index.js
2487
+ //#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@eslint/compat/2.1.0/017f2a99c4964fa273bbabeb623136c3c3730f9415cea90ed2501194dbdd23bd/node_modules/@eslint/compat/dist/esm/index.js
2437
2488
  /**
2438
2489
  * @fileoverview Ignore file utilities for the compat package.
2439
2490
  * @author Nicholas C. Zakas
@@ -2462,7 +2513,7 @@ function convertIgnorePatternToMinimatch(pattern) {
2462
2513
  }
2463
2514
  var init_esm$1 = __esmMin((() => {}));
2464
2515
  //#endregion
2465
- //#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-config-flat-gitignore/2.3.0/48bee61dfbd6416cb227d1c477eb8990bf234fa634e4ccd62a9520a90cc26602/node_modules/eslint-config-flat-gitignore/dist/index.mjs
2516
+ //#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
2517
  var dist_exports = /* @__PURE__ */ __exportAll$2({ default: () => ignore });
2467
2518
  function toArray(array) {
2468
2519
  array = array ?? [];
@@ -2664,6 +2715,21 @@ function imports({ stylistic = true, type = "game" } = {}) {
2664
2715
  }
2665
2716
  //#endregion
2666
2717
  //#region src/rules/javascript.ts
2718
+ /** `id-length` options shared by the ESLint rule and the native oxlint rule. */
2719
+ const ID_LENGTH_OPTIONS = {
2720
+ exceptions: [
2721
+ "_",
2722
+ "x",
2723
+ "y",
2724
+ "z",
2725
+ "a",
2726
+ "b",
2727
+ "e"
2728
+ ],
2729
+ max: 30,
2730
+ min: 2,
2731
+ properties: "never"
2732
+ };
2667
2733
  /**
2668
2734
  * Core JavaScript rules shared between the ESLint and oxlint factories.
2669
2735
  *
@@ -2868,20 +2934,6 @@ function javascriptRules({ isInEditor = false, roblox = true, stylistic = true }
2868
2934
  "valid-typeof": ["error", { requireStringLiterals: true }],
2869
2935
  "vars-on-top": "error",
2870
2936
  ...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
2937
  "max-lines": ["warn", {
2886
2938
  max: 300,
2887
2939
  skipBlankLines: true,
@@ -2911,6 +2963,7 @@ async function javascript({ complementIgnores, isInEditor = false, overrides = {
2911
2963
  const pluginDeMorgan = lazyPlugin("eslint-plugin-de-morgan");
2912
2964
  const pluginMaxParameters = lazyPlugin("eslint-plugin-better-max-params");
2913
2965
  const pluginUnusedImports = await interopDefault(import("eslint-plugin-unused-imports"));
2966
+ const idLengthRules = stylistic !== false ? { "id-length": ["error", ID_LENGTH_OPTIONS] } : {};
2914
2967
  return [
2915
2968
  {
2916
2969
  name: "isentinel/javascript/setup",
@@ -2948,6 +3001,7 @@ async function javascript({ complementIgnores, isInEditor = false, overrides = {
2948
3001
  roblox,
2949
3002
  stylistic
2950
3003
  }),
3004
+ ...idLengthRules,
2951
3005
  ...overrides
2952
3006
  }
2953
3007
  },
@@ -2961,6 +3015,7 @@ async function javascript({ complementIgnores, isInEditor = false, overrides = {
2961
3015
  roblox: false,
2962
3016
  stylistic
2963
3017
  }),
3018
+ ...idLengthRules,
2964
3019
  ...overrides
2965
3020
  }
2966
3021
  }] : []
@@ -3159,7 +3214,7 @@ init_globs();
3159
3214
  * loading the plugin. `test/lazy-plugin.spec.ts` asserts the two match.
3160
3215
  */
3161
3216
  const MARKDOWN_PROCESSOR_NAME = "@eslint/markdown/markdown";
3162
- function markdown({ componentExts: componentExtensions = [], files = [GLOB_MARKDOWN], overrides = {}, type = "game" } = {}) {
3217
+ function markdown({ antiSlop = false, componentExts: componentExtensions = [], files = [GLOB_MARKDOWN], overrides = {}, type = "game" } = {}) {
3163
3218
  const markdownPlugin = lazyPlugin("@eslint/markdown");
3164
3219
  return [
3165
3220
  {
@@ -3203,6 +3258,7 @@ function markdown({ componentExts: componentExtensions = [], files = [GLOB_MARKD
3203
3258
  "markdown/table-column-count": "error",
3204
3259
  "style/indent": "off",
3205
3260
  "unicorn/no-missing-local-resource": "error",
3261
+ ...antiSlop ? { "flawless/no-em-dash": "error" } : {},
3206
3262
  ...type === "package" ? {
3207
3263
  "markdown/heading-increment": "error",
3208
3264
  "markdown/no-bare-urls": "error",
@@ -3780,6 +3836,12 @@ function reactSelectors() {
3780
3836
  selector: ["parameter", "variable"],
3781
3837
  types: REACT_COMPONENT_TYPES
3782
3838
  },
3839
+ {
3840
+ componentProp: true,
3841
+ format: ["StrictPascalCase"],
3842
+ selector: "typeProperty",
3843
+ types: REACT_COMPONENT_TYPES
3844
+ },
3783
3845
  {
3784
3846
  format: ["strictCamelCase", "StrictPascalCase"],
3785
3847
  selector: ["classProperty", "typeProperty"],
@@ -3940,7 +4002,8 @@ function oxfmtSingleFix(plugin) {
3940
4002
  }
3941
4003
  function editOf({ fix }) {
3942
4004
  if (typeof fix !== "function") return;
3943
- return fix(recordingFixer) ?? void 0;
4005
+ const edit = fix(recordingFixer);
4006
+ return edit !== null && "range" in edit ? edit : void 0;
3944
4007
  }
3945
4008
  /**
3946
4009
  * Merge non-overlapping edits into one that spans them all.
@@ -3951,7 +4014,7 @@ function editOf({ fix }) {
3951
4014
  */
3952
4015
  function mergeEdits(source, edits) {
3953
4016
  const sorted = edits.toSorted((first, second) => first.range[0] - second.range[0]);
3954
- const start = sorted[0].range[0];
4017
+ const start = sorted[0]?.range[0] ?? 0;
3955
4018
  let end = start;
3956
4019
  let text = "";
3957
4020
  for (const { range, text: insert } of sorted) {
@@ -4002,7 +4065,7 @@ function singleFixRule(rule) {
4002
4065
  const listeners = rule.create(proxy);
4003
4066
  return Object.fromEntries(Object.entries(listeners).map(([selector, listener]) => {
4004
4067
  return [selector, (...args) => {
4005
- listener(...args);
4068
+ if (listener !== void 0) Reflect.apply(listener, void 0, args);
4006
4069
  flush();
4007
4070
  }];
4008
4071
  }));
@@ -5087,7 +5150,6 @@ async function roblox(options = {}, formatLua = true) {
5087
5150
  function sonarjsRules({ isInEditor, roblox = true }) {
5088
5151
  return {
5089
5152
  "sonar/bool-param-default": "error",
5090
- "sonar/cognitive-complexity": "warn",
5091
5153
  "sonar/constructor-for-side-effects": "error",
5092
5154
  "sonar/destructuring-assignment-syntax": "error",
5093
5155
  "sonar/elseif-without-else": "off",
@@ -5103,12 +5165,10 @@ function sonarjsRules({ isInEditor, roblox = true }) {
5103
5165
  "sonar/no-duplicated-branches": "error",
5104
5166
  "sonar/no-element-overwrite": "error",
5105
5167
  "sonar/no-empty-collection": "error",
5106
- "sonar/no-floating-point-equality": "error",
5107
5168
  "sonar/no-gratuitous-expressions": "off",
5108
5169
  "sonar/no-identical-conditions": "error",
5109
5170
  "sonar/no-identical-expressions": "error",
5110
5171
  "sonar/no-identical-functions": "error",
5111
- "sonar/no-ignored-return": "error",
5112
5172
  "sonar/no-inverted-boolean-check": "error",
5113
5173
  "sonar/no-nested-conditional": "error",
5114
5174
  "sonar/no-nested-incdec": "error",
@@ -5154,7 +5214,6 @@ function sonarjsRules({ isInEditor, roblox = true }) {
5154
5214
  */
5155
5215
  function sonarjsTestRules({ jest = false, roblox = true } = {}) {
5156
5216
  return {
5157
- "sonar/no-incompatible-assertion-types": "error",
5158
5217
  ...jest ? {
5159
5218
  "sonar/no-mixed-completion-style": "error",
5160
5219
  "sonar/synchronous-suite-callback": "error"
@@ -5187,177 +5246,293 @@ async function sonarjs({ complementIgnores, isInEditor, roblox }) {
5187
5246
  //#region src/eslint/configs/sort.ts
5188
5247
  init_globs();
5189
5248
  /**
5190
- * Sort GitHub Actions workflow files.
5249
+ * Sort GitHub Actions workflow, composite action and label files.
5191
5250
  *
5192
5251
  * Requires `yaml` config.
5193
5252
  *
5194
5253
  * @returns An array of flat configuration items.
5195
5254
  */
5196
5255
  function sortGithubAction() {
5197
- return [{
5198
- name: "isentinel/sort/github-actions",
5199
- files: [`.github/workflows/${GLOB_YAML}`],
5200
- rules: {
5201
- "yaml/sort-keys": [
5256
+ return [
5257
+ {
5258
+ name: "isentinel/sort/github-actions",
5259
+ files: [`.github/workflows/${GLOB_YAML}`],
5260
+ rules: {
5261
+ "yaml/sort-keys": [
5262
+ "error",
5263
+ {
5264
+ order: [
5265
+ "name",
5266
+ "run-name",
5267
+ "on",
5268
+ "permissions",
5269
+ "env",
5270
+ "concurrency",
5271
+ "jobs"
5272
+ ],
5273
+ pathPattern: "^$"
5274
+ },
5275
+ {
5276
+ order: [
5277
+ "name",
5278
+ "permissions",
5279
+ "needs",
5280
+ "if",
5281
+ "runs-on",
5282
+ "environment",
5283
+ "concurrency",
5284
+ "outputs",
5285
+ "env",
5286
+ "defaults",
5287
+ "steps",
5288
+ "timeout-minutes",
5289
+ "strategy",
5290
+ "continue-on-error",
5291
+ "container",
5292
+ "services",
5293
+ "uses",
5294
+ "with",
5295
+ "secrets"
5296
+ ],
5297
+ pathPattern: "^jobs\\.[^.]+$"
5298
+ },
5299
+ {
5300
+ order: [
5301
+ "check_run",
5302
+ "check_suite",
5303
+ "create",
5304
+ "delete",
5305
+ "deployment",
5306
+ "deployment_status",
5307
+ "discussion",
5308
+ "discussion_comment",
5309
+ "fork",
5310
+ "gollum",
5311
+ "issue_comment",
5312
+ "issues",
5313
+ "label",
5314
+ "merge_group",
5315
+ "milestone",
5316
+ "page_build",
5317
+ "public",
5318
+ "pull_request",
5319
+ "pull_request_comment",
5320
+ "pull_request_review",
5321
+ "pull_request_review_comment",
5322
+ "pull_request_target",
5323
+ "push",
5324
+ "registry_package",
5325
+ "release",
5326
+ "repository_dispatch",
5327
+ "schedule",
5328
+ "status",
5329
+ "watch",
5330
+ "workflow_call",
5331
+ "workflow_dispatch",
5332
+ "workflow_run"
5333
+ ],
5334
+ pathPattern: "^on$"
5335
+ },
5336
+ {
5337
+ order: [
5338
+ "branches",
5339
+ "branches-ignore",
5340
+ "paths",
5341
+ "paths-ignore"
5342
+ ],
5343
+ pathPattern: "^on\\.pull_request$"
5344
+ },
5345
+ {
5346
+ order: [
5347
+ "branches",
5348
+ "branches-ignore",
5349
+ "paths",
5350
+ "paths-ignore"
5351
+ ],
5352
+ pathPattern: "^on\\.pull_request_target$"
5353
+ },
5354
+ {
5355
+ order: [
5356
+ "branches",
5357
+ "tags",
5358
+ "branches-ignore",
5359
+ "tags-ignore",
5360
+ "paths",
5361
+ "paths-ignore"
5362
+ ],
5363
+ pathPattern: "^on\\.push$"
5364
+ },
5365
+ {
5366
+ order: [
5367
+ "inputs",
5368
+ "outputs",
5369
+ "secrets"
5370
+ ],
5371
+ pathPattern: "^on\\.workflow_call$"
5372
+ },
5373
+ {
5374
+ order: ["inputs"],
5375
+ pathPattern: "^on\\.workflow_dispatch$"
5376
+ },
5377
+ {
5378
+ order: ["branches", "branches-ignore"],
5379
+ pathPattern: "^on\\.workflow_run$"
5380
+ },
5381
+ {
5382
+ order: [
5383
+ "description",
5384
+ "required",
5385
+ "default",
5386
+ "type"
5387
+ ],
5388
+ pathPattern: "^on\\.(workflow_call|workflow_dispatch)\\.inputs\\.[^.]+$"
5389
+ },
5390
+ {
5391
+ order: ["shell", "working-directory"],
5392
+ pathPattern: "^(defaults\\.run|jobs\\.[^.]+\\.defaults\\.run)$"
5393
+ },
5394
+ {
5395
+ order: ["group", "cancel-in-progress"],
5396
+ pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
5397
+ },
5398
+ {
5399
+ order: [
5400
+ "name",
5401
+ "permissions",
5402
+ "needs",
5403
+ "if",
5404
+ "runs-on",
5405
+ "environment",
5406
+ "concurrency",
5407
+ "outputs",
5408
+ "env",
5409
+ "defaults",
5410
+ "steps",
5411
+ "timeout-minutes",
5412
+ "strategy",
5413
+ "continue-on-error",
5414
+ "container",
5415
+ "services",
5416
+ "uses",
5417
+ "with",
5418
+ "secrets"
5419
+ ],
5420
+ pathPattern: "^jobs\\. [^.]+$"
5421
+ },
5422
+ {
5423
+ order: [
5424
+ "id",
5425
+ "if",
5426
+ "name",
5427
+ "uses",
5428
+ "run",
5429
+ "working-directory",
5430
+ "with",
5431
+ "env",
5432
+ "continue-on-error",
5433
+ "timeout-minutes"
5434
+ ],
5435
+ pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]$"
5436
+ },
5437
+ {
5438
+ order: ["args", "entrypoint"],
5439
+ pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]\\.with$"
5440
+ },
5441
+ {
5442
+ order: [
5443
+ "matrix",
5444
+ "fail-fast",
5445
+ "max-parallel"
5446
+ ],
5447
+ pathPattern: "^jobs\\.[^.]+\\.strategy$"
5448
+ },
5449
+ {
5450
+ order: ["include", "exclude"],
5451
+ pathPattern: "^jobs\\.[^.]+\\.strategy\\.matrix$"
5452
+ },
5453
+ {
5454
+ order: [
5455
+ "image",
5456
+ "credentials",
5457
+ "env",
5458
+ "ports",
5459
+ "volumes",
5460
+ "options"
5461
+ ],
5462
+ pathPattern: "^jobs\\.[^.]+\\.container$"
5463
+ },
5464
+ {
5465
+ order: [
5466
+ "image",
5467
+ "credentials",
5468
+ "env",
5469
+ "ports",
5470
+ "volumes",
5471
+ "options"
5472
+ ],
5473
+ pathPattern: "^jobs\\.[^.]+\\.services\\.[^.]+$"
5474
+ },
5475
+ {
5476
+ order: { type: "asc" },
5477
+ pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
5478
+ }
5479
+ ],
5480
+ "yaml/sort-sequence-values": [
5481
+ "error",
5482
+ {
5483
+ order: {
5484
+ natural: true,
5485
+ type: "asc"
5486
+ },
5487
+ pathPattern: "^on$"
5488
+ },
5489
+ {
5490
+ order: {
5491
+ natural: true,
5492
+ type: "asc"
5493
+ },
5494
+ pathPattern: "^on\\.[^.]+\\.(branches|branches-ignore|tags|tags-ignore|paths|paths-ignore|types)$"
5495
+ },
5496
+ {
5497
+ order: {
5498
+ natural: true,
5499
+ type: "asc"
5500
+ },
5501
+ pathPattern: "^jobs\\.[^.]+\\.needs$"
5502
+ }
5503
+ ]
5504
+ }
5505
+ },
5506
+ {
5507
+ name: "isentinel/sort/github-composite-actions",
5508
+ files: [`.github/actions/${GLOB_YAML}`],
5509
+ rules: { "yaml/sort-keys": [
5202
5510
  "error",
5203
5511
  {
5204
5512
  order: [
5205
5513
  "name",
5206
- "run-name",
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: [
5514
+ "description",
5307
5515
  "inputs",
5308
5516
  "outputs",
5309
- "secrets"
5517
+ "runs"
5310
5518
  ],
5311
- pathPattern: "^on\\.workflow_call$"
5312
- },
5313
- {
5314
- order: ["inputs"],
5315
- pathPattern: "^on\\.workflow_dispatch$"
5316
- },
5317
- {
5318
- order: ["branches", "branches-ignore"],
5319
- pathPattern: "^on\\.workflow_run$"
5519
+ pathPattern: "^$"
5320
5520
  },
5321
5521
  {
5322
5522
  order: [
5323
5523
  "description",
5324
5524
  "required",
5325
- "default",
5326
- "type"
5525
+ "default"
5327
5526
  ],
5328
- pathPattern: "^on\\.(workflow_call|workflow_dispatch)\\.inputs\\.[^.]+$"
5527
+ pathPattern: "^inputs\\.[^.]+$"
5329
5528
  },
5330
5529
  {
5331
- order: ["shell", "working-directory"],
5332
- pathPattern: "^(defaults\\.run|jobs\\.[^.]+\\.defaults\\.run)$"
5530
+ order: ["description", "value"],
5531
+ pathPattern: "^outputs\\.[^.]+$"
5333
5532
  },
5334
5533
  {
5335
- order: ["group", "cancel-in-progress"],
5336
- pathPattern: "^(concurrency|jobs\\.[^.]+\\.concurrency)$"
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\\. [^.]+$"
5534
+ order: ["using", "steps"],
5535
+ pathPattern: "^runs$"
5361
5536
  },
5362
5537
  {
5363
5538
  order: [
@@ -5369,132 +5544,31 @@ function sortGithubAction() {
5369
5544
  "working-directory",
5370
5545
  "with",
5371
5546
  "env",
5547
+ "shell",
5372
5548
  "continue-on-error",
5373
5549
  "timeout-minutes"
5374
5550
  ],
5375
- pathPattern: "^jobs\\.[^.]+\\.steps\\[\\d+\\]$"
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\\.[^.]+$"
5551
+ pathPattern: "^runs\\.steps\\[\\d+\\]$"
5414
5552
  },
5415
5553
  {
5416
5554
  order: { type: "asc" },
5417
- pathPattern: "^(?!$|on$|jobs\\.[^.]+$|on\\.(pull_request|pull_request_target|push|workflow_call|workflow_dispatch|workflow_run)$).*"
5555
+ pathPattern: "^(?!^$|inputs\\.[^.]+$|outputs\\.[^.]+$|runs$|runs\\.steps\\[\\d+\\]$).*$"
5418
5556
  }
5419
- ],
5420
- "yaml/sort-sequence-values": [
5421
- "error",
5422
- {
5423
- order: {
5424
- natural: true,
5425
- type: "asc"
5426
- },
5427
- pathPattern: "^on$"
5428
- },
5429
- {
5430
- order: {
5431
- natural: true,
5432
- type: "asc"
5433
- },
5434
- pathPattern: "^on\\.[^.]+\\.(branches|branches-ignore|tags|tags-ignore|paths|paths-ignore|types)$"
5557
+ ] }
5558
+ },
5559
+ {
5560
+ name: "isentinel/sort/github-labels",
5561
+ files: [".github/labels.y{,a}ml"],
5562
+ rules: { "flawless/yaml-sort-sequence-by-key": ["error", {
5563
+ key: "name",
5564
+ order: {
5565
+ natural: true,
5566
+ type: "asc"
5435
5567
  },
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
5568
  pathPattern: "^$"
5459
- },
5460
- {
5461
- order: [
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
- }];
5569
+ }] }
5570
+ }
5571
+ ];
5498
5572
  }
5499
5573
  /**
5500
5574
  * Sort mise configuration files by category.
@@ -5949,13 +6023,23 @@ function sortCspell() {
5949
6023
  "**/.cspell.y{,a}ml",
5950
6024
  "**/.cspell.config.y{,a}ml"
5951
6025
  ],
5952
- rules: { "yaml/sort-sequence-values": ["error", {
5953
- order: {
5954
- natural: true,
5955
- type: "asc"
5956
- },
5957
- pathPattern: "^((overrides|languageSettings)\\[\\d+\\]\\.)?(words|userWords|ignoreWords|noSuggestWords|flagWords|ignorePaths|dictionaries|enableFiletypes)$"
5958
- }] }
6026
+ rules: {
6027
+ "flawless/yaml-sort-sequence-by-key": ["error", {
6028
+ key: "name",
6029
+ order: {
6030
+ natural: true,
6031
+ type: "asc"
6032
+ },
6033
+ pathPattern: "^((overrides|languageSettings)\\[\\d+\\]\\.)?dictionaryDefinitions$"
6034
+ }],
6035
+ "yaml/sort-sequence-values": ["error", {
6036
+ order: {
6037
+ natural: true,
6038
+ type: "asc"
6039
+ },
6040
+ pathPattern: "^((overrides|languageSettings)\\[\\d+\\]\\.)?(words|userWords|ignoreWords|noSuggestWords|flagWords|ignorePaths|dictionaries|enableFiletypes)$"
6041
+ }]
6042
+ }
5959
6043
  }];
5960
6044
  }
5961
6045
  //#endregion
@@ -6021,13 +6105,12 @@ function spelling(options = {}) {
6021
6105
  * @param options - Resolved stylistic options.
6022
6106
  * @returns The rule map.
6023
6107
  */
6024
- function stylisticRules({ jsx = true, quotes = "double" } = {}) {
6108
+ function stylisticRules({ quotes = "double" } = {}) {
6025
6109
  return {
6026
6110
  "antfu/consistent-list-newline": "off",
6027
6111
  "antfu/if-newline": "off",
6028
6112
  "antfu/top-level-function": "error",
6029
6113
  "curly": ["error", "all"],
6030
- ...jsx ? { "style/jsx-curly-brace-presence": ["error", { propElementValues: "always" }] } : {},
6031
6114
  "style/lines-between-class-members": ["error", { enforce: [{
6032
6115
  blankLine: "always",
6033
6116
  next: "method",
@@ -6078,6 +6161,17 @@ function stylisticRules({ jsx = true, quotes = "double" } = {}) {
6078
6161
  ]
6079
6162
  };
6080
6163
  }
6164
+ /**
6165
+ * JSX-specific stylistic rules shared between the ESLint and oxlint factories.
6166
+ * Scoped to JSX/TSX files: a `.ts` or `.js` file cannot contain JSX, so the
6167
+ * rules would only cost a traversal there.
6168
+ *
6169
+ * @param options - Resolved stylistic options.
6170
+ * @returns The rule map.
6171
+ */
6172
+ function stylisticJsxRules({ jsx = true } = {}) {
6173
+ return jsx ? { "style/jsx-curly-brace-presence": ["error", { propElementValues: "always" }] } : {};
6174
+ }
6081
6175
  //#endregion
6082
6176
  //#region src/eslint/configs/stylistic.ts
6083
6177
  init_globs();
@@ -6101,25 +6195,47 @@ function stylistic(options = {}) {
6101
6195
  quotes,
6102
6196
  semi
6103
6197
  });
6104
- return [{
6105
- name: "isentinel/stylistic/setup",
6106
- plugins: {
6107
- antfu: pluginAntfu,
6108
- style: pluginStylistic
6109
- }
6110
- }, {
6111
- name: "isentinel/stylistic",
6112
- files: [GLOB_SRC],
6113
- rules: {
6114
- ...config.rules,
6115
- ...stylisticRules({
6116
- indent,
6117
- jsx,
6118
- quotes,
6119
- semi
6120
- })
6121
- }
6122
- }];
6198
+ const presetRules = Object.entries(config.rules ?? {});
6199
+ return [
6200
+ {
6201
+ name: "isentinel/stylistic/setup",
6202
+ plugins: {
6203
+ antfu: pluginAntfu,
6204
+ style: pluginStylistic
6205
+ }
6206
+ },
6207
+ {
6208
+ name: "isentinel/stylistic",
6209
+ files: [GLOB_SRC],
6210
+ rules: {
6211
+ ...Object.fromEntries(presetRules.filter((entry) => !isJsxRule(entry))),
6212
+ ...stylisticRules({
6213
+ indent,
6214
+ jsx,
6215
+ quotes,
6216
+ semi
6217
+ })
6218
+ }
6219
+ },
6220
+ ...jsx === false ? [] : [{
6221
+ name: "isentinel/stylistic/jsx",
6222
+ files: [GLOB_JSX, GLOB_TSX],
6223
+ rules: {
6224
+ ...Object.fromEntries(presetRules.filter(isJsxRule)),
6225
+ ...stylisticJsxRules({ jsx })
6226
+ }
6227
+ }]
6228
+ ];
6229
+ }
6230
+ /**
6231
+ * The preset's `style/jsx-*` rules only report on JSX, which a `.ts` or `.js`
6232
+ * file cannot contain, so they go to their own JSX/TSX-scoped block.
6233
+ *
6234
+ * @param entry - A `[name, entry]` pair from the preset rules.
6235
+ * @returns Whether the rule is a `style/jsx-*` rule.
6236
+ */
6237
+ function isJsxRule([name]) {
6238
+ return name.startsWith("style/jsx-");
6123
6239
  }
6124
6240
  //#endregion
6125
6241
  //#region src/rules/test.ts
@@ -6172,6 +6288,7 @@ function jestExtendedRules() {
6172
6288
  */
6173
6289
  function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = true, stylistic = true } = {}) {
6174
6290
  return {
6291
+ "flawless/no-incompatible-assertion-types": "error",
6175
6292
  "flawless/no-shared-mocks": "error",
6176
6293
  "flawless/prefer-expect-assertions-count": "error",
6177
6294
  "jest/consistent-test-it": "error",
@@ -6251,6 +6368,7 @@ function jestRules({ extended = false, isInEditor = false, roblox: isRoblox = tr
6251
6368
  function vitestRules({ extended = false, isInEditor = false, stylistic = true } = {}) {
6252
6369
  return {
6253
6370
  "flawless/no-conditional-in-test": ["error", { allowOptionalChaining: false }],
6371
+ "flawless/no-incompatible-assertion-types": "error",
6254
6372
  "flawless/no-shared-mocks": "error",
6255
6373
  "flawless/prefer-ending-with-an-expect": ["warn", { assertFunctionNames: [
6256
6374
  "expect",
@@ -6983,7 +7101,7 @@ async function unicorn({ complementIgnores, nameReplacements, roblox = true, roo
6983
7101
  ];
6984
7102
  }
6985
7103
  //#endregion
6986
- //#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-plugin-yml/3.5.0/eedfb7e8cfd566a06319a5894d49f61723d6a8793c9b4a69e6556dd999563774/node_modules/eslint-plugin-yml/lib/chunk-CfYAbeIz.mjs
7104
+ //#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
7105
  var __defProp$1, __exportAll$1;
6988
7106
  var init_chunk_CfYAbeIz = __esmMin((() => {
6989
7107
  __defProp$1 = Object.defineProperty;
@@ -10166,7 +10284,7 @@ var init_lib$1 = __esmMin((() => {
10166
10284
  ({ ...meta_exports$1 });
10167
10285
  }));
10168
10286
  //#endregion
10169
- //#region ../../../setup-pnpm/node_modules/.bin/store/v11/links/@/eslint-plugin-yml/3.5.0/eedfb7e8cfd566a06319a5894d49f61723d6a8793c9b4a69e6556dd999563774/node_modules/eslint-plugin-yml/lib/index.mjs
10287
+ //#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
10288
  var lib_exports = /* @__PURE__ */ __exportAll$2({
10171
10289
  configs: () => configs,
10172
10290
  default: () => src_default,
@@ -16070,7 +16188,7 @@ var init_lib = __esmMin((() => {
16070
16188
  //#endregion
16071
16189
  //#region src/eslint/configs/yaml.ts
16072
16190
  init_globs();
16073
- async function yaml({ files = [GLOB_YAML, "**/github-actions-workflow"], overrides = {}, stylistic = true } = {}) {
16191
+ async function yaml({ files = [GLOB_YAML, "**/github-actions-workflow"], overrides = {}, prettierOptions = {}, stylistic = true } = {}) {
16074
16192
  const [pluginYaml, parserYaml, eslintPluginFlawless] = await Promise.all([
16075
16193
  interopDefault(Promise.resolve().then(() => (init_lib(), lib_exports))),
16076
16194
  interopDefault(import("yaml-eslint-parser")),
@@ -16097,6 +16215,13 @@ async function yaml({ files = [GLOB_YAML, "**/github-actions-workflow"], overrid
16097
16215
  "yaml/plain-scalar": "error",
16098
16216
  ...stylistic !== false ? {
16099
16217
  "flawless/yaml-block-key-blank-lines": "error",
16218
+ "style/max-len": ["error", {
16219
+ code: prettierOptions.printWidth ?? 100,
16220
+ comments: Number(prettierOptions["jsdocPrintWidth"]) || 80,
16221
+ ignorePattern: String.raw`^\s*(?:-\s+)?uses:\s`,
16222
+ ignoreUrls: true,
16223
+ tabWidth: 2
16224
+ }],
16100
16225
  "yaml/block-mapping": "error",
16101
16226
  "yaml/block-mapping-colon-indicator-newline": "error",
16102
16227
  "yaml/block-mapping-question-indicator-newline": "error",
@@ -16194,6 +16319,8 @@ const typeAwarePrefixes = /* @__PURE__ */ new Set([
16194
16319
  const typeAwareRuleIds = /* @__PURE__ */ new Set([
16195
16320
  "eslint-plugin/no-property-in-node",
16196
16321
  "flawless/naming-convention",
16322
+ "flawless/no-ignored-return",
16323
+ "flawless/no-incompatible-assertion-types",
16197
16324
  "flawless/no-materialized-filter-map",
16198
16325
  "flawless/no-redundant-type-annotation",
16199
16326
  "flawless/no-reflect-set",
@@ -16453,6 +16580,8 @@ var init_adapters = __esmMin((() => {
16453
16580
  ]);
16454
16581
  typeAwareJsPluginRules = /* @__PURE__ */ new Set([
16455
16582
  "eslint-plugin/no-property-in-node",
16583
+ "flawless/no-ignored-return",
16584
+ "flawless/no-incompatible-assertion-types",
16456
16585
  "jest/no-error-equal",
16457
16586
  "jest/no-unnecessary-assertion",
16458
16587
  "jest/unbound-method",
@@ -16462,12 +16591,9 @@ var init_adapters = __esmMin((() => {
16462
16591
  "react/no-implicit-ref",
16463
16592
  "react/no-leaked-conditional-rendering",
16464
16593
  "react/no-unused-props",
16465
- "sonar/no-ignored-return",
16466
- "sonar/no-incompatible-assertion-types",
16467
16594
  "sonar/no-redundant-optional",
16468
16595
  "sonar/no-try-promise",
16469
16596
  "sonar/prefer-immediate-return",
16470
- "ts/prefer-destructuring",
16471
16597
  "unicorn/no-non-function-verb-prefix"
16472
16598
  ]);
16473
16599
  ESLINT_ONLY = "eslint-only";
@@ -16519,7 +16645,8 @@ var init_adapters = __esmMin((() => {
16519
16645
  "no-shadow",
16520
16646
  "no-unused-expressions",
16521
16647
  "no-unused-private-class-members",
16522
- "no-useless-constructor"
16648
+ "no-useless-constructor",
16649
+ "prefer-destructuring"
16523
16650
  ]);
16524
16651
  UNICORN_NATIVE_RENAMES = { "no-for-each": "no-array-for-each" };
16525
16652
  }));
@@ -16833,14 +16960,19 @@ var init_oxlint_capabilities = __esmMin((() => {
16833
16960
  "eslint-plugin/test-case-shorthand-strings",
16834
16961
  "eslint-plugin/unique-test-case-names",
16835
16962
  "flawless/arrow-return-style",
16963
+ "flawless/cognitive-complexity",
16836
16964
  "flawless/jsx-shorthand-boolean",
16837
16965
  "flawless/jsx-shorthand-fragment",
16966
+ "flawless/max-comment-length",
16838
16967
  "flawless/max-lines-per-function",
16839
16968
  "flawless/naming-convention",
16840
16969
  "flawless/no-conditional-empty-object-spread",
16841
16970
  "flawless/no-conditional-in-test",
16971
+ "flawless/no-em-dash",
16842
16972
  "flawless/no-export-default-arrow",
16843
16973
  "flawless/no-floating-point-equality",
16974
+ "flawless/no-ignored-return",
16975
+ "flawless/no-incompatible-assertion-types",
16844
16976
  "flawless/no-known-value-widening",
16845
16977
  "flawless/no-materialized-filter-map",
16846
16978
  "flawless/no-object-parameters",
@@ -16851,8 +16983,10 @@ var init_oxlint_capabilities = __esmMin((() => {
16851
16983
  "flawless/no-shape-in-symbol-names",
16852
16984
  "flawless/no-shared-mocks",
16853
16985
  "flawless/no-shared-test-state",
16986
+ "flawless/no-trivial-functions",
16854
16987
  "flawless/no-unknown-parameters",
16855
16988
  "flawless/no-unknown-returns",
16989
+ "flawless/no-unnecessary-prop-alias",
16856
16990
  "flawless/no-unnecessary-use-callback",
16857
16991
  "flawless/no-unnecessary-use-memo",
16858
16992
  "flawless/no-unsafe-dictionary-type",
@@ -16868,6 +17002,7 @@ var init_oxlint_capabilities = __esmMin((() => {
16868
17002
  "flawless/react-namespace",
16869
17003
  "flawless/toml-sort-keys",
16870
17004
  "flawless/yaml-block-key-blank-lines",
17005
+ "flawless/yaml-sort-sequence-by-key",
16871
17006
  "for-direction",
16872
17007
  "func-call-spacing",
16873
17008
  "func-name-matching",
@@ -17005,6 +17140,7 @@ var init_oxlint_capabilities = __esmMin((() => {
17005
17140
  "jsdoc/no-restricted-syntax",
17006
17141
  "jsdoc/no-types",
17007
17142
  "jsdoc/no-undefined-types",
17143
+ "jsdoc/no-unnecessary-type-assertion",
17008
17144
  "jsdoc/normalize-see-links",
17009
17145
  "jsdoc/prefer-import-tag",
17010
17146
  "jsdoc/reject-any-type",
@@ -17044,6 +17180,7 @@ var init_oxlint_capabilities = __esmMin((() => {
17044
17180
  "jsdoc/sort-tags",
17045
17181
  "jsdoc/tag-lines",
17046
17182
  "jsdoc/text-escaping",
17183
+ "jsdoc/ts-ban-ts-comment",
17047
17184
  "jsdoc/ts-method-signature-style",
17048
17185
  "jsdoc/ts-no-empty-object-type",
17049
17186
  "jsdoc/ts-no-unnecessary-template-expression",
@@ -17297,6 +17434,7 @@ var init_oxlint_capabilities = __esmMin((() => {
17297
17434
  "perfectionist/sort-array-includes",
17298
17435
  "perfectionist/sort-arrays",
17299
17436
  "perfectionist/sort-classes",
17437
+ "perfectionist/sort-constructor-parameters",
17300
17438
  "perfectionist/sort-decorators",
17301
17439
  "perfectionist/sort-enums",
17302
17440
  "perfectionist/sort-export-attributes",
@@ -17458,6 +17596,7 @@ var init_oxlint_capabilities = __esmMin((() => {
17458
17596
  "small-rules/ban-react-fc",
17459
17597
  "small-rules/ban-types",
17460
17598
  "small-rules/consistent-compound-words",
17599
+ "small-rules/curly",
17461
17600
  "small-rules/directive-disable-enable-pair",
17462
17601
  "small-rules/directive-no-aggregating-enable",
17463
17602
  "small-rules/directive-no-duplicate-disable",
@@ -17469,53 +17608,89 @@ var init_oxlint_capabilities = __esmMin((() => {
17469
17608
  "small-rules/enforce-ianitor-check-type",
17470
17609
  "small-rules/isolated-functions",
17471
17610
  "small-rules/memoized-effect-dependencies",
17611
+ "small-rules/no-adjust-state-on-prop-change",
17472
17612
  "small-rules/no-array-constructor-elements",
17473
17613
  "small-rules/no-array-constructor-index-assignment",
17474
17614
  "small-rules/no-array-size-assignment",
17475
17615
  "small-rules/no-async-constructor",
17476
17616
  "small-rules/no-async-in-system",
17477
17617
  "small-rules/no-cascading-set-state",
17618
+ "small-rules/no-chain-state-updates",
17619
+ "small-rules/no-chained-type-assertions",
17620
+ "small-rules/no-cliffy-action-wrapper",
17478
17621
  "small-rules/no-color3-constructor",
17479
17622
  "small-rules/no-commented-code",
17623
+ "small-rules/no-conditional-empty-object-spread",
17480
17624
  "small-rules/no-constant-condition-with-break",
17481
17625
  "small-rules/no-dead-store",
17626
+ "small-rules/no-derived-state",
17627
+ "small-rules/no-discarded-rejection",
17482
17628
  "small-rules/no-error",
17629
+ "small-rules/no-event-handler",
17483
17630
  "small-rules/no-events-in-events-callback",
17631
+ "small-rules/no-external-store-subscription",
17484
17632
  "small-rules/no-filter-map-chain",
17485
17633
  "small-rules/no-floating-point-equality",
17486
17634
  "small-rules/no-giant-component",
17487
17635
  "small-rules/no-god-components",
17636
+ "small-rules/no-has-before-remove-in-jecs",
17488
17637
  "small-rules/no-ianitor-in-function-body",
17489
17638
  "small-rules/no-ianitor-success-access",
17490
17639
  "small-rules/no-identity-map",
17491
17640
  "small-rules/no-increment-decrement",
17641
+ "small-rules/no-initialize-state",
17492
17642
  "small-rules/no-inline-property-on-memo-component",
17643
+ "small-rules/no-inline-signature-types",
17493
17644
  "small-rules/no-instance-methods-without-this",
17645
+ "small-rules/no-jsx-spread-child",
17646
+ "small-rules/no-known-value-widening",
17494
17647
  "small-rules/no-loop-iterable-mutation",
17648
+ "small-rules/no-module-mocking",
17649
+ "small-rules/no-multiple-cliffy-commands",
17495
17650
  "small-rules/no-native-properties-spread",
17651
+ "small-rules/no-nested-hook-calls",
17496
17652
  "small-rules/no-new-instance-in-use-memo",
17653
+ "small-rules/no-object-parameters",
17654
+ "small-rules/no-pass-data-to-parent",
17655
+ "small-rules/no-pass-live-state-to-parent",
17497
17656
  "small-rules/no-print",
17657
+ "small-rules/no-real-temporary-directory",
17498
17658
  "small-rules/no-recursive",
17659
+ "small-rules/no-reduce-accumulator-copy",
17499
17660
  "small-rules/no-redundant-aspect-ratio-constraint",
17661
+ "small-rules/no-reflect-apply",
17662
+ "small-rules/no-reflect-get",
17500
17663
  "small-rules/no-render-helper-functions",
17664
+ "small-rules/no-reset-all-state-on-prop-change",
17501
17665
  "small-rules/no-restricted-property-assignment",
17666
+ "small-rules/no-runtime-in-type-files",
17667
+ "small-rules/no-runtime-typeof",
17668
+ "small-rules/no-shape-in-symbol-names",
17502
17669
  "small-rules/no-spec-file-extension",
17503
17670
  "small-rules/no-static-react-create-element",
17504
17671
  "small-rules/no-table-create-map",
17505
17672
  "small-rules/no-task-wait",
17673
+ "small-rules/no-test-timeout",
17506
17674
  "small-rules/no-trivial-assertions",
17507
17675
  "small-rules/no-underscore-react-props",
17676
+ "small-rules/no-unknown-parameters",
17677
+ "small-rules/no-unknown-returns",
17678
+ "small-rules/no-unknown-type-aliases",
17679
+ "small-rules/no-unsafe-dictionary-type",
17680
+ "small-rules/no-unsupported-syntax",
17508
17681
  "small-rules/no-unused-imports",
17509
17682
  "small-rules/no-unused-use-memo",
17510
17683
  "small-rules/no-use-memo-simple-expression",
17511
17684
  "small-rules/no-use-of-empty-return-value",
17512
17685
  "small-rules/no-useless-constants",
17513
17686
  "small-rules/no-useless-default",
17687
+ "small-rules/no-useless-empty-string-comparison",
17514
17688
  "small-rules/no-useless-use-effect",
17515
17689
  "small-rules/no-useless-use-memo",
17516
17690
  "small-rules/no-useless-use-spring",
17517
17691
  "small-rules/no-variadic-spread",
17518
17692
  "small-rules/no-warn",
17693
+ "small-rules/no-widen-then-assert",
17519
17694
  "small-rules/only-type-imports",
17520
17695
  "small-rules/prefer-class-properties",
17521
17696
  "small-rules/prefer-constant-dispatch",
@@ -17528,12 +17703,15 @@ var init_oxlint_capabilities = __esmMin((() => {
17528
17703
  "small-rules/prefer-idiv",
17529
17704
  "small-rules/prefer-local-portal-component",
17530
17705
  "small-rules/prefer-math-min-max",
17706
+ "small-rules/prefer-membership-filter-in-jecs",
17531
17707
  "small-rules/prefer-modding-inspect",
17532
17708
  "small-rules/prefer-module-scope-constants",
17709
+ "small-rules/prefer-native-collection-copy",
17710
+ "small-rules/prefer-optional-parameter",
17533
17711
  "small-rules/prefer-padding-components",
17534
17712
  "small-rules/prefer-pascal-case-enums",
17535
17713
  "small-rules/prefer-sequence-overloads",
17536
- "small-rules/prefer-single-world-query",
17714
+ "small-rules/prefer-single-world-query-in-jecs",
17537
17715
  "small-rules/prefer-singular-enums",
17538
17716
  "small-rules/prefer-ternary-conditional-rendering",
17539
17717
  "small-rules/prefer-udim2-shorthand",
@@ -17546,10 +17724,14 @@ var init_oxlint_capabilities = __esmMin((() => {
17546
17724
  "small-rules/require-paired-calls",
17547
17725
  "small-rules/require-react-component-keys",
17548
17726
  "small-rules/require-react-display-names",
17727
+ "small-rules/require-readable-spacing",
17728
+ "small-rules/require-safety-comment-for-type-assertion",
17549
17729
  "small-rules/require-switch-case-braces",
17550
17730
  "small-rules/require-throw-error-capture",
17731
+ "small-rules/require-tsx-for-hooks",
17551
17732
  "small-rules/require-unicode-regex",
17552
17733
  "small-rules/rerender-memo-with-default-value",
17734
+ "small-rules/starts-with-verb",
17553
17735
  "small-rules/strict-component-boundaries",
17554
17736
  "small-rules/use-exhaustive-dependencies",
17555
17737
  "small-rules/use-hook-at-top-level",
@@ -18543,6 +18725,8 @@ var init_oxlint_capabilities = __esmMin((() => {
18543
18725
  typeAwareJsPluginRuleNames = /* @__PURE__ */ new Set([
18544
18726
  "eslint-plugin/no-property-in-node",
18545
18727
  "flawless/naming-convention",
18728
+ "flawless/no-ignored-return",
18729
+ "flawless/no-incompatible-assertion-types",
18546
18730
  "flawless/no-materialized-filter-map",
18547
18731
  "flawless/no-redundant-type-annotation",
18548
18732
  "flawless/no-reflect-set",
@@ -18786,13 +18970,18 @@ var init_oxlint_capabilities = __esmMin((() => {
18786
18970
  "eslint-plugin/test-case-shorthand-strings",
18787
18971
  "eslint-plugin/unique-test-case-names",
18788
18972
  "flawless/arrow-return-style",
18973
+ "flawless/cognitive-complexity",
18789
18974
  "flawless/jsx-shorthand-boolean",
18790
18975
  "flawless/jsx-shorthand-fragment",
18976
+ "flawless/max-comment-length",
18791
18977
  "flawless/max-lines-per-function",
18792
18978
  "flawless/no-conditional-empty-object-spread",
18793
18979
  "flawless/no-conditional-in-test",
18980
+ "flawless/no-em-dash",
18794
18981
  "flawless/no-export-default-arrow",
18795
18982
  "flawless/no-floating-point-equality",
18983
+ "flawless/no-ignored-return",
18984
+ "flawless/no-incompatible-assertion-types",
18796
18985
  "flawless/no-known-value-widening",
18797
18986
  "flawless/no-materialized-filter-map",
18798
18987
  "flawless/no-object-parameters",
@@ -18801,7 +18990,10 @@ var init_oxlint_capabilities = __esmMin((() => {
18801
18990
  "flawless/no-reflect-set",
18802
18991
  "flawless/no-shape-in-symbol-names",
18803
18992
  "flawless/no-shared-mocks",
18993
+ "flawless/no-trivial-functions",
18994
+ "flawless/no-unknown-parameters",
18804
18995
  "flawless/no-unknown-returns",
18996
+ "flawless/no-unnecessary-prop-alias",
18805
18997
  "flawless/no-unnecessary-use-callback",
18806
18998
  "flawless/no-unnecessary-use-memo",
18807
18999
  "flawless/no-unsafe-dictionary-type",
@@ -19171,7 +19363,6 @@ var init_oxlint_capabilities = __esmMin((() => {
19171
19363
  "small-rules/require-async-suffix",
19172
19364
  "small-rules/strict-component-boundaries",
19173
19365
  "sonar/bool-param-default",
19174
- "sonar/cognitive-complexity",
19175
19366
  "sonar/constructor-for-side-effects",
19176
19367
  "sonar/destructuring-assignment-syntax",
19177
19368
  "sonar/elseif-without-else",
@@ -19188,13 +19379,10 @@ var init_oxlint_capabilities = __esmMin((() => {
19188
19379
  "sonar/no-duplicated-branches",
19189
19380
  "sonar/no-element-overwrite",
19190
19381
  "sonar/no-empty-collection",
19191
- "sonar/no-floating-point-equality",
19192
19382
  "sonar/no-gratuitous-expressions",
19193
19383
  "sonar/no-identical-conditions",
19194
19384
  "sonar/no-identical-expressions",
19195
19385
  "sonar/no-identical-functions",
19196
- "sonar/no-ignored-return",
19197
- "sonar/no-incompatible-assertion-types",
19198
19386
  "sonar/no-inverted-boolean-check",
19199
19387
  "sonar/no-mixed-completion-style",
19200
19388
  "sonar/no-nested-conditional",
@@ -19935,16 +20123,24 @@ var init_oxlint_native = __esmMin((() => {
19935
20123
  "react-perf/jsx-no-new-function-as-prop",
19936
20124
  "react-perf/jsx-no-new-object-as-prop",
19937
20125
  "react/button-has-type",
20126
+ "react/capitalized-calls",
19938
20127
  "react/checked-requires-onchange-or-readonly",
19939
20128
  "react/display-name",
20129
+ "react/error-boundaries",
19940
20130
  "react/exhaustive-deps",
20131
+ "react/exhaustive-effect-dependencies",
19941
20132
  "react/forbid-component-props",
19942
20133
  "react/forbid-dom-props",
19943
20134
  "react/forbid-elements",
19944
20135
  "react/forward-ref-uses-ref",
19945
20136
  "react/function-component-definition",
20137
+ "react/globals",
19946
20138
  "react/hook-use-state",
20139
+ "react/hooks",
19947
20140
  "react/iframe-missing-sandbox",
20141
+ "react/immutability",
20142
+ "react/incompatible-library",
20143
+ "react/invariant",
19948
20144
  "react/jsx-boolean-value",
19949
20145
  "react/jsx-curly-brace-presence",
19950
20146
  "react/jsx-filename-extension",
@@ -19963,11 +20159,13 @@ var init_oxlint_native = __esmMin((() => {
19963
20159
  "react/jsx-pascal-case",
19964
20160
  "react/jsx-props-no-spread-multi",
19965
20161
  "react/jsx-props-no-spreading",
20162
+ "react/memo-dependencies",
19966
20163
  "react/no-array-index-key",
19967
20164
  "react/no-children-prop",
19968
20165
  "react/no-clone-element",
19969
20166
  "react/no-danger",
19970
20167
  "react/no-danger-with-children",
20168
+ "react/no-deriving-state-in-effects",
19971
20169
  "react/no-did-mount-set-state",
19972
20170
  "react/no-did-update-set-state",
19973
20171
  "react/no-direct-mutation-state",
@@ -19990,14 +20188,25 @@ var init_oxlint_native = __esmMin((() => {
19990
20188
  "react/only-export-components",
19991
20189
  "react/prefer-es6-class",
19992
20190
  "react/prefer-function-component",
19993
- "react/react-compiler",
20191
+ "react/preserve-manual-memoization",
20192
+ "react/purity",
19994
20193
  "react/react-in-jsx-scope",
20194
+ "react/refs",
19995
20195
  "react/require-render-return",
20196
+ "react/rule-suppression",
19996
20197
  "react/rules-of-hooks",
19997
20198
  "react/self-closing-comp",
20199
+ "react/set-state-in-effect",
20200
+ "react/set-state-in-render",
19998
20201
  "react/state-in-constructor",
20202
+ "react/static-components",
19999
20203
  "react/style-prop-object",
20204
+ "react/syntax",
20205
+ "react/todo",
20206
+ "react/unsupported-syntax",
20207
+ "react/use-memo",
20000
20208
  "react/void-dom-elements-no-children",
20209
+ "react/void-use-memo",
20001
20210
  "require-await",
20002
20211
  "require-unicode-regexp",
20003
20212
  "require-yield",
@@ -20039,6 +20248,7 @@ var init_oxlint_native = __esmMin((() => {
20039
20248
  "typescript/no-extraneous-class",
20040
20249
  "typescript/no-floating-promises",
20041
20250
  "typescript/no-for-in-array",
20251
+ "typescript/no-generated-empty-object-type",
20042
20252
  "typescript/no-implied-eval",
20043
20253
  "typescript/no-import-type-side-effects",
20044
20254
  "typescript/no-inferrable-types",
@@ -20070,6 +20280,7 @@ var init_oxlint_native = __esmMin((() => {
20070
20280
  "typescript/no-unsafe-assignment",
20071
20281
  "typescript/no-unsafe-call",
20072
20282
  "typescript/no-unsafe-declaration-merging",
20283
+ "typescript/no-unsafe-enum-assignment",
20073
20284
  "typescript/no-unsafe-enum-comparison",
20074
20285
  "typescript/no-unsafe-function-type",
20075
20286
  "typescript/no-unsafe-member-access",
@@ -20390,6 +20601,7 @@ var init_oxlint_native = __esmMin((() => {
20390
20601
  "typescript/no-duplicate-type-constituents",
20391
20602
  "typescript/no-floating-promises",
20392
20603
  "typescript/no-for-in-array",
20604
+ "typescript/no-generated-empty-object-type",
20393
20605
  "typescript/no-implied-eval",
20394
20606
  "typescript/no-meaningless-void-operator",
20395
20607
  "typescript/no-misused-promises",
@@ -20407,6 +20619,7 @@ var init_oxlint_native = __esmMin((() => {
20407
20619
  "typescript/no-unsafe-argument",
20408
20620
  "typescript/no-unsafe-assignment",
20409
20621
  "typescript/no-unsafe-call",
20622
+ "typescript/no-unsafe-enum-assignment",
20410
20623
  "typescript/no-unsafe-enum-comparison",
20411
20624
  "typescript/no-unsafe-member-access",
20412
20625
  "typescript/no-unsafe-return",
@@ -20593,7 +20806,6 @@ var init_routing = __esmMin((() => {
20593
20806
  "sentinel/explicit-size-check"
20594
20807
  ]);
20595
20808
  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
20809
  "style/jsx-function-call-newline": "Formatting-rule ownership remains with ESLint and oxfmt.",
20598
20810
  "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
20811
  "unicorn/no-missing-local-resource": "The preset only enables this rule for Markdown virtual files, which Oxlint cannot lint.",
@@ -20601,9 +20813,9 @@ var init_routing = __esmMin((() => {
20601
20813
  "vitest/prefer-each": "Oxlint ignores where test functions are imported from (https://github.com/oxc-project/oxc/issues/27471)."
20602
20814
  };
20603
20815
  JS_PLUGIN_PREFERRED_RULES = /* @__PURE__ */ new Set([
20604
- "id-length",
20605
20816
  "no-loop-func",
20606
- "unicorn/no-lonely-if"
20817
+ "unicorn/no-lonely-if",
20818
+ "unicorn/no-useless-undefined"
20607
20819
  ]);
20608
20820
  }));
20609
20821
  //#endregion
@@ -21061,6 +21273,7 @@ async function isentinel(options, ...userConfigs) {
21061
21273
  if (enableYaml !== false && !typeAwareOnly) {
21062
21274
  configs.push(yaml({
21063
21275
  ...getOverrides(options, "yaml"),
21276
+ prettierOptions: widthSettings,
21064
21277
  stylistic: stylisticOptions
21065
21278
  }));
21066
21279
  if (stylisticOptions !== false) configs.push(sortGithubAction());
@@ -21081,6 +21294,7 @@ async function isentinel(options, ...userConfigs) {
21081
21294
  }
21082
21295
  if (enableMarkdown !== false && !typeAwareOnly) configs.push(markdown({
21083
21296
  ...getOverrides(options, "markdown"),
21297
+ antiSlop,
21084
21298
  componentExts: componentExtensions,
21085
21299
  type: projectType
21086
21300
  }));