@oxlint/migrate 1.70.0 → 1.72.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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as nurseryRules, i as buildUnsupportedRuleExplanations, n as preFixForJsPlugins, o as rules_exports, r as isOffValue, s as normalizeRuleToCanonical, t as main } from "../src-Cuy3Jdkv.mjs";
2
+ import { a as nurseryRules, i as buildUnsupportedRuleExplanations, n as preFixForJsPlugins, o as rules_exports, r as isOffValue, s as normalizeRuleToCanonical, t as main } from "../src-CLLHiI8g.mjs";
3
3
  import { program } from "commander";
4
4
  import { existsSync, readFileSync, renameSync, writeFileSync } from "node:fs";
5
5
  import path from "node:path";
@@ -30,7 +30,7 @@ const loadESLintConfig = async (filePath) => {
30
30
  };
31
31
  //#endregion
32
32
  //#region package.json
33
- var version = "1.70.0";
33
+ var version = "1.72.0";
34
34
  //#endregion
35
35
  //#region src/walker/comments/replaceRuleDirectiveComment.ts
36
36
  const allRulesSet = new Set(Object.values(rules_exports).flat());
@@ -265,7 +265,7 @@ const getAllProjectFiles = () => {
265
265
  //#region src/reporter.ts
266
266
  var DefaultReporter = class {
267
267
  warnings = /* @__PURE__ */ new Set();
268
- skippedRules = new Map([
268
+ skippedRules = /* @__PURE__ */ new Map([
269
269
  ["nursery", /* @__PURE__ */ new Set()],
270
270
  ["type-aware", /* @__PURE__ */ new Set()],
271
271
  ["not-implemented", /* @__PURE__ */ new Set()],
@@ -414,6 +414,25 @@ const getFileContent = (absoluteFilePath) => {
414
414
  }
415
415
  };
416
416
  /**
417
+ * Strips JSON comments (single-line `//` and multi-line) and trailing commas
418
+ * so that `tsconfig.json` (which is actually JSONC) can be parsed with `JSON.parse`.
419
+ */
420
+ const stripJsoncFeatures = (text) => text.replace(/\/\/.*$/gm, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/,\s*([}\]])/g, "$1");
421
+ /**
422
+ * When `--type-aware` is used, check whether the project's `tsconfig.json`
423
+ * contains a `baseUrl` value in `compilerOptions`. If it does, emit a warning
424
+ * because `tsgo` does not support `baseUrl`, which may cause issues with
425
+ * type-aware linting.
426
+ */
427
+ const warnIfTsconfigHasBaseUrl = (reporter) => {
428
+ const content = getFileContent(path.join(cwd, "tsconfig.json"));
429
+ if (content === void 0) return;
430
+ try {
431
+ const tsconfig = JSON.parse(stripJsoncFeatures(content));
432
+ if (tsconfig?.compilerOptions?.baseUrl !== void 0) reporter.addWarning(`tsconfig.json has \`baseUrl\` set to ${JSON.stringify(tsconfig.compilerOptions.baseUrl)}. \`baseUrl\` is not supported by tsgo, which may cause issues with type-aware linting. Consider removing \`baseUrl\` or using path aliases instead.`);
433
+ } catch {}
434
+ };
435
+ /**
417
436
  * Count enabled rules (excluding "off" rules) from both rules and overrides
418
437
  */
419
438
  const countEnabledRules = (config) => {
@@ -440,6 +459,7 @@ program.name("oxlint-migrate").version(version).argument("[eslint-config]", "The
440
459
  typeAware: !!cliOptions.typeAware,
441
460
  jsPlugins
442
461
  };
462
+ if (options.typeAware) warnIfTsconfigHasBaseUrl(reporter);
443
463
  if (cliOptions.replaceEslintComments) {
444
464
  await walkAndReplaceProjectFiles(await getAllProjectFiles(), (filePath) => getFileContent(filePath), (filePath, content) => writeFile(filePath, content, "utf-8"), options);
445
465
  return;
@@ -4,10 +4,10 @@
4
4
  /**
5
5
  * What to enforce for `/// <reference types="..." />` references.
6
6
  */
7
- //#region node_modules/.pnpm/oxlint@1.70.0_oxlint-tsgolint@0.23.0/node_modules/oxlint/dist/index.d.ts
7
+ //#region node_modules/.pnpm/oxlint@1.72.0_oxlint-tsgolint@0.23.0/node_modules/oxlint/dist/index.d.ts
8
8
  //#region src-js/package/config.generated.d.ts
9
9
  type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
10
- type GlobalValue = "readonly" | "writable" | "off";
10
+ type GlobalValue = ("readonly" | "writable" | "off") | undefined;
11
11
  type ExternalPluginEntry = string | {
12
12
  /**
13
13
  * Custom name/alias for the plugin.
@@ -52,6 +52,7 @@ type OptionsJsonEnum = CommentConfigJson | {
52
52
  line?: CommentConfigJson;
53
53
  };
54
54
  type IgnoreClassWithImplements = "all" | "public-fields";
55
+ type ComplexityConfigEnum = number | ComplexityConfig;
55
56
  type Variant = "classic" | "modified";
56
57
  /**
57
58
  * The enforcement type for the curly rule.
@@ -64,22 +65,44 @@ type CurlyType = "all" | "multi" | "multi-line" | "multi-or-nest";
64
65
  type CurlyConsistent = "consistent";
65
66
  type CompareType = "always" | "smart";
66
67
  type NullType = "always" | "never" | "ignore";
67
- type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
68
+ type FuncNameMatchingMode = "always" | "never";
68
69
  type FuncNamesConfigType = "always" | "as-needed" | "never";
69
70
  type Style = "expression" | "declaration";
70
71
  type NamedExports = "ignore" | "expression" | "declaration";
71
72
  type PairOrder = "anyOrder" | "getBeforeSet" | "setBeforeGet";
72
73
  type Mode = "prefer-top-level" | "prefer-inline";
74
+ /**
75
+ * Extension rule configuration; Copy to avoid extra indirection.
76
+ */
77
+ type ExtensionRule = "always" | "never" | "ignorePackages";
78
+ type ImportExtensionsObject = ImportExtensionsConfig | {
79
+ [k: string]: ExtensionRule;
80
+ };
81
+ /**
82
+ * Action to take for path group overrides.
83
+ *
84
+ * Determines how import extensions are validated for matching bespoke import specifiers.
85
+ */
86
+ type PathGroupAction = "enforce" | "ignore";
73
87
  type AbsoluteFirst = "absolute-first" | "disable-absolute-first";
74
88
  type MaxDependenciesConfigJson = number | MaxDependenciesConfig;
75
89
  type Target = "single" | "any";
76
90
  type TestCaseName = "it" | "test";
77
91
  type JestFnType = "hook" | "describe" | "test" | "expect" | "jest" | "unknown";
92
+ type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
78
93
  type SnapshotHintMode = "always" | "multi";
79
94
  type AltTextElements = "img" | "object" | "area" | 'input[type="image"]';
95
+ type AnchorIsValidAspect = "noHref" | "invalidHref" | "preferButton";
80
96
  type Assert = "htmlFor" | "nesting" | "both" | "either";
81
97
  type DistractingElement = "marquee" | "blink";
98
+ type MaxClassesPerFileConfigEnum = number | MaxClassesPerFileConfig;
99
+ type MaxDepthConfigEnum = number | MaxDepth;
100
+ type MaxLinesConfigEnum = number | MaxLinesConfig;
101
+ type MaxLinesPerFunctionConfigEnum = number | MaxLinesPerFunctionConfig;
102
+ type MaxNestedCallbacksConfigEnum = number | MaxNestedCallbacks;
103
+ type MaxParamsConfigEnum = number | MaxParamsConfig;
82
104
  type CountThis = "always" | "never" | "except-void";
105
+ type MaxStatementsConfigEnum = number | MaxStatementsConfig;
83
106
  type NoCondAssignConfig = "except-parens" | "always";
84
107
  type CheckLoopsConfig = boolean | CheckLoops;
85
108
  type CheckLoops = "all" | "allExceptWhileTrue" | "none";
@@ -93,6 +116,9 @@ type AllowKind = "functions" | "arrowFunctions" | "generatorFunctions" | "method
93
116
  type NoInnerDeclarationsConfig = "functions" | "both";
94
117
  type BlockScopedFunctions = "allow" | "disallow";
95
118
  type NoMagicNumbersNumber = number | string;
119
+ type NoRestrictedImportsConfigEnum = string | RestrictedPath | NoRestrictedImportsConfig;
120
+ type PossiblePaths = string | RestrictedPath;
121
+ type PossiblePatterns = string | RestrictedPattern;
96
122
  type NoReturnAssignMode = "always" | "except-parens";
97
123
  /**
98
124
  * Controls how hoisting is handled when checking for shadowing.
@@ -107,6 +133,10 @@ type NoUnusedVarsFixMode = "off" | "suggestion" | "fix" | "safe-fix";
107
133
  type NoUseBeforeDefineConfigJson = Nofunc | NoUseBeforeDefineConfig;
108
134
  type Nofunc = "nofunc";
109
135
  type Location = "start" | "anywhere";
136
+ /**
137
+ * The rule takes a single option - an array of possible callback names - which may include object methods. The default callback names are `callback`, `cb`, `next`.
138
+ */
139
+ type CallbackReturn = string[];
110
140
  /**
111
141
  * The rule takes a single string option: the name of the error parameter.
112
142
  *
@@ -115,12 +145,15 @@ type Location = "start" | "anywhere";
115
145
  * - a regexp pattern (e.g. `"^(err|error)$"`)
116
146
  *
117
147
  * If the configured name of the error variable begins with a `^` it is considered to be a regexp pattern.
148
+ * Invalid regexp patterns are rejected during configuration parsing.
118
149
  *
119
150
  * Default: `"err"`.
120
151
  */
121
152
  type HandleCallbackErrConfig = string;
153
+ type NoMixedRequiresConfig = boolean | NoMixedRequiresOptions;
122
154
  type ShorthandType = "always" | "methods" | "properties" | "consistent" | "consistent-as-needed" | "never";
123
155
  type Destructuring = "any" | "all";
156
+ type PreferDestructuringOption = PreferDestructuringTargetOption | PreferDestructuringAssignmentConfig;
124
157
  type TerminationMethod = string | string[];
125
158
  type RadixType = "always" | "as-needed";
126
159
  type NativeAllowList = AllKeyword | string[];
@@ -225,7 +258,7 @@ type ChecksVoidReturn = boolean | ChecksVoidReturnOptions;
225
258
  * - A string - ban with custom message
226
259
  * - An object with `message` and optional `fixWith` and `suggest`
227
260
  */
228
- type BanConfigValue = True | string | {
261
+ type BanConfigValue = (True | string | {
229
262
  /**
230
263
  * Replacement type for automatic fixing. Applied directly with `--fix`.
231
264
  */
@@ -238,7 +271,7 @@ type BanConfigValue = True | string | {
238
271
  * Suggested replacement types for manual review. Shown as editor suggestions.
239
272
  */
240
273
  suggest?: string[];
241
- };
274
+ }) | undefined;
242
275
  type True = true;
243
276
  /**
244
277
  * Represents the different ways `allowConstantLoopConditions` can be specified in JSON.
@@ -263,7 +296,7 @@ type PathOption = "always" | "never";
263
296
  type TypesOption = "always" | "never" | "prefer-import";
264
297
  type BomOptionType = "always" | "never";
265
298
  type NonZero = "greater-than" | "not-equal";
266
- type ModuleStylesOverride = false | {
299
+ type ModuleStylesOverride = (false | {
267
300
  /**
268
301
  * Whether default imports or whole-module `require()` assignments are allowed for this module.
269
302
  *
@@ -300,7 +333,7 @@ type ModuleStylesOverride = false | {
300
333
  * ```
301
334
  */
302
335
  unassigned?: boolean;
303
- };
336
+ }) | undefined;
304
337
  type NoInstanceofBuiltinsStrategy = "strict" | "loose";
305
338
  type PreferTernaryOption = "always" | "only-single-line";
306
339
  type RelativeUrlStyleConfig = "never" | "always";
@@ -316,23 +349,23 @@ type CaseType2 = "camelCase" | "snake_case";
316
349
  type AllowYoda = "never" | "always";
317
350
  type OxlintOverrides = OxlintOverride[];
318
351
  type JestVersionSchema = number | string;
319
- type TagNamePreference = string | {
352
+ type TagNamePreference = (string | {
320
353
  message: string;
321
354
  replacement: string;
322
- [k: string]: unknown;
355
+ [k: string]: unknown | undefined;
323
356
  } | {
324
357
  message: string;
325
- [k: string]: unknown;
326
- } | boolean;
358
+ [k: string]: unknown | undefined;
359
+ } | boolean) | undefined;
327
360
  type OneOrManyFor_String = string | string[];
328
361
  type CustomComponent = string | {
329
362
  attribute: string;
330
363
  name: string;
331
- [k: string]: unknown;
364
+ [k: string]: unknown | undefined;
332
365
  } | {
333
366
  attributes: string[];
334
367
  name: string;
335
- [k: string]: unknown;
368
+ [k: string]: unknown | undefined;
336
369
  };
337
370
  /**
338
371
  * Oxlint Configuration File
@@ -642,7 +675,7 @@ interface RuleCategories {
642
675
  * - worker - Web Workers globals.
643
676
  */
644
677
  interface OxlintEnv {
645
- [k: string]: boolean;
678
+ [k: string]: boolean | undefined;
646
679
  }
647
680
  /**
648
681
  * Add or remove global variables.
@@ -670,7 +703,7 @@ interface OxlintEnv {
670
703
  * `"writeable"` or `true` to represent `"writable"`.
671
704
  */
672
705
  interface OxlintGlobals {
673
- [k: string]: GlobalValue;
706
+ [k: string]: GlobalValue | undefined;
674
707
  }
675
708
  /**
676
709
  * Options for the linter.
@@ -773,7 +806,7 @@ interface DummyRuleMap {
773
806
  "block-scoped-var"?: RuleNoConfig;
774
807
  "capitalized-comments"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, OptionsJsonEnum];
775
808
  "class-methods-use-this"?: RuleNoConfig | [AllowWarnDeny, ClassMethodsUseThisConfig];
776
- complexity?: RuleNoConfig | [AllowWarnDeny, number | ComplexityConfig];
809
+ complexity?: RuleNoConfig | [AllowWarnDeny, ComplexityConfigEnum];
777
810
  "constructor-super"?: RuleNoConfig;
778
811
  curly?: RuleNoConfig | [AllowWarnDeny, CurlyType] | [AllowWarnDeny, CurlyType, CurlyConsistent];
779
812
  "default-case"?: RuleNoConfig | [AllowWarnDeny, DefaultCaseConfig];
@@ -781,7 +814,7 @@ interface DummyRuleMap {
781
814
  "default-param-last"?: RuleNoConfig;
782
815
  eqeqeq?: RuleNoConfig | [AllowWarnDeny, CompareType] | [AllowWarnDeny, CompareType, EqeqeqOptions];
783
816
  "for-direction"?: RuleNoConfig;
784
- "func-name-matching"?: DummyRule;
817
+ "func-name-matching"?: RuleNoConfig | ([AllowWarnDeny, FuncNameMatchingMode] | [AllowWarnDeny, FuncNameMatchingMode, FuncNameMatchingConfig] | [AllowWarnDeny, FuncNameMatchingMode] | [AllowWarnDeny, FuncNameMatchingConfig]);
785
818
  "func-names"?: RuleNoConfig | [AllowWarnDeny, FuncNamesConfigType] | [AllowWarnDeny, FuncNamesConfigType, FuncNamesGeneratorsConfig];
786
819
  "func-style"?: RuleNoConfig | [AllowWarnDeny, Style] | [AllowWarnDeny, Style, FuncStyleConfig];
787
820
  "getter-return"?: RuleNoConfig | [AllowWarnDeny, GetterReturn];
@@ -793,7 +826,7 @@ interface DummyRuleMap {
793
826
  "import/default"?: RuleNoConfig;
794
827
  "import/export"?: RuleNoConfig;
795
828
  "import/exports-last"?: RuleNoConfig;
796
- "import/extensions"?: DummyRule;
829
+ "import/extensions"?: RuleNoConfig | ([AllowWarnDeny, ExtensionRule] | [AllowWarnDeny, ExtensionRule, ImportExtensionsObject] | [AllowWarnDeny, ExtensionRule] | [AllowWarnDeny, ImportExtensionsObject]);
797
830
  "import/first"?: RuleNoConfig | [AllowWarnDeny, AbsoluteFirst];
798
831
  "import/group-exports"?: RuleNoConfig;
799
832
  "import/max-dependencies"?: RuleNoConfig | [AllowWarnDeny, MaxDependenciesConfigJson];
@@ -890,9 +923,9 @@ interface DummyRuleMap {
890
923
  "jsdoc/implements-on-classes"?: RuleNoConfig;
891
924
  "jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
892
925
  "jsdoc/require-param"?: DummyRule;
893
- "jsdoc/require-param-description"?: RuleNoConfig;
926
+ "jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
894
927
  "jsdoc/require-param-name"?: RuleNoConfig;
895
- "jsdoc/require-param-type"?: RuleNoConfig;
928
+ "jsdoc/require-param-type"?: RuleNoConfig | [AllowWarnDeny, RequireParamTypeConfig];
896
929
  "jsdoc/require-property"?: RuleNoConfig;
897
930
  "jsdoc/require-property-description"?: RuleNoConfig;
898
931
  "jsdoc/require-property-name"?: RuleNoConfig;
@@ -908,7 +941,7 @@ interface DummyRuleMap {
908
941
  "jsx-a11y/alt-text"?: RuleNoConfig | [AllowWarnDeny, AltTextConfigSchema];
909
942
  "jsx-a11y/anchor-ambiguous-text"?: RuleNoConfig | [AllowWarnDeny, AnchorAmbiguousTextConfig];
910
943
  "jsx-a11y/anchor-has-content"?: RuleNoConfig;
911
- "jsx-a11y/anchor-is-valid"?: DummyRule;
944
+ "jsx-a11y/anchor-is-valid"?: RuleNoConfig | [AllowWarnDeny, AnchorIsValidConfig];
912
945
  "jsx-a11y/aria-activedescendant-has-tabindex"?: RuleNoConfig;
913
946
  "jsx-a11y/aria-props"?: RuleNoConfig;
914
947
  "jsx-a11y/aria-proptypes"?: RuleNoConfig;
@@ -931,7 +964,7 @@ interface DummyRuleMap {
931
964
  "jsx-a11y/no-autofocus"?: RuleNoConfig | [AllowWarnDeny, NoAutofocus];
932
965
  "jsx-a11y/no-distracting-elements"?: RuleNoConfig | [AllowWarnDeny, NoDistractingElementsConfig];
933
966
  "jsx-a11y/no-interactive-element-to-noninteractive-role"?: RuleNoConfig | [AllowWarnDeny, NoInteractiveElementToNoninteractiveRoleConfig];
934
- "jsx-a11y/no-noninteractive-element-interactions"?: DummyRule;
967
+ "jsx-a11y/no-noninteractive-element-interactions"?: RuleNoConfig | [AllowWarnDeny, NoNoninteractiveElementInteractionsConfig];
935
968
  "jsx-a11y/no-noninteractive-element-to-interactive-role"?: RuleNoConfig | [AllowWarnDeny, NoNoninteractiveElementToInteractiveRoleConfig];
936
969
  "jsx-a11y/no-noninteractive-tabindex"?: RuleNoConfig | [AllowWarnDeny, NoNoninteractiveTabindexConfig];
937
970
  "jsx-a11y/no-redundant-roles"?: RuleNoConfig | [AllowWarnDeny, NoRedundantRolesConfig];
@@ -942,13 +975,13 @@ interface DummyRuleMap {
942
975
  "jsx-a11y/scope"?: RuleNoConfig;
943
976
  "jsx-a11y/tabindex-no-positive"?: RuleNoConfig;
944
977
  "logical-assignment-operators"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, LogicalAssignmentOperatorsConfig];
945
- "max-classes-per-file"?: RuleNoConfig | [AllowWarnDeny, number | MaxClassesPerFileConfig];
946
- "max-depth"?: RuleNoConfig | [AllowWarnDeny, number | MaxDepth];
947
- "max-lines"?: RuleNoConfig | [AllowWarnDeny, number | MaxLinesConfig];
948
- "max-lines-per-function"?: RuleNoConfig | [AllowWarnDeny, number | MaxLinesPerFunctionConfig];
949
- "max-nested-callbacks"?: RuleNoConfig | [AllowWarnDeny, number | MaxNestedCallbacks];
950
- "max-params"?: RuleNoConfig | [AllowWarnDeny, number | MaxParamsConfig];
951
- "max-statements"?: RuleNoConfig | [AllowWarnDeny, number | MaxStatementsConfig];
978
+ "max-classes-per-file"?: RuleNoConfig | [AllowWarnDeny, MaxClassesPerFileConfigEnum];
979
+ "max-depth"?: RuleNoConfig | [AllowWarnDeny, MaxDepthConfigEnum];
980
+ "max-lines"?: RuleNoConfig | [AllowWarnDeny, MaxLinesConfigEnum];
981
+ "max-lines-per-function"?: RuleNoConfig | [AllowWarnDeny, MaxLinesPerFunctionConfigEnum];
982
+ "max-nested-callbacks"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCallbacksConfigEnum];
983
+ "max-params"?: RuleNoConfig | [AllowWarnDeny, MaxParamsConfigEnum];
984
+ "max-statements"?: RuleNoConfig | [AllowWarnDeny, MaxStatementsConfigEnum];
952
985
  "new-cap"?: RuleNoConfig | [AllowWarnDeny, NewCapConfig];
953
986
  "nextjs/google-font-display"?: RuleNoConfig;
954
987
  "nextjs/google-font-preconnect"?: RuleNoConfig;
@@ -1049,8 +1082,8 @@ interface DummyRuleMap {
1049
1082
  "no-regex-spaces"?: RuleNoConfig;
1050
1083
  "no-restricted-exports"?: RuleNoConfig | [AllowWarnDeny, NoRestrictedExportsConfig];
1051
1084
  "no-restricted-globals"?: DummyRule;
1052
- "no-restricted-imports"?: DummyRule;
1053
- "no-restricted-properties"?: DummyRule;
1085
+ "no-restricted-imports"?: RuleNoConfig | [AllowWarnDeny, NoRestrictedImportsConfigEnum, ...NoRestrictedImportsConfigEnum[]];
1086
+ "no-restricted-properties"?: RuleNoConfig | [AllowWarnDeny, PropertyDetails, ...PropertyDetails[]];
1054
1087
  "no-return-assign"?: RuleNoConfig | [AllowWarnDeny, NoReturnAssignMode];
1055
1088
  "no-script-url"?: RuleNoConfig;
1056
1089
  "no-self-assign"?: RuleNoConfig | [AllowWarnDeny, NoSelfAssign];
@@ -1094,13 +1127,15 @@ interface DummyRuleMap {
1094
1127
  "no-void"?: RuleNoConfig | [AllowWarnDeny, NoVoid];
1095
1128
  "no-warning-comments"?: RuleNoConfig | [AllowWarnDeny, NoWarningCommentsConfigJson];
1096
1129
  "no-with"?: RuleNoConfig;
1097
- "node/callback-return"?: DummyRule;
1130
+ "node/callback-return"?: RuleNoConfig | [AllowWarnDeny, CallbackReturn];
1098
1131
  "node/global-require"?: RuleNoConfig;
1099
1132
  "node/handle-callback-err"?: RuleNoConfig | [AllowWarnDeny, HandleCallbackErrConfig];
1100
1133
  "node/no-exports-assign"?: RuleNoConfig;
1134
+ "node/no-mixed-requires"?: RuleNoConfig | [AllowWarnDeny, NoMixedRequiresConfig];
1101
1135
  "node/no-new-require"?: RuleNoConfig;
1102
1136
  "node/no-path-concat"?: RuleNoConfig;
1103
1137
  "node/no-process-env"?: RuleNoConfig | [AllowWarnDeny, NoProcessEnvConfig];
1138
+ "node/no-sync"?: RuleNoConfig | [AllowWarnDeny, NoSyncConfig];
1104
1139
  "object-shorthand"?: RuleNoConfig | [AllowWarnDeny, ShorthandType] | [AllowWarnDeny, ShorthandType, ObjectShorthandOptions];
1105
1140
  "operator-assignment"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever];
1106
1141
  "oxc/approx-constant"?: RuleNoConfig;
@@ -1131,7 +1166,7 @@ interface DummyRuleMap {
1131
1166
  "oxc/uninvoked-array-callback"?: RuleNoConfig;
1132
1167
  "prefer-arrow-callback"?: RuleNoConfig | [AllowWarnDeny, PreferArrowCallbackConfig];
1133
1168
  "prefer-const"?: RuleNoConfig | [AllowWarnDeny, PreferConstConfig];
1134
- "prefer-destructuring"?: DummyRule;
1169
+ "prefer-destructuring"?: RuleNoConfig | [AllowWarnDeny, PreferDestructuringOption] | [AllowWarnDeny, PreferDestructuringOption, PreferDestructuringRenamedPropertiesConfig];
1135
1170
  "prefer-exponentiation-operator"?: RuleNoConfig;
1136
1171
  "prefer-named-capture-group"?: RuleNoConfig;
1137
1172
  "prefer-numeric-literals"?: RuleNoConfig;
@@ -1185,7 +1220,7 @@ interface DummyRuleMap {
1185
1220
  "react/jsx-no-constructed-context-values"?: RuleNoConfig;
1186
1221
  "react/jsx-no-duplicate-props"?: RuleNoConfig;
1187
1222
  "react/jsx-no-literals"?: RuleNoConfig | [AllowWarnDeny, JsxNoLiteralsConfig];
1188
- "react/jsx-no-script-url"?: DummyRule;
1223
+ "react/jsx-no-script-url"?: RuleNoConfig | ([AllowWarnDeny, JsxNoScriptUrlComponent[]] | [AllowWarnDeny, JsxNoScriptUrlComponent[], JsxNoScriptUrlOptions] | [AllowWarnDeny, JsxNoScriptUrlOptions]);
1189
1224
  "react/jsx-no-target-blank"?: RuleNoConfig | [AllowWarnDeny, JsxNoTargetBlank];
1190
1225
  "react/jsx-no-undef"?: RuleNoConfig;
1191
1226
  "react/jsx-no-useless-fragment"?: RuleNoConfig | [AllowWarnDeny, JsxNoUselessFragment];
@@ -1359,6 +1394,7 @@ interface DummyRuleMap {
1359
1394
  "unicorn/explicit-length-check"?: RuleNoConfig | [AllowWarnDeny, ExplicitLengthCheck];
1360
1395
  "unicorn/filename-case"?: DummyRule;
1361
1396
  "unicorn/import-style"?: RuleNoConfig | [AllowWarnDeny, ImportStyleConfig];
1397
+ "unicorn/max-nested-calls"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCalls];
1362
1398
  "unicorn/new-for-builtins"?: RuleNoConfig;
1363
1399
  "unicorn/no-abusive-eslint-disable"?: RuleNoConfig;
1364
1400
  "unicorn/no-accessor-recursion"?: RuleNoConfig;
@@ -1414,7 +1450,7 @@ interface DummyRuleMap {
1414
1450
  "unicorn/no-useless-undefined"?: RuleNoConfig | [AllowWarnDeny, NoUselessUndefined];
1415
1451
  "unicorn/no-zero-fractions"?: RuleNoConfig;
1416
1452
  "unicorn/number-literal-case"?: RuleNoConfig;
1417
- "unicorn/numeric-separators-style"?: DummyRule;
1453
+ "unicorn/numeric-separators-style"?: RuleNoConfig | [AllowWarnDeny, NumericSeparatorsStyleConfig];
1418
1454
  "unicorn/prefer-add-event-listener"?: RuleNoConfig;
1419
1455
  "unicorn/prefer-array-find"?: RuleNoConfig;
1420
1456
  "unicorn/prefer-array-flat"?: RuleNoConfig;
@@ -1448,6 +1484,7 @@ interface DummyRuleMap {
1448
1484
  "unicorn/prefer-native-coercion-functions"?: RuleNoConfig;
1449
1485
  "unicorn/prefer-negative-index"?: RuleNoConfig;
1450
1486
  "unicorn/prefer-node-protocol"?: RuleNoConfig;
1487
+ "unicorn/prefer-number-coercion"?: RuleNoConfig;
1451
1488
  "unicorn/prefer-number-properties"?: RuleNoConfig | [AllowWarnDeny, PreferNumberPropertiesConfig];
1452
1489
  "unicorn/prefer-object-from-entries"?: RuleNoConfig | [AllowWarnDeny, PreferObjectFromEntriesConfig];
1453
1490
  "unicorn/prefer-optional-catch-binding"?: RuleNoConfig;
@@ -1561,6 +1598,7 @@ interface DummyRuleMap {
1561
1598
  "vue/max-props"?: RuleNoConfig | [AllowWarnDeny, MaxProps];
1562
1599
  "vue/next-tick-style"?: RuleNoConfig | [AllowWarnDeny, NextTickOption];
1563
1600
  "vue/no-arrow-functions-in-watch"?: RuleNoConfig;
1601
+ "vue/no-async-in-computed-properties"?: RuleNoConfig | [AllowWarnDeny, NoAsyncInComputedPropertiesConfig];
1564
1602
  "vue/no-computed-properties-in-data"?: RuleNoConfig;
1565
1603
  "vue/no-deprecated-data-object-declaration"?: RuleNoConfig;
1566
1604
  "vue/no-deprecated-delete-set"?: RuleNoConfig;
@@ -1637,6 +1675,10 @@ interface ArrayCallbackReturn {
1637
1675
  checkForEach?: boolean;
1638
1676
  }
1639
1677
  interface ArrowBodyStyleConfig {
1678
+ /**
1679
+ * Requires braces and an explicit return for object literals. This option only applies when
1680
+ * the first option is `"as-needed"`.
1681
+ */
1640
1682
  requireReturnForObjectLiteral?: boolean;
1641
1683
  }
1642
1684
  interface CommentConfigJson {
@@ -1716,6 +1758,16 @@ interface EqeqeqOptions {
1716
1758
  */
1717
1759
  null?: NullType;
1718
1760
  }
1761
+ interface FuncNameMatchingConfig {
1762
+ /**
1763
+ * If `considerPropertyDescriptor` is set to `true`, the check will take into account the use of `Object.create`, `Object.defineProperty`, `Object.defineProperties`, and `Reflect.defineProperty`.
1764
+ */
1765
+ considerPropertyDescriptor?: boolean;
1766
+ /**
1767
+ * If `includeCommonJSModuleExports` is set to `true`, `module.exports` and `module["exports"]` will be checked by this rule.
1768
+ */
1769
+ includeCommonJSModuleExports?: boolean;
1770
+ }
1719
1771
  interface FuncNamesGeneratorsConfig {
1720
1772
  /**
1721
1773
  * Configuration for generator function expressions. If not specified, uses the
@@ -1848,6 +1900,36 @@ interface IdMatchOptions {
1848
1900
  */
1849
1901
  properties?: boolean;
1850
1902
  }
1903
+ interface ImportExtensionsConfig {
1904
+ /**
1905
+ * Whether to check type imports when enforcing extension rules.
1906
+ */
1907
+ checkTypeImports?: boolean;
1908
+ /**
1909
+ * Whether to ignore package imports when enforcing extension rules.
1910
+ */
1911
+ ignorePackages?: boolean;
1912
+ /**
1913
+ * Path group overrides for bespoke import specifiers.
1914
+ */
1915
+ pathGroupOverrides?: PathGroupOverrideConfig[];
1916
+ /**
1917
+ * Per-extension rules.
1918
+ */
1919
+ pattern?: {
1920
+ [k: string]: ExtensionRule;
1921
+ };
1922
+ }
1923
+ interface PathGroupOverrideConfig {
1924
+ /**
1925
+ * Action to take when pattern matches.
1926
+ */
1927
+ action: PathGroupAction;
1928
+ /**
1929
+ * Glob pattern to match import specifiers.
1930
+ */
1931
+ pattern: string;
1932
+ }
1851
1933
  interface MaxDependenciesConfig {
1852
1934
  /**
1853
1935
  * Whether to ignore type imports when counting dependencies.
@@ -2157,7 +2239,7 @@ interface NoLargeSnapshotsConfig {
2157
2239
  * Snapshot names can be specified as regular expressions.
2158
2240
  */
2159
2241
  allowedSnapshots?: {
2160
- [k: string]: string[];
2242
+ [k: string]: string[] | undefined;
2161
2243
  };
2162
2244
  /**
2163
2245
  * Maximum number of lines allowed for inline snapshots.
@@ -2169,10 +2251,10 @@ interface NoLargeSnapshotsConfig {
2169
2251
  maxSize?: number;
2170
2252
  }
2171
2253
  interface NoRestrictedTestMethodsConfig {
2172
- [k: string]: string | null;
2254
+ [k: string]: (string | null) | undefined;
2173
2255
  }
2174
2256
  interface NoRestrictedMatchersConfig {
2175
- [k: string]: string | null;
2257
+ [k: string]: (string | null) | undefined;
2176
2258
  }
2177
2259
  interface NoStandaloneExpectConfig {
2178
2260
  /**
@@ -2261,6 +2343,28 @@ interface NoDefaultsConfig {
2261
2343
  */
2262
2344
  noOptionalParamNames?: boolean;
2263
2345
  }
2346
+ interface RequireParamDescriptionConfig {
2347
+ /**
2348
+ * The description string to set by default for destructured roots. Defaults to "The root object".
2349
+ */
2350
+ defaultDestructuredRootDescription?: string;
2351
+ /**
2352
+ * Whether to set a default destructured root description.
2353
+ * For example, you may wish to avoid manually having to set the description for a @param corresponding to a destructured root object as it should always be the same type of object.
2354
+ * Uses `defaultDestructuredRootDescription` for the description string. Defaults to `false`.
2355
+ */
2356
+ setDefaultDestructuredRootDescription?: boolean;
2357
+ }
2358
+ interface RequireParamTypeConfig {
2359
+ /**
2360
+ * The type string to set by default for destructured roots. Defaults to "object".
2361
+ */
2362
+ defaultDestructuredRootType?: string;
2363
+ /**
2364
+ * Whether to set a default destructured root type. For example, you may wish to avoid manually having to set the type for a `@param` corresponding to a destructured root object as it is always going to be an object. Uses `defaultDestructuredRootType` for the type string. Defaults to `false`.
2365
+ */
2366
+ setDefaultDestructuredRootType?: boolean;
2367
+ }
2264
2368
  interface RequireReturnsConfig {
2265
2369
  /**
2266
2370
  * Whether to check constructor methods.
@@ -2325,6 +2429,20 @@ interface AnchorAmbiguousTextConfig {
2325
2429
  */
2326
2430
  words?: string[];
2327
2431
  }
2432
+ interface AnchorIsValidConfig {
2433
+ /**
2434
+ * Sub-rule aspects to run.
2435
+ */
2436
+ aspects?: AnchorIsValidAspect[];
2437
+ /**
2438
+ * Custom components to treat as anchor elements.
2439
+ */
2440
+ components?: string[];
2441
+ /**
2442
+ * Custom prop names to treat as link destinations.
2443
+ */
2444
+ specialLink?: string[];
2445
+ }
2328
2446
  interface AriaRoleConfig {
2329
2447
  /**
2330
2448
  * Custom roles that should be allowed in addition to the ARIA spec.
@@ -2451,10 +2569,17 @@ interface NoDistractingElementsConfig {
2451
2569
  elements?: DistractingElement[];
2452
2570
  }
2453
2571
  interface NoInteractiveElementToNoninteractiveRoleConfig {
2454
- [k: string]: string[];
2572
+ [k: string]: string[] | undefined;
2573
+ }
2574
+ interface NoNoninteractiveElementInteractionsConfig {
2575
+ /**
2576
+ * An array of event handler names that should trigger this rule.
2577
+ */
2578
+ handlers?: string[];
2579
+ [k: string]: string[] | undefined;
2455
2580
  }
2456
2581
  interface NoNoninteractiveElementToInteractiveRoleConfig {
2457
- [k: string]: string[];
2582
+ [k: string]: string[] | undefined;
2458
2583
  }
2459
2584
  interface NoNoninteractiveTabindexConfig {
2460
2585
  /**
@@ -2471,7 +2596,7 @@ interface NoNoninteractiveTabindexConfig {
2471
2596
  tags?: string[];
2472
2597
  }
2473
2598
  interface NoRedundantRolesConfig {
2474
- [k: string]: string[];
2599
+ [k: string]: string[] | undefined;
2475
2600
  }
2476
2601
  interface NoStaticElementInteractionsConfig {
2477
2602
  /**
@@ -3184,6 +3309,53 @@ interface RestrictDefaultExports {
3184
3309
  */
3185
3310
  namespaceFrom?: boolean;
3186
3311
  }
3312
+ interface RestrictedPath {
3313
+ allowImportNames?: string[];
3314
+ allowTypeImports?: boolean;
3315
+ importNames?: string[];
3316
+ message?: string;
3317
+ name: string;
3318
+ }
3319
+ interface NoRestrictedImportsConfig {
3320
+ paths?: PossiblePaths[];
3321
+ patterns?: PossiblePatterns[];
3322
+ }
3323
+ interface RestrictedPattern {
3324
+ allowImportNamePattern?: string;
3325
+ allowImportNames?: string[];
3326
+ allowTypeImports?: boolean;
3327
+ caseSensitive?: boolean;
3328
+ group?: string[];
3329
+ importNamePattern?: string;
3330
+ importNames?: string[];
3331
+ message?: string;
3332
+ regex?: string;
3333
+ }
3334
+ interface PropertyDetails {
3335
+ /**
3336
+ * Objects where property access should be allowed. This must be used with `property` and
3337
+ * cannot be used with `object`.
3338
+ */
3339
+ allowObjects?: string[];
3340
+ /**
3341
+ * Properties where property access should be allowed. This must be used with `object` and
3342
+ * cannot be used with `property`.
3343
+ */
3344
+ allowProperties?: string[];
3345
+ /**
3346
+ * A custom message to display.
3347
+ */
3348
+ message?: string;
3349
+ /**
3350
+ * The object on which the property is being accessed.
3351
+ */
3352
+ object?: string;
3353
+ /**
3354
+ * The property being accessed. If `object` is not specified, this applies to the named
3355
+ * property on all objects.
3356
+ */
3357
+ property?: string;
3358
+ }
3187
3359
  interface NoSelfAssign {
3188
3360
  /**
3189
3361
  * The `props` option when set to `false`, disables the checking of properties.
@@ -3677,12 +3849,26 @@ interface NoWarningCommentsConfigJson {
3677
3849
  location?: Location;
3678
3850
  terms?: string[];
3679
3851
  }
3852
+ interface NoMixedRequiresOptions {
3853
+ allowCall?: boolean;
3854
+ grouping?: boolean;
3855
+ }
3680
3856
  interface NoProcessEnvConfig {
3681
3857
  /**
3682
3858
  * Variable names which are allowed to be accessed on `process.env`.
3683
3859
  */
3684
3860
  allowedVariables?: string[];
3685
3861
  }
3862
+ interface NoSyncConfig {
3863
+ /**
3864
+ * Whether synchronous methods should be allowed at the top level of a file.
3865
+ */
3866
+ allowAtRootLevel?: boolean;
3867
+ /**
3868
+ * Function names to ignore.
3869
+ */
3870
+ ignores?: string[];
3871
+ }
3686
3872
  interface ObjectShorthandOptions {
3687
3873
  avoidExplicitReturnArrows?: boolean;
3688
3874
  avoidQuotes?: boolean;
@@ -3777,6 +3963,17 @@ interface PreferConstConfig {
3777
3963
  */
3778
3964
  ignoreReadBeforeAssign?: boolean;
3779
3965
  }
3966
+ interface PreferDestructuringTargetOption {
3967
+ array?: boolean;
3968
+ object?: boolean;
3969
+ }
3970
+ interface PreferDestructuringAssignmentConfig {
3971
+ AssignmentExpression?: PreferDestructuringTargetOption;
3972
+ VariableDeclarator?: PreferDestructuringTargetOption;
3973
+ }
3974
+ interface PreferDestructuringRenamedPropertiesConfig {
3975
+ enforceForRenamedProperties?: boolean;
3976
+ }
3780
3977
  interface PreferPromiseRejectErrors {
3781
3978
  /**
3782
3979
  * Whether to allow calls to `Promise.reject()` with no arguments.
@@ -4264,7 +4461,7 @@ interface JsxNoLiteralsConfig {
4264
4461
  * An object where the keys are the element names and the values are objects with the same options as above. This allows you to specify different options for different elements.
4265
4462
  */
4266
4463
  elementOverrides?: {
4267
- [k: string]: ElementOverrideOptions;
4464
+ [k: string]: ElementOverrideOptions | undefined;
4268
4465
  };
4269
4466
  /**
4270
4467
  * (default: false) - When true the rule ignores literals used in props, wrapped or unwrapped.
@@ -4316,6 +4513,22 @@ interface ElementOverrideOptions {
4316
4513
  */
4317
4514
  restrictedAttributes?: string[];
4318
4515
  }
4516
+ interface JsxNoScriptUrlComponent {
4517
+ /**
4518
+ * Component name.
4519
+ */
4520
+ name: string;
4521
+ /**
4522
+ * List of properties that should be validated.
4523
+ */
4524
+ props: string[];
4525
+ }
4526
+ interface JsxNoScriptUrlOptions {
4527
+ /**
4528
+ * Whether to include components from settings.
4529
+ */
4530
+ includeFromSettings?: boolean;
4531
+ }
4319
4532
  interface JsxNoTargetBlank {
4320
4533
  /**
4321
4534
  * Whether to allow referrers.
@@ -5171,7 +5384,7 @@ interface NoRestrictedTypesConfig {
5171
5384
  * A mapping of type names to ban configurations.
5172
5385
  */
5173
5386
  types?: {
5174
- [k: string]: BanConfigValue;
5387
+ [k: string]: BanConfigValue | undefined;
5175
5388
  };
5176
5389
  }
5177
5390
  interface NoThisAliasConfig {
@@ -5719,9 +5932,15 @@ interface ImportStyleConfig {
5719
5932
  * ```
5720
5933
  */
5721
5934
  styles?: {
5722
- [k: string]: ModuleStylesOverride;
5935
+ [k: string]: ModuleStylesOverride | undefined;
5723
5936
  };
5724
5937
  }
5938
+ interface MaxNestedCalls {
5939
+ /**
5940
+ * The maximum allowed nested call depth.
5941
+ */
5942
+ max?: number;
5943
+ }
5725
5944
  interface NoArrayReduce {
5726
5945
  /**
5727
5946
  * When set to `true`, allows simple operations (like summing numbers) in `reduce` and `reduceRight` calls.
@@ -5806,6 +6025,77 @@ interface NoUselessUndefined {
5806
6025
  */
5807
6026
  checkArrowFunctionBody?: boolean;
5808
6027
  }
6028
+ interface NumericSeparatorsStyleConfig {
6029
+ /**
6030
+ * Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).
6031
+ * Controls how digits are grouped and when separators are applied.
6032
+ */
6033
+ binary?: NumericBaseConfig;
6034
+ /**
6035
+ * Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).
6036
+ * Controls how digits are grouped and when separators are applied.
6037
+ */
6038
+ hexadecimal?: NumericBaseConfig;
6039
+ /**
6040
+ * Configuration for decimal numbers (integers, fraction parts, and exponents).
6041
+ * Controls how digits are grouped and when separators are applied.
6042
+ */
6043
+ number?: NumericNumberConfig;
6044
+ /**
6045
+ * Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).
6046
+ * Controls how digits are grouped and when separators are applied.
6047
+ */
6048
+ octal?: NumericBaseConfig;
6049
+ /**
6050
+ * Only enforce the rule when the numeric literal already contains a separator (`_`).
6051
+ *
6052
+ * When `true`, numbers without separators are left as-is; when `false` (default),
6053
+ * grouping will be enforced for eligible numbers even if they don't include separators yet.
6054
+ */
6055
+ onlyIfContainsSeparator?: boolean;
6056
+ }
6057
+ interface NumericBaseConfig {
6058
+ /**
6059
+ * The number of digits per group when inserting numeric separators.
6060
+ * For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
6061
+ */
6062
+ groupLength?: number;
6063
+ /**
6064
+ * The minimum number of digits required before grouping is applied.
6065
+ * Values with fewer digits than this threshold will not be grouped.
6066
+ */
6067
+ minimumDigits?: number;
6068
+ /**
6069
+ * Only enforce the rule when the numeric literal already contains a separator (`_`).
6070
+ *
6071
+ * When `true`, numbers without separators are left as-is; when `false` (default),
6072
+ * grouping will be enforced for eligible numbers even if they don't include separators yet.
6073
+ */
6074
+ onlyIfContainsSeparator?: boolean;
6075
+ }
6076
+ interface NumericNumberConfig {
6077
+ /**
6078
+ * The size a group of digits in the fractional part (after the decimal point) should be.
6079
+ */
6080
+ fractionGroupLength?: number;
6081
+ /**
6082
+ * The number of digits per group when inserting numeric separators.
6083
+ * For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
6084
+ */
6085
+ groupLength?: number;
6086
+ /**
6087
+ * The minimum number of digits required before grouping is applied.
6088
+ * Values with fewer digits than this threshold will not be grouped.
6089
+ */
6090
+ minimumDigits?: number;
6091
+ /**
6092
+ * Only enforce the rule when the numeric literal already contains a separator (`_`).
6093
+ *
6094
+ * When `true`, numbers without separators are left as-is; when `false` (default),
6095
+ * grouping will be enforced for eligible numbers even if they don't include separators yet.
6096
+ */
6097
+ onlyIfContainsSeparator?: boolean;
6098
+ }
5809
6099
  interface PreferAtConfig {
5810
6100
  /**
5811
6101
  * Check all index access, not just special patterns like `array.length - 1`.
@@ -5954,6 +6244,14 @@ interface MaxProps {
5954
6244
  */
5955
6245
  maxProps?: number;
5956
6246
  }
6247
+ interface NoAsyncInComputedPropertiesConfig {
6248
+ /**
6249
+ * Names of identifiers whose member-call chains (`.then` / `.catch` / `.finally`)
6250
+ * should be ignored. Useful for libraries like Zod where `.catch(default)` is
6251
+ * a builder API, not a Promise method.
6252
+ */
6253
+ ignoredObjectNames?: string[];
6254
+ }
5957
6255
  interface NoDeprecatedModelDefinitionConfig {
5958
6256
  /**
5959
6257
  * Allow `model: { prop: 'modelValue', event: 'update:modelValue' }` (or
@@ -6072,7 +6370,7 @@ interface OxlintPluginSettings {
6072
6370
  next?: NextPluginSettings;
6073
6371
  react?: ReactPluginSettings;
6074
6372
  vitest?: VitestPluginSettings;
6075
- [k: string]: unknown;
6373
+ [k: string]: unknown | undefined;
6076
6374
  }
6077
6375
  /**
6078
6376
  * Configure Jest plugin rules.
@@ -6089,7 +6387,7 @@ interface JestPluginSettings {
6089
6387
  * :::
6090
6388
  */
6091
6389
  version?: JestVersionSchema;
6092
- [k: string]: unknown;
6390
+ [k: string]: unknown | undefined;
6093
6391
  }
6094
6392
  interface JSDocPluginSettings {
6095
6393
  /**
@@ -6121,9 +6419,9 @@ interface JSDocPluginSettings {
6121
6419
  */
6122
6420
  overrideReplacesDocs?: boolean;
6123
6421
  tagNamePreference?: {
6124
- [k: string]: TagNamePreference;
6422
+ [k: string]: TagNamePreference | undefined;
6125
6423
  };
6126
- [k: string]: unknown;
6424
+ [k: string]: unknown | undefined;
6127
6425
  }
6128
6426
  /**
6129
6427
  * Configure JSX A11y plugin rules.
@@ -6155,7 +6453,7 @@ interface JSXA11YPluginSettings {
6155
6453
  * ```
6156
6454
  */
6157
6455
  attributes?: {
6158
- [k: string]: string[];
6456
+ [k: string]: string[] | undefined;
6159
6457
  };
6160
6458
  /**
6161
6459
  * To have your custom components be checked as DOM elements, you can
@@ -6177,7 +6475,7 @@ interface JSXA11YPluginSettings {
6177
6475
  * ```
6178
6476
  */
6179
6477
  components?: {
6180
- [k: string]: string;
6478
+ [k: string]: string | undefined;
6181
6479
  };
6182
6480
  /**
6183
6481
  * An optional setting that define the prop your code uses to create polymorphic components.
@@ -6194,7 +6492,7 @@ interface JSXA11YPluginSettings {
6194
6492
  * as a `Box`.
6195
6493
  */
6196
6494
  polymorphicPropName?: string;
6197
- [k: string]: unknown;
6495
+ [k: string]: unknown | undefined;
6198
6496
  }
6199
6497
  /**
6200
6498
  * Configure Next.js plugin rules.
@@ -6219,7 +6517,7 @@ interface NextPluginSettings {
6219
6517
  * ```
6220
6518
  */
6221
6519
  rootDir?: OneOrManyFor_String;
6222
- [k: string]: unknown;
6520
+ [k: string]: unknown | undefined;
6223
6521
  }
6224
6522
  /**
6225
6523
  * Configure React plugin rules.
@@ -6306,7 +6604,7 @@ interface ReactPluginSettings {
6306
6604
  * ```
6307
6605
  */
6308
6606
  version?: string;
6309
- [k: string]: unknown;
6607
+ [k: string]: unknown | undefined;
6310
6608
  }
6311
6609
  /**
6312
6610
  * Configure Vitest plugin rules.
@@ -6321,7 +6619,7 @@ interface VitestPluginSettings {
6321
6619
  * to accommodate TypeScript type checking scenarios.
6322
6620
  */
6323
6621
  typecheck?: boolean;
6324
- [k: string]: unknown;
6622
+ [k: string]: unknown | undefined;
6325
6623
  } //#endregion
6326
6624
  //#region src-js/package/config.d.ts
6327
6625
  type Oxlintrc = Omit<Oxlintrc$1, "$schema" | "extends">;
@@ -1,2 +1,2 @@
1
- import { t as main } from "../src-Cuy3Jdkv.mjs";
1
+ import { t as main } from "../src-CLLHiI8g.mjs";
2
2
  export { main as default };
@@ -73,7 +73,10 @@ const removeGlobalsWithAreCoveredByEnv = (config) => {
73
73
  };
74
74
  const transformBoolGlobalToString = (config) => {
75
75
  if (config.globals === void 0 || config.globals === null) return;
76
- for (const [entry, value] of Object.entries(config.globals)) config.globals[entry] = transformEslintGlobalAccessToOxlintGlobalValue(value);
76
+ for (const [entry, value] of Object.entries(config.globals)) {
77
+ if (typeof value === "string") continue;
78
+ config.globals[entry] = value ? "writable" : "readonly";
79
+ }
77
80
  };
78
81
  const transformEslintGlobalAccessToOxlintGlobalValue = (global) => {
79
82
  if (global === false || global === "readable" || global === "readonly") return "readonly";
@@ -231,7 +234,7 @@ const typescriptRulesExtendEslintRules = [
231
234
  ];
232
235
  //#endregion
233
236
  //#region src/jsPlugins.ts
234
- const ignorePlugins = new Set([
237
+ const ignorePlugins = /* @__PURE__ */ new Set([
235
238
  ...Object.keys(rulesPrefixesForPlugins),
236
239
  ...Object.values(rulesPrefixesForPlugins),
237
240
  "local"
@@ -516,6 +519,7 @@ const pedanticRules = [
516
519
  "unicorn/prefer-math-min-max",
517
520
  "unicorn/prefer-math-trunc",
518
521
  "unicorn/prefer-native-coercion-functions",
522
+ "unicorn/prefer-number-coercion",
519
523
  "unicorn/prefer-prototype-methods",
520
524
  "unicorn/prefer-query-selector",
521
525
  "unicorn/prefer-regexp-test",
@@ -648,6 +652,8 @@ const styleRules = [
648
652
  "node/callback-return",
649
653
  "node/global-require",
650
654
  "node/no-exports-assign",
655
+ "node/no-mixed-requires",
656
+ "node/no-sync",
651
657
  "promise/avoid-new",
652
658
  "promise/no-nesting",
653
659
  "promise/no-return-wrap",
@@ -701,6 +707,7 @@ const styleRules = [
701
707
  "unicorn/empty-brace-spaces",
702
708
  "unicorn/error-message",
703
709
  "unicorn/filename-case",
710
+ "unicorn/max-nested-calls",
704
711
  "unicorn/no-array-method-this-argument",
705
712
  "unicorn/no-await-expression-member",
706
713
  "unicorn/no-console-spaces",
@@ -1179,6 +1186,7 @@ const correctnessRules = [
1179
1186
  "vitest/valid-title",
1180
1187
  "vitest/warn-todo",
1181
1188
  "vue/no-arrow-functions-in-watch",
1189
+ "vue/no-async-in-computed-properties",
1182
1190
  "vue/no-computed-properties-in-data",
1183
1191
  "vue/no-deprecated-data-object-declaration",
1184
1192
  "vue/no-deprecated-delete-set",
@@ -1509,6 +1517,7 @@ var unsupportedRules = {
1509
1517
  "eslint/yield-star-spacing": "Deprecated stylistic rule, can be used via the stylistic eslint plugin as a JS Plugin if necessary.",
1510
1518
  "react/jsx-uses-vars": "Handled by `eslint/no-unused-vars`, which already evaluates whether vars are used in JSX.",
1511
1519
  "unicorn/no-named-default": "Implemented via `import/no-named-default`.",
1520
+ "unicorn/no-double-comparison": "Use `oxc/double-comparisons` instead.",
1512
1521
  "vue/no-lone-template": "Not currently possible, as it requires Vue template parsing.",
1513
1522
  "vue/no-v-html": "Not currently possible, as it requires Vue template parsing.",
1514
1523
  "vue/this-in-template": "Not currently possible, as it requires Vue template parsing.",
@@ -1708,7 +1717,7 @@ function buildUnsupportedRuleExplanations() {
1708
1717
  //#region src/plugins_rules.ts
1709
1718
  const allRules = Object.values(rules_exports).flat();
1710
1719
  const unsupportedRuleExplanations = buildUnsupportedRuleExplanations();
1711
- const oxfmtImportSortingRules = new Set(["sort-imports", "perfectionist/sort-imports"]);
1720
+ const oxfmtImportSortingRules = /* @__PURE__ */ new Set(["sort-imports", "perfectionist/sort-imports"]);
1712
1721
  /**
1713
1722
  * checks if value is validSet, or if validSet is an array, check if value is first value of it
1714
1723
  */
@@ -1753,7 +1762,7 @@ const normalizeSeverityValue = (value) => {
1753
1762
  }
1754
1763
  };
1755
1764
  const equivalentRuleNames = (rule) => {
1756
- const names = new Set([rule, normalizeRuleToCanonical(rule)]);
1765
+ const names = /* @__PURE__ */ new Set([rule, normalizeRuleToCanonical(rule)]);
1757
1766
  if (rule.startsWith("@typescript-eslint/")) {
1758
1767
  const eslintRule = rule.slice(19);
1759
1768
  if (typescriptRulesExtendEslintRules.includes(eslintRule)) names.add(eslintRule);
@@ -1906,8 +1915,8 @@ const mergeOverrideProperties = (target, source) => {
1906
1915
  ...target.rules,
1907
1916
  ...source.rules
1908
1917
  };
1909
- if (source.plugins) target.plugins = [...new Set([...target.plugins ?? [], ...source.plugins])];
1910
- if (source.jsPlugins) target.jsPlugins = [...new Set([...target.jsPlugins ?? [], ...source.jsPlugins])];
1918
+ if (source.plugins) target.plugins = [.../* @__PURE__ */ new Set([...target.plugins ?? [], ...source.plugins])];
1919
+ if (source.jsPlugins) target.jsPlugins = [.../* @__PURE__ */ new Set([...target.jsPlugins ?? [], ...source.jsPlugins])];
1911
1920
  if (source.env) target.env = {
1912
1921
  ...target.env,
1913
1922
  ...source.env
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxlint/migrate",
3
- "version": "1.70.0",
3
+ "version": "1.72.0",
4
4
  "description": "Generates a `.oxlintrc.json` from a existing eslint flat config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,16 +38,16 @@
38
38
  "manual-test": "pnpm build; chmod +x dist/bin/oxlint-migrate.mjs; npx ."
39
39
  },
40
40
  "dependencies": {
41
- "commander": "^14.0.0",
41
+ "commander": "^15.0.0",
42
42
  "globals": "^17.0.0",
43
- "oxc-parser": "^0.135.0",
43
+ "oxc-parser": "^0.137.0",
44
44
  "tinyglobby": "^0.2.14"
45
45
  },
46
46
  "devDependencies": {
47
- "@antfu/eslint-config": "^8.0.0",
48
- "@babel/eslint-plugin": "^7.27.1",
47
+ "@antfu/eslint-config": "^9.0.0",
48
+ "@babel/eslint-plugin": "^8.0.0",
49
49
  "@e18e/eslint-plugin": "^0.5.0",
50
- "@eslint-react/eslint-plugin": "^4.0.0",
50
+ "@eslint-react/eslint-plugin": "^5.0.0",
51
51
  "@eslint/js": "^10.0.0",
52
52
  "@logux/eslint-config": "^57.0.0",
53
53
  "@oxc-node/core": "^0.1.0",
@@ -66,7 +66,7 @@
66
66
  "eslint-plugin-header": "^3.1.1",
67
67
  "eslint-plugin-import": "^2.32.0",
68
68
  "eslint-plugin-import-x": "^4.16.0",
69
- "eslint-plugin-jsdoc": "^62.0.0",
69
+ "eslint-plugin-jsdoc": "^63.0.0",
70
70
  "eslint-plugin-jsx-a11y": "^6.10.2",
71
71
  "eslint-plugin-local": "^6.0.0",
72
72
  "eslint-plugin-mocha": "^11.2.0",
@@ -76,15 +76,15 @@
76
76
  "eslint-plugin-react-hooks": "^7.0.1",
77
77
  "eslint-plugin-react-perf": "^3.3.3",
78
78
  "eslint-plugin-react-refresh": "^0.5.0",
79
- "eslint-plugin-react-web-api": "^4.0.0",
79
+ "eslint-plugin-react-web-api": "^5.0.0",
80
80
  "eslint-plugin-regexp": "^3.0.0",
81
81
  "eslint-plugin-tsdoc": "^0.5.0",
82
- "eslint-plugin-unicorn": "^64.0.0",
82
+ "eslint-plugin-unicorn": "^67.0.0",
83
83
  "husky": "^9.1.7",
84
- "lint-staged": "^16.1.2",
84
+ "lint-staged": "^17.0.0",
85
85
  "next": "^16.0.0",
86
- "oxfmt": "^0.54.0",
87
- "oxlint": "^1.70.0",
86
+ "oxfmt": "^0.55.0",
87
+ "oxlint": "^1.72.0",
88
88
  "oxlint-tsgolint": "^0.23.0",
89
89
  "tsdown": "^0.22.0",
90
90
  "typescript": "^6.0.0",
@@ -94,5 +94,5 @@
94
94
  "lint-staged": {
95
95
  "*": "oxfmt --no-error-on-unmatched-pattern"
96
96
  },
97
- "packageManager": "pnpm@11.5.3"
97
+ "packageManager": "pnpm@11.8.0"
98
98
  }