oxlint 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.
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
  //#region src-js/package/config.generated.d.ts
8
8
  type AllowWarnDeny = ("allow" | "off" | "warn" | "error" | "deny") | number;
9
- type GlobalValue = "readonly" | "writable" | "off";
9
+ type GlobalValue = ("readonly" | "writable" | "off") | undefined;
10
10
  type ExternalPluginEntry = string | {
11
11
  /**
12
12
  * Custom name/alias for the plugin.
@@ -51,6 +51,7 @@ type OptionsJsonEnum = CommentConfigJson | {
51
51
  line?: CommentConfigJson;
52
52
  };
53
53
  type IgnoreClassWithImplements = "all" | "public-fields";
54
+ type ComplexityConfigEnum = number | ComplexityConfig;
54
55
  type Variant = "classic" | "modified";
55
56
  /**
56
57
  * The enforcement type for the curly rule.
@@ -63,22 +64,44 @@ type CurlyType = "all" | "multi" | "multi-line" | "multi-or-nest";
63
64
  type CurlyConsistent = "consistent";
64
65
  type CompareType = "always" | "smart";
65
66
  type NullType = "always" | "never" | "ignore";
66
- type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
67
+ type FuncNameMatchingMode = "always" | "never";
67
68
  type FuncNamesConfigType = "always" | "as-needed" | "never";
68
69
  type Style = "expression" | "declaration";
69
70
  type NamedExports = "ignore" | "expression" | "declaration";
70
71
  type PairOrder = "anyOrder" | "getBeforeSet" | "setBeforeGet";
71
72
  type Mode = "prefer-top-level" | "prefer-inline";
73
+ /**
74
+ * Extension rule configuration; Copy to avoid extra indirection.
75
+ */
76
+ type ExtensionRule = "always" | "never" | "ignorePackages";
77
+ type ImportExtensionsObject = ImportExtensionsConfig | {
78
+ [k: string]: ExtensionRule;
79
+ };
80
+ /**
81
+ * Action to take for path group overrides.
82
+ *
83
+ * Determines how import extensions are validated for matching bespoke import specifiers.
84
+ */
85
+ type PathGroupAction = "enforce" | "ignore";
72
86
  type AbsoluteFirst = "absolute-first" | "disable-absolute-first";
73
87
  type MaxDependenciesConfigJson = number | MaxDependenciesConfig;
74
88
  type Target = "single" | "any";
75
89
  type TestCaseName = "it" | "test";
76
90
  type JestFnType = "hook" | "describe" | "test" | "expect" | "jest" | "unknown";
91
+ type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
77
92
  type SnapshotHintMode = "always" | "multi";
78
93
  type AltTextElements = "img" | "object" | "area" | 'input[type="image"]';
94
+ type AnchorIsValidAspect = "noHref" | "invalidHref" | "preferButton";
79
95
  type Assert = "htmlFor" | "nesting" | "both" | "either";
80
96
  type DistractingElement = "marquee" | "blink";
97
+ type MaxClassesPerFileConfigEnum = number | MaxClassesPerFileConfig;
98
+ type MaxDepthConfigEnum = number | MaxDepth;
99
+ type MaxLinesConfigEnum = number | MaxLinesConfig;
100
+ type MaxLinesPerFunctionConfigEnum = number | MaxLinesPerFunctionConfig;
101
+ type MaxNestedCallbacksConfigEnum = number | MaxNestedCallbacks;
102
+ type MaxParamsConfigEnum = number | MaxParamsConfig;
81
103
  type CountThis = "always" | "never" | "except-void";
104
+ type MaxStatementsConfigEnum = number | MaxStatementsConfig;
82
105
  type NoCondAssignConfig = "except-parens" | "always";
83
106
  type CheckLoopsConfig = boolean | CheckLoops;
84
107
  type CheckLoops = "all" | "allExceptWhileTrue" | "none";
@@ -92,6 +115,9 @@ type AllowKind = "functions" | "arrowFunctions" | "generatorFunctions" | "method
92
115
  type NoInnerDeclarationsConfig = "functions" | "both";
93
116
  type BlockScopedFunctions = "allow" | "disallow";
94
117
  type NoMagicNumbersNumber = number | string;
118
+ type NoRestrictedImportsConfigEnum = string | RestrictedPath | NoRestrictedImportsConfig;
119
+ type PossiblePaths = string | RestrictedPath;
120
+ type PossiblePatterns = string | RestrictedPattern;
95
121
  type NoReturnAssignMode = "always" | "except-parens";
96
122
  /**
97
123
  * Controls how hoisting is handled when checking for shadowing.
@@ -106,6 +132,10 @@ type NoUnusedVarsFixMode = "off" | "suggestion" | "fix" | "safe-fix";
106
132
  type NoUseBeforeDefineConfigJson = Nofunc | NoUseBeforeDefineConfig;
107
133
  type Nofunc = "nofunc";
108
134
  type Location = "start" | "anywhere";
135
+ /**
136
+ * 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`.
137
+ */
138
+ type CallbackReturn = string[];
109
139
  /**
110
140
  * The rule takes a single string option: the name of the error parameter.
111
141
  *
@@ -114,12 +144,15 @@ type Location = "start" | "anywhere";
114
144
  * - a regexp pattern (e.g. `"^(err|error)$"`)
115
145
  *
116
146
  * If the configured name of the error variable begins with a `^` it is considered to be a regexp pattern.
147
+ * Invalid regexp patterns are rejected during configuration parsing.
117
148
  *
118
149
  * Default: `"err"`.
119
150
  */
120
151
  type HandleCallbackErrConfig = string;
152
+ type NoMixedRequiresConfig = boolean | NoMixedRequiresOptions;
121
153
  type ShorthandType = "always" | "methods" | "properties" | "consistent" | "consistent-as-needed" | "never";
122
154
  type Destructuring = "any" | "all";
155
+ type PreferDestructuringOption = PreferDestructuringTargetOption | PreferDestructuringAssignmentConfig;
123
156
  type TerminationMethod = string | string[];
124
157
  type RadixType = "always" | "as-needed";
125
158
  type NativeAllowList = AllKeyword | string[];
@@ -224,7 +257,7 @@ type ChecksVoidReturn = boolean | ChecksVoidReturnOptions;
224
257
  * - A string - ban with custom message
225
258
  * - An object with `message` and optional `fixWith` and `suggest`
226
259
  */
227
- type BanConfigValue = True | string | {
260
+ type BanConfigValue = (True | string | {
228
261
  /**
229
262
  * Replacement type for automatic fixing. Applied directly with `--fix`.
230
263
  */
@@ -237,7 +270,7 @@ type BanConfigValue = True | string | {
237
270
  * Suggested replacement types for manual review. Shown as editor suggestions.
238
271
  */
239
272
  suggest?: string[];
240
- };
273
+ }) | undefined;
241
274
  type True = true;
242
275
  /**
243
276
  * Represents the different ways `allowConstantLoopConditions` can be specified in JSON.
@@ -262,7 +295,7 @@ type PathOption = "always" | "never";
262
295
  type TypesOption = "always" | "never" | "prefer-import";
263
296
  type BomOptionType = "always" | "never";
264
297
  type NonZero = "greater-than" | "not-equal";
265
- type ModuleStylesOverride = false | {
298
+ type ModuleStylesOverride = (false | {
266
299
  /**
267
300
  * Whether default imports or whole-module `require()` assignments are allowed for this module.
268
301
  *
@@ -299,7 +332,7 @@ type ModuleStylesOverride = false | {
299
332
  * ```
300
333
  */
301
334
  unassigned?: boolean;
302
- };
335
+ }) | undefined;
303
336
  type NoInstanceofBuiltinsStrategy = "strict" | "loose";
304
337
  type PreferTernaryOption = "always" | "only-single-line";
305
338
  type RelativeUrlStyleConfig = "never" | "always";
@@ -315,23 +348,23 @@ type CaseType2 = "camelCase" | "snake_case";
315
348
  type AllowYoda = "never" | "always";
316
349
  type OxlintOverrides = OxlintOverride[];
317
350
  type JestVersionSchema = number | string;
318
- type TagNamePreference = string | {
351
+ type TagNamePreference = (string | {
319
352
  message: string;
320
353
  replacement: string;
321
- [k: string]: unknown;
354
+ [k: string]: unknown | undefined;
322
355
  } | {
323
356
  message: string;
324
- [k: string]: unknown;
325
- } | boolean;
357
+ [k: string]: unknown | undefined;
358
+ } | boolean) | undefined;
326
359
  type OneOrManyFor_String = string | string[];
327
360
  type CustomComponent = string | {
328
361
  attribute: string;
329
362
  name: string;
330
- [k: string]: unknown;
363
+ [k: string]: unknown | undefined;
331
364
  } | {
332
365
  attributes: string[];
333
366
  name: string;
334
- [k: string]: unknown;
367
+ [k: string]: unknown | undefined;
335
368
  };
336
369
  /**
337
370
  * Oxlint Configuration File
@@ -641,7 +674,7 @@ interface RuleCategories {
641
674
  * - worker - Web Workers globals.
642
675
  */
643
676
  interface OxlintEnv {
644
- [k: string]: boolean;
677
+ [k: string]: boolean | undefined;
645
678
  }
646
679
  /**
647
680
  * Add or remove global variables.
@@ -669,7 +702,7 @@ interface OxlintEnv {
669
702
  * `"writeable"` or `true` to represent `"writable"`.
670
703
  */
671
704
  interface OxlintGlobals {
672
- [k: string]: GlobalValue;
705
+ [k: string]: GlobalValue | undefined;
673
706
  }
674
707
  /**
675
708
  * Options for the linter.
@@ -772,7 +805,7 @@ interface DummyRuleMap {
772
805
  "block-scoped-var"?: RuleNoConfig;
773
806
  "capitalized-comments"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, OptionsJsonEnum];
774
807
  "class-methods-use-this"?: RuleNoConfig | [AllowWarnDeny, ClassMethodsUseThisConfig];
775
- complexity?: RuleNoConfig | [AllowWarnDeny, number | ComplexityConfig];
808
+ complexity?: RuleNoConfig | [AllowWarnDeny, ComplexityConfigEnum];
776
809
  "constructor-super"?: RuleNoConfig;
777
810
  curly?: RuleNoConfig | [AllowWarnDeny, CurlyType] | [AllowWarnDeny, CurlyType, CurlyConsistent];
778
811
  "default-case"?: RuleNoConfig | [AllowWarnDeny, DefaultCaseConfig];
@@ -780,7 +813,7 @@ interface DummyRuleMap {
780
813
  "default-param-last"?: RuleNoConfig;
781
814
  eqeqeq?: RuleNoConfig | [AllowWarnDeny, CompareType] | [AllowWarnDeny, CompareType, EqeqeqOptions];
782
815
  "for-direction"?: RuleNoConfig;
783
- "func-name-matching"?: DummyRule;
816
+ "func-name-matching"?: RuleNoConfig | ([AllowWarnDeny, FuncNameMatchingMode] | [AllowWarnDeny, FuncNameMatchingMode, FuncNameMatchingConfig] | [AllowWarnDeny, FuncNameMatchingMode] | [AllowWarnDeny, FuncNameMatchingConfig]);
784
817
  "func-names"?: RuleNoConfig | [AllowWarnDeny, FuncNamesConfigType] | [AllowWarnDeny, FuncNamesConfigType, FuncNamesGeneratorsConfig];
785
818
  "func-style"?: RuleNoConfig | [AllowWarnDeny, Style] | [AllowWarnDeny, Style, FuncStyleConfig];
786
819
  "getter-return"?: RuleNoConfig | [AllowWarnDeny, GetterReturn];
@@ -792,7 +825,7 @@ interface DummyRuleMap {
792
825
  "import/default"?: RuleNoConfig;
793
826
  "import/export"?: RuleNoConfig;
794
827
  "import/exports-last"?: RuleNoConfig;
795
- "import/extensions"?: DummyRule;
828
+ "import/extensions"?: RuleNoConfig | ([AllowWarnDeny, ExtensionRule] | [AllowWarnDeny, ExtensionRule, ImportExtensionsObject] | [AllowWarnDeny, ExtensionRule] | [AllowWarnDeny, ImportExtensionsObject]);
796
829
  "import/first"?: RuleNoConfig | [AllowWarnDeny, AbsoluteFirst];
797
830
  "import/group-exports"?: RuleNoConfig;
798
831
  "import/max-dependencies"?: RuleNoConfig | [AllowWarnDeny, MaxDependenciesConfigJson];
@@ -889,9 +922,9 @@ interface DummyRuleMap {
889
922
  "jsdoc/implements-on-classes"?: RuleNoConfig;
890
923
  "jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
891
924
  "jsdoc/require-param"?: DummyRule;
892
- "jsdoc/require-param-description"?: RuleNoConfig;
925
+ "jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
893
926
  "jsdoc/require-param-name"?: RuleNoConfig;
894
- "jsdoc/require-param-type"?: RuleNoConfig;
927
+ "jsdoc/require-param-type"?: RuleNoConfig | [AllowWarnDeny, RequireParamTypeConfig];
895
928
  "jsdoc/require-property"?: RuleNoConfig;
896
929
  "jsdoc/require-property-description"?: RuleNoConfig;
897
930
  "jsdoc/require-property-name"?: RuleNoConfig;
@@ -907,7 +940,7 @@ interface DummyRuleMap {
907
940
  "jsx-a11y/alt-text"?: RuleNoConfig | [AllowWarnDeny, AltTextConfigSchema];
908
941
  "jsx-a11y/anchor-ambiguous-text"?: RuleNoConfig | [AllowWarnDeny, AnchorAmbiguousTextConfig];
909
942
  "jsx-a11y/anchor-has-content"?: RuleNoConfig;
910
- "jsx-a11y/anchor-is-valid"?: DummyRule;
943
+ "jsx-a11y/anchor-is-valid"?: RuleNoConfig | [AllowWarnDeny, AnchorIsValidConfig];
911
944
  "jsx-a11y/aria-activedescendant-has-tabindex"?: RuleNoConfig;
912
945
  "jsx-a11y/aria-props"?: RuleNoConfig;
913
946
  "jsx-a11y/aria-proptypes"?: RuleNoConfig;
@@ -930,7 +963,7 @@ interface DummyRuleMap {
930
963
  "jsx-a11y/no-autofocus"?: RuleNoConfig | [AllowWarnDeny, NoAutofocus];
931
964
  "jsx-a11y/no-distracting-elements"?: RuleNoConfig | [AllowWarnDeny, NoDistractingElementsConfig];
932
965
  "jsx-a11y/no-interactive-element-to-noninteractive-role"?: RuleNoConfig | [AllowWarnDeny, NoInteractiveElementToNoninteractiveRoleConfig];
933
- "jsx-a11y/no-noninteractive-element-interactions"?: DummyRule;
966
+ "jsx-a11y/no-noninteractive-element-interactions"?: RuleNoConfig | [AllowWarnDeny, NoNoninteractiveElementInteractionsConfig];
934
967
  "jsx-a11y/no-noninteractive-element-to-interactive-role"?: RuleNoConfig | [AllowWarnDeny, NoNoninteractiveElementToInteractiveRoleConfig];
935
968
  "jsx-a11y/no-noninteractive-tabindex"?: RuleNoConfig | [AllowWarnDeny, NoNoninteractiveTabindexConfig];
936
969
  "jsx-a11y/no-redundant-roles"?: RuleNoConfig | [AllowWarnDeny, NoRedundantRolesConfig];
@@ -941,13 +974,13 @@ interface DummyRuleMap {
941
974
  "jsx-a11y/scope"?: RuleNoConfig;
942
975
  "jsx-a11y/tabindex-no-positive"?: RuleNoConfig;
943
976
  "logical-assignment-operators"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever] | [AllowWarnDeny, AlwaysNever, LogicalAssignmentOperatorsConfig];
944
- "max-classes-per-file"?: RuleNoConfig | [AllowWarnDeny, number | MaxClassesPerFileConfig];
945
- "max-depth"?: RuleNoConfig | [AllowWarnDeny, number | MaxDepth];
946
- "max-lines"?: RuleNoConfig | [AllowWarnDeny, number | MaxLinesConfig];
947
- "max-lines-per-function"?: RuleNoConfig | [AllowWarnDeny, number | MaxLinesPerFunctionConfig];
948
- "max-nested-callbacks"?: RuleNoConfig | [AllowWarnDeny, number | MaxNestedCallbacks];
949
- "max-params"?: RuleNoConfig | [AllowWarnDeny, number | MaxParamsConfig];
950
- "max-statements"?: RuleNoConfig | [AllowWarnDeny, number | MaxStatementsConfig];
977
+ "max-classes-per-file"?: RuleNoConfig | [AllowWarnDeny, MaxClassesPerFileConfigEnum];
978
+ "max-depth"?: RuleNoConfig | [AllowWarnDeny, MaxDepthConfigEnum];
979
+ "max-lines"?: RuleNoConfig | [AllowWarnDeny, MaxLinesConfigEnum];
980
+ "max-lines-per-function"?: RuleNoConfig | [AllowWarnDeny, MaxLinesPerFunctionConfigEnum];
981
+ "max-nested-callbacks"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCallbacksConfigEnum];
982
+ "max-params"?: RuleNoConfig | [AllowWarnDeny, MaxParamsConfigEnum];
983
+ "max-statements"?: RuleNoConfig | [AllowWarnDeny, MaxStatementsConfigEnum];
951
984
  "new-cap"?: RuleNoConfig | [AllowWarnDeny, NewCapConfig];
952
985
  "nextjs/google-font-display"?: RuleNoConfig;
953
986
  "nextjs/google-font-preconnect"?: RuleNoConfig;
@@ -1048,8 +1081,8 @@ interface DummyRuleMap {
1048
1081
  "no-regex-spaces"?: RuleNoConfig;
1049
1082
  "no-restricted-exports"?: RuleNoConfig | [AllowWarnDeny, NoRestrictedExportsConfig];
1050
1083
  "no-restricted-globals"?: DummyRule;
1051
- "no-restricted-imports"?: DummyRule;
1052
- "no-restricted-properties"?: DummyRule;
1084
+ "no-restricted-imports"?: RuleNoConfig | [AllowWarnDeny, NoRestrictedImportsConfigEnum, ...NoRestrictedImportsConfigEnum[]];
1085
+ "no-restricted-properties"?: RuleNoConfig | [AllowWarnDeny, PropertyDetails, ...PropertyDetails[]];
1053
1086
  "no-return-assign"?: RuleNoConfig | [AllowWarnDeny, NoReturnAssignMode];
1054
1087
  "no-script-url"?: RuleNoConfig;
1055
1088
  "no-self-assign"?: RuleNoConfig | [AllowWarnDeny, NoSelfAssign];
@@ -1093,13 +1126,15 @@ interface DummyRuleMap {
1093
1126
  "no-void"?: RuleNoConfig | [AllowWarnDeny, NoVoid];
1094
1127
  "no-warning-comments"?: RuleNoConfig | [AllowWarnDeny, NoWarningCommentsConfigJson];
1095
1128
  "no-with"?: RuleNoConfig;
1096
- "node/callback-return"?: DummyRule;
1129
+ "node/callback-return"?: RuleNoConfig | [AllowWarnDeny, CallbackReturn];
1097
1130
  "node/global-require"?: RuleNoConfig;
1098
1131
  "node/handle-callback-err"?: RuleNoConfig | [AllowWarnDeny, HandleCallbackErrConfig];
1099
1132
  "node/no-exports-assign"?: RuleNoConfig;
1133
+ "node/no-mixed-requires"?: RuleNoConfig | [AllowWarnDeny, NoMixedRequiresConfig];
1100
1134
  "node/no-new-require"?: RuleNoConfig;
1101
1135
  "node/no-path-concat"?: RuleNoConfig;
1102
1136
  "node/no-process-env"?: RuleNoConfig | [AllowWarnDeny, NoProcessEnvConfig];
1137
+ "node/no-sync"?: RuleNoConfig | [AllowWarnDeny, NoSyncConfig];
1103
1138
  "object-shorthand"?: RuleNoConfig | [AllowWarnDeny, ShorthandType] | [AllowWarnDeny, ShorthandType, ObjectShorthandOptions];
1104
1139
  "operator-assignment"?: RuleNoConfig | [AllowWarnDeny, AlwaysNever];
1105
1140
  "oxc/approx-constant"?: RuleNoConfig;
@@ -1130,7 +1165,7 @@ interface DummyRuleMap {
1130
1165
  "oxc/uninvoked-array-callback"?: RuleNoConfig;
1131
1166
  "prefer-arrow-callback"?: RuleNoConfig | [AllowWarnDeny, PreferArrowCallbackConfig];
1132
1167
  "prefer-const"?: RuleNoConfig | [AllowWarnDeny, PreferConstConfig];
1133
- "prefer-destructuring"?: DummyRule;
1168
+ "prefer-destructuring"?: RuleNoConfig | [AllowWarnDeny, PreferDestructuringOption] | [AllowWarnDeny, PreferDestructuringOption, PreferDestructuringRenamedPropertiesConfig];
1134
1169
  "prefer-exponentiation-operator"?: RuleNoConfig;
1135
1170
  "prefer-named-capture-group"?: RuleNoConfig;
1136
1171
  "prefer-numeric-literals"?: RuleNoConfig;
@@ -1184,7 +1219,7 @@ interface DummyRuleMap {
1184
1219
  "react/jsx-no-constructed-context-values"?: RuleNoConfig;
1185
1220
  "react/jsx-no-duplicate-props"?: RuleNoConfig;
1186
1221
  "react/jsx-no-literals"?: RuleNoConfig | [AllowWarnDeny, JsxNoLiteralsConfig];
1187
- "react/jsx-no-script-url"?: DummyRule;
1222
+ "react/jsx-no-script-url"?: RuleNoConfig | ([AllowWarnDeny, JsxNoScriptUrlComponent[]] | [AllowWarnDeny, JsxNoScriptUrlComponent[], JsxNoScriptUrlOptions] | [AllowWarnDeny, JsxNoScriptUrlOptions]);
1188
1223
  "react/jsx-no-target-blank"?: RuleNoConfig | [AllowWarnDeny, JsxNoTargetBlank];
1189
1224
  "react/jsx-no-undef"?: RuleNoConfig;
1190
1225
  "react/jsx-no-useless-fragment"?: RuleNoConfig | [AllowWarnDeny, JsxNoUselessFragment];
@@ -1358,6 +1393,7 @@ interface DummyRuleMap {
1358
1393
  "unicorn/explicit-length-check"?: RuleNoConfig | [AllowWarnDeny, ExplicitLengthCheck];
1359
1394
  "unicorn/filename-case"?: DummyRule;
1360
1395
  "unicorn/import-style"?: RuleNoConfig | [AllowWarnDeny, ImportStyleConfig];
1396
+ "unicorn/max-nested-calls"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCalls];
1361
1397
  "unicorn/new-for-builtins"?: RuleNoConfig;
1362
1398
  "unicorn/no-abusive-eslint-disable"?: RuleNoConfig;
1363
1399
  "unicorn/no-accessor-recursion"?: RuleNoConfig;
@@ -1413,7 +1449,7 @@ interface DummyRuleMap {
1413
1449
  "unicorn/no-useless-undefined"?: RuleNoConfig | [AllowWarnDeny, NoUselessUndefined];
1414
1450
  "unicorn/no-zero-fractions"?: RuleNoConfig;
1415
1451
  "unicorn/number-literal-case"?: RuleNoConfig;
1416
- "unicorn/numeric-separators-style"?: DummyRule;
1452
+ "unicorn/numeric-separators-style"?: RuleNoConfig | [AllowWarnDeny, NumericSeparatorsStyleConfig];
1417
1453
  "unicorn/prefer-add-event-listener"?: RuleNoConfig;
1418
1454
  "unicorn/prefer-array-find"?: RuleNoConfig;
1419
1455
  "unicorn/prefer-array-flat"?: RuleNoConfig;
@@ -1447,6 +1483,7 @@ interface DummyRuleMap {
1447
1483
  "unicorn/prefer-native-coercion-functions"?: RuleNoConfig;
1448
1484
  "unicorn/prefer-negative-index"?: RuleNoConfig;
1449
1485
  "unicorn/prefer-node-protocol"?: RuleNoConfig;
1486
+ "unicorn/prefer-number-coercion"?: RuleNoConfig;
1450
1487
  "unicorn/prefer-number-properties"?: RuleNoConfig | [AllowWarnDeny, PreferNumberPropertiesConfig];
1451
1488
  "unicorn/prefer-object-from-entries"?: RuleNoConfig | [AllowWarnDeny, PreferObjectFromEntriesConfig];
1452
1489
  "unicorn/prefer-optional-catch-binding"?: RuleNoConfig;
@@ -1560,6 +1597,7 @@ interface DummyRuleMap {
1560
1597
  "vue/max-props"?: RuleNoConfig | [AllowWarnDeny, MaxProps];
1561
1598
  "vue/next-tick-style"?: RuleNoConfig | [AllowWarnDeny, NextTickOption];
1562
1599
  "vue/no-arrow-functions-in-watch"?: RuleNoConfig;
1600
+ "vue/no-async-in-computed-properties"?: RuleNoConfig | [AllowWarnDeny, NoAsyncInComputedPropertiesConfig];
1563
1601
  "vue/no-computed-properties-in-data"?: RuleNoConfig;
1564
1602
  "vue/no-deprecated-data-object-declaration"?: RuleNoConfig;
1565
1603
  "vue/no-deprecated-delete-set"?: RuleNoConfig;
@@ -1636,6 +1674,10 @@ interface ArrayCallbackReturn {
1636
1674
  checkForEach?: boolean;
1637
1675
  }
1638
1676
  interface ArrowBodyStyleConfig {
1677
+ /**
1678
+ * Requires braces and an explicit return for object literals. This option only applies when
1679
+ * the first option is `"as-needed"`.
1680
+ */
1639
1681
  requireReturnForObjectLiteral?: boolean;
1640
1682
  }
1641
1683
  interface CommentConfigJson {
@@ -1715,6 +1757,16 @@ interface EqeqeqOptions {
1715
1757
  */
1716
1758
  null?: NullType;
1717
1759
  }
1760
+ interface FuncNameMatchingConfig {
1761
+ /**
1762
+ * If `considerPropertyDescriptor` is set to `true`, the check will take into account the use of `Object.create`, `Object.defineProperty`, `Object.defineProperties`, and `Reflect.defineProperty`.
1763
+ */
1764
+ considerPropertyDescriptor?: boolean;
1765
+ /**
1766
+ * If `includeCommonJSModuleExports` is set to `true`, `module.exports` and `module["exports"]` will be checked by this rule.
1767
+ */
1768
+ includeCommonJSModuleExports?: boolean;
1769
+ }
1718
1770
  interface FuncNamesGeneratorsConfig {
1719
1771
  /**
1720
1772
  * Configuration for generator function expressions. If not specified, uses the
@@ -1847,6 +1899,36 @@ interface IdMatchOptions {
1847
1899
  */
1848
1900
  properties?: boolean;
1849
1901
  }
1902
+ interface ImportExtensionsConfig {
1903
+ /**
1904
+ * Whether to check type imports when enforcing extension rules.
1905
+ */
1906
+ checkTypeImports?: boolean;
1907
+ /**
1908
+ * Whether to ignore package imports when enforcing extension rules.
1909
+ */
1910
+ ignorePackages?: boolean;
1911
+ /**
1912
+ * Path group overrides for bespoke import specifiers.
1913
+ */
1914
+ pathGroupOverrides?: PathGroupOverrideConfig[];
1915
+ /**
1916
+ * Per-extension rules.
1917
+ */
1918
+ pattern?: {
1919
+ [k: string]: ExtensionRule;
1920
+ };
1921
+ }
1922
+ interface PathGroupOverrideConfig {
1923
+ /**
1924
+ * Action to take when pattern matches.
1925
+ */
1926
+ action: PathGroupAction;
1927
+ /**
1928
+ * Glob pattern to match import specifiers.
1929
+ */
1930
+ pattern: string;
1931
+ }
1850
1932
  interface MaxDependenciesConfig {
1851
1933
  /**
1852
1934
  * Whether to ignore type imports when counting dependencies.
@@ -2156,7 +2238,7 @@ interface NoLargeSnapshotsConfig {
2156
2238
  * Snapshot names can be specified as regular expressions.
2157
2239
  */
2158
2240
  allowedSnapshots?: {
2159
- [k: string]: string[];
2241
+ [k: string]: string[] | undefined;
2160
2242
  };
2161
2243
  /**
2162
2244
  * Maximum number of lines allowed for inline snapshots.
@@ -2168,10 +2250,10 @@ interface NoLargeSnapshotsConfig {
2168
2250
  maxSize?: number;
2169
2251
  }
2170
2252
  interface NoRestrictedTestMethodsConfig {
2171
- [k: string]: string | null;
2253
+ [k: string]: (string | null) | undefined;
2172
2254
  }
2173
2255
  interface NoRestrictedMatchersConfig {
2174
- [k: string]: string | null;
2256
+ [k: string]: (string | null) | undefined;
2175
2257
  }
2176
2258
  interface NoStandaloneExpectConfig {
2177
2259
  /**
@@ -2260,6 +2342,28 @@ interface NoDefaultsConfig {
2260
2342
  */
2261
2343
  noOptionalParamNames?: boolean;
2262
2344
  }
2345
+ interface RequireParamDescriptionConfig {
2346
+ /**
2347
+ * The description string to set by default for destructured roots. Defaults to "The root object".
2348
+ */
2349
+ defaultDestructuredRootDescription?: string;
2350
+ /**
2351
+ * Whether to set a default destructured root description.
2352
+ * 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.
2353
+ * Uses `defaultDestructuredRootDescription` for the description string. Defaults to `false`.
2354
+ */
2355
+ setDefaultDestructuredRootDescription?: boolean;
2356
+ }
2357
+ interface RequireParamTypeConfig {
2358
+ /**
2359
+ * The type string to set by default for destructured roots. Defaults to "object".
2360
+ */
2361
+ defaultDestructuredRootType?: string;
2362
+ /**
2363
+ * 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`.
2364
+ */
2365
+ setDefaultDestructuredRootType?: boolean;
2366
+ }
2263
2367
  interface RequireReturnsConfig {
2264
2368
  /**
2265
2369
  * Whether to check constructor methods.
@@ -2324,6 +2428,20 @@ interface AnchorAmbiguousTextConfig {
2324
2428
  */
2325
2429
  words?: string[];
2326
2430
  }
2431
+ interface AnchorIsValidConfig {
2432
+ /**
2433
+ * Sub-rule aspects to run.
2434
+ */
2435
+ aspects?: AnchorIsValidAspect[];
2436
+ /**
2437
+ * Custom components to treat as anchor elements.
2438
+ */
2439
+ components?: string[];
2440
+ /**
2441
+ * Custom prop names to treat as link destinations.
2442
+ */
2443
+ specialLink?: string[];
2444
+ }
2327
2445
  interface AriaRoleConfig {
2328
2446
  /**
2329
2447
  * Custom roles that should be allowed in addition to the ARIA spec.
@@ -2450,10 +2568,17 @@ interface NoDistractingElementsConfig {
2450
2568
  elements?: DistractingElement[];
2451
2569
  }
2452
2570
  interface NoInteractiveElementToNoninteractiveRoleConfig {
2453
- [k: string]: string[];
2571
+ [k: string]: string[] | undefined;
2572
+ }
2573
+ interface NoNoninteractiveElementInteractionsConfig {
2574
+ /**
2575
+ * An array of event handler names that should trigger this rule.
2576
+ */
2577
+ handlers?: string[];
2578
+ [k: string]: string[] | undefined;
2454
2579
  }
2455
2580
  interface NoNoninteractiveElementToInteractiveRoleConfig {
2456
- [k: string]: string[];
2581
+ [k: string]: string[] | undefined;
2457
2582
  }
2458
2583
  interface NoNoninteractiveTabindexConfig {
2459
2584
  /**
@@ -2470,7 +2595,7 @@ interface NoNoninteractiveTabindexConfig {
2470
2595
  tags?: string[];
2471
2596
  }
2472
2597
  interface NoRedundantRolesConfig {
2473
- [k: string]: string[];
2598
+ [k: string]: string[] | undefined;
2474
2599
  }
2475
2600
  interface NoStaticElementInteractionsConfig {
2476
2601
  /**
@@ -3183,6 +3308,53 @@ interface RestrictDefaultExports {
3183
3308
  */
3184
3309
  namespaceFrom?: boolean;
3185
3310
  }
3311
+ interface RestrictedPath {
3312
+ allowImportNames?: string[];
3313
+ allowTypeImports?: boolean;
3314
+ importNames?: string[];
3315
+ message?: string;
3316
+ name: string;
3317
+ }
3318
+ interface NoRestrictedImportsConfig {
3319
+ paths?: PossiblePaths[];
3320
+ patterns?: PossiblePatterns[];
3321
+ }
3322
+ interface RestrictedPattern {
3323
+ allowImportNamePattern?: string;
3324
+ allowImportNames?: string[];
3325
+ allowTypeImports?: boolean;
3326
+ caseSensitive?: boolean;
3327
+ group?: string[];
3328
+ importNamePattern?: string;
3329
+ importNames?: string[];
3330
+ message?: string;
3331
+ regex?: string;
3332
+ }
3333
+ interface PropertyDetails {
3334
+ /**
3335
+ * Objects where property access should be allowed. This must be used with `property` and
3336
+ * cannot be used with `object`.
3337
+ */
3338
+ allowObjects?: string[];
3339
+ /**
3340
+ * Properties where property access should be allowed. This must be used with `object` and
3341
+ * cannot be used with `property`.
3342
+ */
3343
+ allowProperties?: string[];
3344
+ /**
3345
+ * A custom message to display.
3346
+ */
3347
+ message?: string;
3348
+ /**
3349
+ * The object on which the property is being accessed.
3350
+ */
3351
+ object?: string;
3352
+ /**
3353
+ * The property being accessed. If `object` is not specified, this applies to the named
3354
+ * property on all objects.
3355
+ */
3356
+ property?: string;
3357
+ }
3186
3358
  interface NoSelfAssign {
3187
3359
  /**
3188
3360
  * The `props` option when set to `false`, disables the checking of properties.
@@ -3676,12 +3848,26 @@ interface NoWarningCommentsConfigJson {
3676
3848
  location?: Location;
3677
3849
  terms?: string[];
3678
3850
  }
3851
+ interface NoMixedRequiresOptions {
3852
+ allowCall?: boolean;
3853
+ grouping?: boolean;
3854
+ }
3679
3855
  interface NoProcessEnvConfig {
3680
3856
  /**
3681
3857
  * Variable names which are allowed to be accessed on `process.env`.
3682
3858
  */
3683
3859
  allowedVariables?: string[];
3684
3860
  }
3861
+ interface NoSyncConfig {
3862
+ /**
3863
+ * Whether synchronous methods should be allowed at the top level of a file.
3864
+ */
3865
+ allowAtRootLevel?: boolean;
3866
+ /**
3867
+ * Function names to ignore.
3868
+ */
3869
+ ignores?: string[];
3870
+ }
3685
3871
  interface ObjectShorthandOptions {
3686
3872
  avoidExplicitReturnArrows?: boolean;
3687
3873
  avoidQuotes?: boolean;
@@ -3776,6 +3962,17 @@ interface PreferConstConfig {
3776
3962
  */
3777
3963
  ignoreReadBeforeAssign?: boolean;
3778
3964
  }
3965
+ interface PreferDestructuringTargetOption {
3966
+ array?: boolean;
3967
+ object?: boolean;
3968
+ }
3969
+ interface PreferDestructuringAssignmentConfig {
3970
+ AssignmentExpression?: PreferDestructuringTargetOption;
3971
+ VariableDeclarator?: PreferDestructuringTargetOption;
3972
+ }
3973
+ interface PreferDestructuringRenamedPropertiesConfig {
3974
+ enforceForRenamedProperties?: boolean;
3975
+ }
3779
3976
  interface PreferPromiseRejectErrors {
3780
3977
  /**
3781
3978
  * Whether to allow calls to `Promise.reject()` with no arguments.
@@ -4263,7 +4460,7 @@ interface JsxNoLiteralsConfig {
4263
4460
  * 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.
4264
4461
  */
4265
4462
  elementOverrides?: {
4266
- [k: string]: ElementOverrideOptions;
4463
+ [k: string]: ElementOverrideOptions | undefined;
4267
4464
  };
4268
4465
  /**
4269
4466
  * (default: false) - When true the rule ignores literals used in props, wrapped or unwrapped.
@@ -4315,6 +4512,22 @@ interface ElementOverrideOptions {
4315
4512
  */
4316
4513
  restrictedAttributes?: string[];
4317
4514
  }
4515
+ interface JsxNoScriptUrlComponent {
4516
+ /**
4517
+ * Component name.
4518
+ */
4519
+ name: string;
4520
+ /**
4521
+ * List of properties that should be validated.
4522
+ */
4523
+ props: string[];
4524
+ }
4525
+ interface JsxNoScriptUrlOptions {
4526
+ /**
4527
+ * Whether to include components from settings.
4528
+ */
4529
+ includeFromSettings?: boolean;
4530
+ }
4318
4531
  interface JsxNoTargetBlank {
4319
4532
  /**
4320
4533
  * Whether to allow referrers.
@@ -5170,7 +5383,7 @@ interface NoRestrictedTypesConfig {
5170
5383
  * A mapping of type names to ban configurations.
5171
5384
  */
5172
5385
  types?: {
5173
- [k: string]: BanConfigValue;
5386
+ [k: string]: BanConfigValue | undefined;
5174
5387
  };
5175
5388
  }
5176
5389
  interface NoThisAliasConfig {
@@ -5718,9 +5931,15 @@ interface ImportStyleConfig {
5718
5931
  * ```
5719
5932
  */
5720
5933
  styles?: {
5721
- [k: string]: ModuleStylesOverride;
5934
+ [k: string]: ModuleStylesOverride | undefined;
5722
5935
  };
5723
5936
  }
5937
+ interface MaxNestedCalls {
5938
+ /**
5939
+ * The maximum allowed nested call depth.
5940
+ */
5941
+ max?: number;
5942
+ }
5724
5943
  interface NoArrayReduce {
5725
5944
  /**
5726
5945
  * When set to `true`, allows simple operations (like summing numbers) in `reduce` and `reduceRight` calls.
@@ -5805,6 +6024,77 @@ interface NoUselessUndefined {
5805
6024
  */
5806
6025
  checkArrowFunctionBody?: boolean;
5807
6026
  }
6027
+ interface NumericSeparatorsStyleConfig {
6028
+ /**
6029
+ * Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).
6030
+ * Controls how digits are grouped and when separators are applied.
6031
+ */
6032
+ binary?: NumericBaseConfig;
6033
+ /**
6034
+ * Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).
6035
+ * Controls how digits are grouped and when separators are applied.
6036
+ */
6037
+ hexadecimal?: NumericBaseConfig;
6038
+ /**
6039
+ * Configuration for decimal numbers (integers, fraction parts, and exponents).
6040
+ * Controls how digits are grouped and when separators are applied.
6041
+ */
6042
+ number?: NumericNumberConfig;
6043
+ /**
6044
+ * Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).
6045
+ * Controls how digits are grouped and when separators are applied.
6046
+ */
6047
+ octal?: NumericBaseConfig;
6048
+ /**
6049
+ * Only enforce the rule when the numeric literal already contains a separator (`_`).
6050
+ *
6051
+ * When `true`, numbers without separators are left as-is; when `false` (default),
6052
+ * grouping will be enforced for eligible numbers even if they don't include separators yet.
6053
+ */
6054
+ onlyIfContainsSeparator?: boolean;
6055
+ }
6056
+ interface NumericBaseConfig {
6057
+ /**
6058
+ * The number of digits per group when inserting numeric separators.
6059
+ * For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
6060
+ */
6061
+ groupLength?: number;
6062
+ /**
6063
+ * The minimum number of digits required before grouping is applied.
6064
+ * Values with fewer digits than this threshold will not be grouped.
6065
+ */
6066
+ minimumDigits?: number;
6067
+ /**
6068
+ * Only enforce the rule when the numeric literal already contains a separator (`_`).
6069
+ *
6070
+ * When `true`, numbers without separators are left as-is; when `false` (default),
6071
+ * grouping will be enforced for eligible numbers even if they don't include separators yet.
6072
+ */
6073
+ onlyIfContainsSeparator?: boolean;
6074
+ }
6075
+ interface NumericNumberConfig {
6076
+ /**
6077
+ * The size a group of digits in the fractional part (after the decimal point) should be.
6078
+ */
6079
+ fractionGroupLength?: number;
6080
+ /**
6081
+ * The number of digits per group when inserting numeric separators.
6082
+ * For example, a `groupLength` of 3 formats `1234567` as `1_234_567`.
6083
+ */
6084
+ groupLength?: number;
6085
+ /**
6086
+ * The minimum number of digits required before grouping is applied.
6087
+ * Values with fewer digits than this threshold will not be grouped.
6088
+ */
6089
+ minimumDigits?: number;
6090
+ /**
6091
+ * Only enforce the rule when the numeric literal already contains a separator (`_`).
6092
+ *
6093
+ * When `true`, numbers without separators are left as-is; when `false` (default),
6094
+ * grouping will be enforced for eligible numbers even if they don't include separators yet.
6095
+ */
6096
+ onlyIfContainsSeparator?: boolean;
6097
+ }
5808
6098
  interface PreferAtConfig {
5809
6099
  /**
5810
6100
  * Check all index access, not just special patterns like `array.length - 1`.
@@ -5953,6 +6243,14 @@ interface MaxProps {
5953
6243
  */
5954
6244
  maxProps?: number;
5955
6245
  }
6246
+ interface NoAsyncInComputedPropertiesConfig {
6247
+ /**
6248
+ * Names of identifiers whose member-call chains (`.then` / `.catch` / `.finally`)
6249
+ * should be ignored. Useful for libraries like Zod where `.catch(default)` is
6250
+ * a builder API, not a Promise method.
6251
+ */
6252
+ ignoredObjectNames?: string[];
6253
+ }
5956
6254
  interface NoDeprecatedModelDefinitionConfig {
5957
6255
  /**
5958
6256
  * Allow `model: { prop: 'modelValue', event: 'update:modelValue' }` (or
@@ -6071,7 +6369,7 @@ interface OxlintPluginSettings {
6071
6369
  next?: NextPluginSettings;
6072
6370
  react?: ReactPluginSettings;
6073
6371
  vitest?: VitestPluginSettings;
6074
- [k: string]: unknown;
6372
+ [k: string]: unknown | undefined;
6075
6373
  }
6076
6374
  /**
6077
6375
  * Configure Jest plugin rules.
@@ -6088,7 +6386,7 @@ interface JestPluginSettings {
6088
6386
  * :::
6089
6387
  */
6090
6388
  version?: JestVersionSchema;
6091
- [k: string]: unknown;
6389
+ [k: string]: unknown | undefined;
6092
6390
  }
6093
6391
  interface JSDocPluginSettings {
6094
6392
  /**
@@ -6120,9 +6418,9 @@ interface JSDocPluginSettings {
6120
6418
  */
6121
6419
  overrideReplacesDocs?: boolean;
6122
6420
  tagNamePreference?: {
6123
- [k: string]: TagNamePreference;
6421
+ [k: string]: TagNamePreference | undefined;
6124
6422
  };
6125
- [k: string]: unknown;
6423
+ [k: string]: unknown | undefined;
6126
6424
  }
6127
6425
  /**
6128
6426
  * Configure JSX A11y plugin rules.
@@ -6154,7 +6452,7 @@ interface JSXA11YPluginSettings {
6154
6452
  * ```
6155
6453
  */
6156
6454
  attributes?: {
6157
- [k: string]: string[];
6455
+ [k: string]: string[] | undefined;
6158
6456
  };
6159
6457
  /**
6160
6458
  * To have your custom components be checked as DOM elements, you can
@@ -6176,7 +6474,7 @@ interface JSXA11YPluginSettings {
6176
6474
  * ```
6177
6475
  */
6178
6476
  components?: {
6179
- [k: string]: string;
6477
+ [k: string]: string | undefined;
6180
6478
  };
6181
6479
  /**
6182
6480
  * An optional setting that define the prop your code uses to create polymorphic components.
@@ -6193,7 +6491,7 @@ interface JSXA11YPluginSettings {
6193
6491
  * as a `Box`.
6194
6492
  */
6195
6493
  polymorphicPropName?: string;
6196
- [k: string]: unknown;
6494
+ [k: string]: unknown | undefined;
6197
6495
  }
6198
6496
  /**
6199
6497
  * Configure Next.js plugin rules.
@@ -6218,7 +6516,7 @@ interface NextPluginSettings {
6218
6516
  * ```
6219
6517
  */
6220
6518
  rootDir?: OneOrManyFor_String;
6221
- [k: string]: unknown;
6519
+ [k: string]: unknown | undefined;
6222
6520
  }
6223
6521
  /**
6224
6522
  * Configure React plugin rules.
@@ -6305,7 +6603,7 @@ interface ReactPluginSettings {
6305
6603
  * ```
6306
6604
  */
6307
6605
  version?: string;
6308
- [k: string]: unknown;
6606
+ [k: string]: unknown | undefined;
6309
6607
  }
6310
6608
  /**
6311
6609
  * Configure Vitest plugin rules.
@@ -6320,7 +6618,7 @@ interface VitestPluginSettings {
6320
6618
  * to accommodate TypeScript type checking scenarios.
6321
6619
  */
6322
6620
  typecheck?: boolean;
6323
- [k: string]: unknown;
6621
+ [k: string]: unknown | undefined;
6324
6622
  }
6325
6623
  //#endregion
6326
6624
  //#region src-js/package/config.d.ts