@oxlint-config-inspector/core 1.1.9 → 1.1.11
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 +51 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -244,7 +244,7 @@ function mergeArrays(base, override) {
|
|
|
244
244
|
}
|
|
245
245
|
//#endregion
|
|
246
246
|
//#region package.json
|
|
247
|
-
var version = "1.1.
|
|
247
|
+
var version = "1.1.11";
|
|
248
248
|
//#endregion
|
|
249
249
|
//#region src/generated/builtin-rule-docs.ts
|
|
250
250
|
const builtinRuleDocs = {
|
|
@@ -322,7 +322,7 @@ const builtinRuleDocs = {
|
|
|
322
322
|
exceptions: [],
|
|
323
323
|
max: "Infinity",
|
|
324
324
|
min: 2,
|
|
325
|
-
properties: "
|
|
325
|
+
properties: "always"
|
|
326
326
|
},
|
|
327
327
|
description: "Enforce a minimum and/or maximum identifier length convention by counting the graphemes for a given identifier."
|
|
328
328
|
},
|
|
@@ -631,7 +631,7 @@ const builtinRuleDocs = {
|
|
|
631
631
|
defaultOptions: {
|
|
632
632
|
allow: [],
|
|
633
633
|
builtinGlobals: false,
|
|
634
|
-
hoist: "
|
|
634
|
+
hoist: "functions-and-types",
|
|
635
635
|
ignoreFunctionTypeParameterNameValueShadow: true,
|
|
636
636
|
ignoreOnInitialization: false,
|
|
637
637
|
ignoreTypeValueShadow: true
|
|
@@ -753,7 +753,7 @@ const builtinRuleDocs = {
|
|
|
753
753
|
"eslint/no-warning-comments": {
|
|
754
754
|
defaultOptions: {
|
|
755
755
|
decoration: [],
|
|
756
|
-
location: "
|
|
756
|
+
location: "start",
|
|
757
757
|
terms: [
|
|
758
758
|
"todo",
|
|
759
759
|
"fixme",
|
|
@@ -970,14 +970,14 @@ const builtinRuleDocs = {
|
|
|
970
970
|
},
|
|
971
971
|
"import/no-webpack-loader-syntax": { description: "Forbids using Webpack loader syntax directly in import or require statements." },
|
|
972
972
|
"import/prefer-default-export": {
|
|
973
|
-
defaultOptions: { target: "
|
|
973
|
+
defaultOptions: { target: "single" },
|
|
974
974
|
description: "Checks whether there is a default export."
|
|
975
975
|
},
|
|
976
976
|
"import/unambiguous": { description: "Warn if a module could be mistakenly parsed as a script instead of as a pure ES module." },
|
|
977
977
|
"jest/consistent-test-it": {
|
|
978
978
|
defaultOptions: {
|
|
979
|
-
fn: "
|
|
980
|
-
withinDescribe: "
|
|
979
|
+
fn: "test",
|
|
980
|
+
withinDescribe: "it"
|
|
981
981
|
},
|
|
982
982
|
description: "Jest allows you to choose how you want to define your tests, using the it or the test keywords, with multiple permutations for each:"
|
|
983
983
|
},
|
|
@@ -1002,7 +1002,7 @@ const builtinRuleDocs = {
|
|
|
1002
1002
|
"jest/no-conditional-in-test": { description: "Disallow conditional statements in tests." },
|
|
1003
1003
|
"jest/no-confusing-set-timeout": { description: "Disallow confusing usages of jest.setTimeout." },
|
|
1004
1004
|
"jest/no-deprecated-functions": {
|
|
1005
|
-
defaultOptions: { jest: { version: "
|
|
1005
|
+
defaultOptions: { jest: { version: "29" } },
|
|
1006
1006
|
description: "Over the years Jest has accrued some debt in the form of functions that have either been renamed for clarity, or replaced with more powerful APIs."
|
|
1007
1007
|
},
|
|
1008
1008
|
"jest/no-disabled-tests": { description: "This rule raises a warning about disabled tests." },
|
|
@@ -1038,7 +1038,7 @@ const builtinRuleDocs = {
|
|
|
1038
1038
|
"jest/no-untyped-mock-factory": { description: "This rule triggers a warning if mock() or doMock() is used without a generic type parameter or return type." },
|
|
1039
1039
|
"jest/padding-around-after-all-blocks": { description: "This rule enforces a line of padding before and after 1 or more afterAll statements." },
|
|
1040
1040
|
"jest/padding-around-test-blocks": { description: "This rule enforces a line of padding before and after 1 or more test/it statements." },
|
|
1041
|
-
"jest/prefer-called-with": { description: "Suggest using toBeCalledWith() or toHaveBeenCalledWith()" },
|
|
1041
|
+
"jest/prefer-called-with": { description: "Suggest using toBeCalledWith() or toHaveBeenCalledWith()." },
|
|
1042
1042
|
"jest/prefer-comparison-matcher": { description: "This rule checks for comparisons in tests that could be replaced with one of the following built-in comparison matchers:" },
|
|
1043
1043
|
"jest/prefer-each": { description: "This rule enforces using each rather than manual loops." },
|
|
1044
1044
|
"jest/prefer-ending-with-an-expect": {
|
|
@@ -1109,7 +1109,7 @@ const builtinRuleDocs = {
|
|
|
1109
1109
|
maxArgs: 1,
|
|
1110
1110
|
minArgs: 1
|
|
1111
1111
|
},
|
|
1112
|
-
description: "Checks that expect() is called correctly."
|
|
1112
|
+
description: "Checks that expect() is called correctly. vitest/valid-expect also checks that expectTypeOf() calls use valid modifiers and invoke a matcher."
|
|
1113
1113
|
},
|
|
1114
1114
|
"jest/valid-expect-in-promise": { description: "Ensures that expect calls inside promise chains (.then(), .catch(), .finally()) are properly awaited or returned from the test." },
|
|
1115
1115
|
"jest/valid-title": { description: "Checks that the titles of Jest and Vitest blocks are valid." },
|
|
@@ -1144,7 +1144,7 @@ const builtinRuleDocs = {
|
|
|
1144
1144
|
checkGetters: true,
|
|
1145
1145
|
checkRestProperty: false,
|
|
1146
1146
|
checkSetters: true,
|
|
1147
|
-
checkTypesPattern: "
|
|
1147
|
+
checkTypesPattern: "^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$",
|
|
1148
1148
|
exemptedBy: ["inheritdoc"],
|
|
1149
1149
|
ignoreWhenAllParamsMissing: false,
|
|
1150
1150
|
interfaceExemptsParamsCheck: false,
|
|
@@ -1154,7 +1154,7 @@ const builtinRuleDocs = {
|
|
|
1154
1154
|
},
|
|
1155
1155
|
"jsdoc/require-param-description": {
|
|
1156
1156
|
defaultOptions: {
|
|
1157
|
-
defaultDestructuredRootDescription: "
|
|
1157
|
+
defaultDestructuredRootDescription: "The root object",
|
|
1158
1158
|
setDefaultDestructuredRootDescription: false
|
|
1159
1159
|
},
|
|
1160
1160
|
description: "Requires that each @param tag has a description value."
|
|
@@ -1162,7 +1162,7 @@ const builtinRuleDocs = {
|
|
|
1162
1162
|
"jsdoc/require-param-name": { description: "Requires that all @param tags have names." },
|
|
1163
1163
|
"jsdoc/require-param-type": {
|
|
1164
1164
|
defaultOptions: {
|
|
1165
|
-
defaultDestructuredRootType: "
|
|
1165
|
+
defaultDestructuredRootType: "object",
|
|
1166
1166
|
setDefaultDestructuredRootType: false
|
|
1167
1167
|
},
|
|
1168
1168
|
description: "Requires that each @param tag has a type value (within curly brackets)."
|
|
@@ -1301,7 +1301,7 @@ const builtinRuleDocs = {
|
|
|
1301
1301
|
},
|
|
1302
1302
|
"jsx-a11y/label-has-associated-control": {
|
|
1303
1303
|
defaultOptions: {
|
|
1304
|
-
assert: "
|
|
1304
|
+
assert: "either",
|
|
1305
1305
|
controlComponents: [],
|
|
1306
1306
|
depth: 2,
|
|
1307
1307
|
labelAttributes: [
|
|
@@ -1477,13 +1477,13 @@ const builtinRuleDocs = {
|
|
|
1477
1477
|
description: "Disallow the use of object or array spreads in Array.prototype.map and Array.prototype.flatMap to add properties/elements to array items."
|
|
1478
1478
|
},
|
|
1479
1479
|
"oxc/no-optional-chaining": {
|
|
1480
|
-
defaultOptions: { message: "
|
|
1480
|
+
defaultOptions: { message: "" },
|
|
1481
1481
|
description: "Disallow optional chaining."
|
|
1482
1482
|
},
|
|
1483
1483
|
"oxc/no-rest-spread-properties": {
|
|
1484
1484
|
defaultOptions: {
|
|
1485
|
-
objectRestMessage: "
|
|
1486
|
-
objectSpreadMessage: "
|
|
1485
|
+
objectRestMessage: "",
|
|
1486
|
+
objectSpreadMessage: ""
|
|
1487
1487
|
},
|
|
1488
1488
|
description: "Disallow Object Rest/Spread Properties."
|
|
1489
1489
|
},
|
|
@@ -1592,15 +1592,15 @@ const builtinRuleDocs = {
|
|
|
1592
1592
|
},
|
|
1593
1593
|
"react/jsx-curly-brace-presence": {
|
|
1594
1594
|
defaultOptions: {
|
|
1595
|
-
children: "
|
|
1596
|
-
propElementValues: "
|
|
1597
|
-
props: "
|
|
1595
|
+
children: "never",
|
|
1596
|
+
propElementValues: "ignore",
|
|
1597
|
+
props: "never"
|
|
1598
1598
|
},
|
|
1599
1599
|
description: "Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes."
|
|
1600
1600
|
},
|
|
1601
1601
|
"react/jsx-filename-extension": {
|
|
1602
1602
|
defaultOptions: {
|
|
1603
|
-
allow: "
|
|
1603
|
+
allow: "always",
|
|
1604
1604
|
extensions: ["jsx"],
|
|
1605
1605
|
ignoreFilesWithoutCode: false
|
|
1606
1606
|
},
|
|
@@ -1611,8 +1611,8 @@ const builtinRuleDocs = {
|
|
|
1611
1611
|
defaultOptions: {
|
|
1612
1612
|
checkInlineFunction: false,
|
|
1613
1613
|
checkLocalVariables: false,
|
|
1614
|
-
eventHandlerPrefix: "
|
|
1615
|
-
eventHandlerPropPrefix: "
|
|
1614
|
+
eventHandlerPrefix: "handle",
|
|
1615
|
+
eventHandlerPropPrefix: "on",
|
|
1616
1616
|
ignoreComponentNames: []
|
|
1617
1617
|
},
|
|
1618
1618
|
description: "Ensures that any component or prop methods used to handle events are correctly prefixed."
|
|
@@ -1649,7 +1649,7 @@ const builtinRuleDocs = {
|
|
|
1649
1649
|
"react/jsx-no-target-blank": {
|
|
1650
1650
|
defaultOptions: {
|
|
1651
1651
|
allowReferrer: false,
|
|
1652
|
-
enforceDynamicLinks: "
|
|
1652
|
+
enforceDynamicLinks: "always",
|
|
1653
1653
|
forms: false,
|
|
1654
1654
|
links: true,
|
|
1655
1655
|
warnOnSpreadAttributes: false
|
|
@@ -1673,10 +1673,10 @@ const builtinRuleDocs = {
|
|
|
1673
1673
|
"react/jsx-props-no-spread-multi": { description: "Enforces that any unique expression is only spread once." },
|
|
1674
1674
|
"react/jsx-props-no-spreading": {
|
|
1675
1675
|
defaultOptions: {
|
|
1676
|
-
custom: "
|
|
1676
|
+
custom: "enforce",
|
|
1677
1677
|
exceptions: [],
|
|
1678
|
-
explicitSpread: "
|
|
1679
|
-
html: "
|
|
1678
|
+
explicitSpread: "enforce",
|
|
1679
|
+
html: "enforce"
|
|
1680
1680
|
},
|
|
1681
1681
|
description: "Disallow JSX prop spreading."
|
|
1682
1682
|
},
|
|
@@ -1723,7 +1723,7 @@ const builtinRuleDocs = {
|
|
|
1723
1723
|
defaultOptions: {
|
|
1724
1724
|
allowAsProps: false,
|
|
1725
1725
|
customValidators: [],
|
|
1726
|
-
propNamePattern: "
|
|
1726
|
+
propNamePattern: "render*"
|
|
1727
1727
|
},
|
|
1728
1728
|
description: "Disallows defining React components inside other components."
|
|
1729
1729
|
},
|
|
@@ -1781,7 +1781,7 @@ const builtinRuleDocs = {
|
|
|
1781
1781
|
"typescript/adjacent-overload-signatures": { description: "Require that function overload signatures be consecutive." },
|
|
1782
1782
|
"typescript/array-type": {
|
|
1783
1783
|
defaultOptions: {
|
|
1784
|
-
default: "
|
|
1784
|
+
default: "array",
|
|
1785
1785
|
readonly: null
|
|
1786
1786
|
},
|
|
1787
1787
|
description: "Require consistently using either T[] or Array<T> for arrays."
|
|
@@ -1812,8 +1812,8 @@ const builtinRuleDocs = {
|
|
|
1812
1812
|
"typescript/consistent-type-imports": {
|
|
1813
1813
|
defaultOptions: {
|
|
1814
1814
|
disallowTypeAnnotations: true,
|
|
1815
|
-
fixStyle: "
|
|
1816
|
-
prefer: "
|
|
1815
|
+
fixStyle: "separate-type-imports",
|
|
1816
|
+
prefer: "type-imports"
|
|
1817
1817
|
},
|
|
1818
1818
|
description: "Enforce consistent usage of type imports by adding or removing the type keyword from imports."
|
|
1819
1819
|
},
|
|
@@ -1821,7 +1821,7 @@ const builtinRuleDocs = {
|
|
|
1821
1821
|
defaultOptions: {
|
|
1822
1822
|
allowIndexSignaturePropertyAccess: false,
|
|
1823
1823
|
allowKeywords: true,
|
|
1824
|
-
allowPattern: "
|
|
1824
|
+
allowPattern: "",
|
|
1825
1825
|
allowPrivateClassPropertyAccess: false,
|
|
1826
1826
|
allowProtectedClassPropertyAccess: false
|
|
1827
1827
|
},
|
|
@@ -1897,8 +1897,8 @@ const builtinRuleDocs = {
|
|
|
1897
1897
|
},
|
|
1898
1898
|
"typescript/no-empty-object-type": {
|
|
1899
1899
|
defaultOptions: {
|
|
1900
|
-
allowInterfaces: "
|
|
1901
|
-
allowObjectTypes: "
|
|
1900
|
+
allowInterfaces: "never",
|
|
1901
|
+
allowObjectTypes: "never"
|
|
1902
1902
|
},
|
|
1903
1903
|
description: "To avoid confusion around the {} type allowing any non-nullish value, this rule bans usage of the {} type. That includes interfaces and object type aliases with no fields."
|
|
1904
1904
|
},
|
|
@@ -1951,7 +1951,7 @@ const builtinRuleDocs = {
|
|
|
1951
1951
|
"typescript/no-misused-new": { description: "Enforces valid definitions of new and constructor. This rule prevents classes from defining a method named new, interfaces from defining a method named constructor, and interfaces from defining a construct signature that returns the interface itself." },
|
|
1952
1952
|
"typescript/no-misused-promises": {
|
|
1953
1953
|
defaultOptions: {
|
|
1954
|
-
checksConditionals:
|
|
1954
|
+
checksConditionals: { flagUnions: "none" },
|
|
1955
1955
|
checksSpreads: true,
|
|
1956
1956
|
checksVoidReturn: {
|
|
1957
1957
|
arguments: true,
|
|
@@ -2023,6 +2023,7 @@ const builtinRuleDocs = {
|
|
|
2023
2023
|
"typescript/no-unsafe-argument": { description: "This rule disallows calling a function with an argument which is typed as any." },
|
|
2024
2024
|
"typescript/no-unsafe-assignment": { description: "This rule disallows assigning a value with type any to variables and properties." },
|
|
2025
2025
|
"typescript/no-unsafe-call": { description: "This rule disallows calling a value with type any." },
|
|
2026
|
+
"typescript/no-unsafe-class-instance-assignment": { description: "Disallows using structurally compatible values where an instance of a class or one of its subclasses is expected. It also checks values nested in types such as arrays and promises." },
|
|
2026
2027
|
"typescript/no-unsafe-declaration-merging": { description: "Disallow unsafe declaration merging." },
|
|
2027
2028
|
"typescript/no-unsafe-enum-assignment": { description: "Disallows using values that do not share an enum type where an enum value is expected. This includes assignments, arguments, return values, type assertions, mutations, and computed keys in objects keyed by enum members." },
|
|
2028
2029
|
"typescript/no-unsafe-enum-comparison": { description: "This rule disallows comparing an enum value with a non-enum value." },
|
|
@@ -2051,7 +2052,7 @@ const builtinRuleDocs = {
|
|
|
2051
2052
|
"typescript/parameter-properties": {
|
|
2052
2053
|
defaultOptions: {
|
|
2053
2054
|
allow: [],
|
|
2054
|
-
prefer: "
|
|
2055
|
+
prefer: "class-property"
|
|
2055
2056
|
},
|
|
2056
2057
|
description: "Requires or disallows parameter properties in class constructors."
|
|
2057
2058
|
},
|
|
@@ -2121,7 +2122,7 @@ const builtinRuleDocs = {
|
|
|
2121
2122
|
"typescript/prefer-regexp-exec": { description: "Prefer RegExp#exec() over String#match() when extracting a regex match." },
|
|
2122
2123
|
"typescript/prefer-return-this-type": { description: "This rule enforces using this types for return types when possible." },
|
|
2123
2124
|
"typescript/prefer-string-starts-ends-with": {
|
|
2124
|
-
defaultOptions: { allowSingleElementEquality: "
|
|
2125
|
+
defaultOptions: { allowSingleElementEquality: "never" },
|
|
2125
2126
|
description: "Prefer startsWith and endsWith over manual string boundary checks."
|
|
2126
2127
|
},
|
|
2127
2128
|
"typescript/prefer-ts-expect-error": { description: "Enforce using @ts-expect-error over @ts-ignore." },
|
|
@@ -2201,9 +2202,9 @@ const builtinRuleDocs = {
|
|
|
2201
2202
|
},
|
|
2202
2203
|
"typescript/triple-slash-reference": {
|
|
2203
2204
|
defaultOptions: {
|
|
2204
|
-
lib: "
|
|
2205
|
-
path: "
|
|
2206
|
-
types: "
|
|
2205
|
+
lib: "always",
|
|
2206
|
+
path: "never",
|
|
2207
|
+
types: "prefer-import"
|
|
2207
2208
|
},
|
|
2208
2209
|
description: "Disallow certain triple slash directives in favor of ES module import declarations."
|
|
2209
2210
|
},
|
|
@@ -2220,7 +2221,7 @@ const builtinRuleDocs = {
|
|
|
2220
2221
|
},
|
|
2221
2222
|
"typescript/use-unknown-in-catch-callback-variable": { description: "This rule enforces using unknown for catch clause variables instead of any." },
|
|
2222
2223
|
"unicorn/catch-error-name": {
|
|
2223
|
-
defaultOptions: { name: "
|
|
2224
|
+
defaultOptions: { name: "error" },
|
|
2224
2225
|
description: "This rule enforces consistent and descriptive naming for error variables in catch statements, preventing the use of vague names like badName or _ when the error is used."
|
|
2225
2226
|
},
|
|
2226
2227
|
"unicorn/consistent-assert": { description: "Enforces consistent usage of the assert module." },
|
|
@@ -2237,7 +2238,7 @@ const builtinRuleDocs = {
|
|
|
2237
2238
|
"unicorn/error-message": { description: "Enforces providing a message when creating built-in Error objects to improve readability and debugging." },
|
|
2238
2239
|
"unicorn/escape-case": { description: "Enforces defining escape sequence values with uppercase characters rather than lowercase ones. This promotes readability by making the escaped value more distinguishable from the identifier." },
|
|
2239
2240
|
"unicorn/explicit-length-check": {
|
|
2240
|
-
defaultOptions: { "non-zero": "
|
|
2241
|
+
defaultOptions: { "non-zero": "greater-than" },
|
|
2241
2242
|
description: "Enforce explicitly comparing the length or size property of a value."
|
|
2242
2243
|
},
|
|
2243
2244
|
"unicorn/explicit-timer-delay": { description: "Enforce or disallow explicit delay argument for setTimeout() and setInterval()." },
|
|
@@ -2300,7 +2301,7 @@ const builtinRuleDocs = {
|
|
|
2300
2301
|
defaultOptions: {
|
|
2301
2302
|
exclude: [],
|
|
2302
2303
|
include: [],
|
|
2303
|
-
strategy: "
|
|
2304
|
+
strategy: "loose",
|
|
2304
2305
|
useErrorIsError: false
|
|
2305
2306
|
},
|
|
2306
2307
|
description: "Disallows the use of instanceof with ECMAScript built-in constructors because:"
|
|
@@ -2480,13 +2481,13 @@ const builtinRuleDocs = {
|
|
|
2480
2481
|
"vitest/consistent-test-filename": { description: "This rule triggers an error when a file is considered a test file, but its name does not match an expected filename format." },
|
|
2481
2482
|
"vitest/consistent-test-it": {
|
|
2482
2483
|
defaultOptions: {
|
|
2483
|
-
fn: "
|
|
2484
|
-
withinDescribe: "
|
|
2484
|
+
fn: "test",
|
|
2485
|
+
withinDescribe: "it"
|
|
2485
2486
|
},
|
|
2486
2487
|
description: "Vitest allows you to choose how you want to define your tests, using the it or the test keywords, with multiple permutations for each:"
|
|
2487
2488
|
},
|
|
2488
2489
|
"vitest/consistent-vitest-vi": {
|
|
2489
|
-
defaultOptions: { fn: "
|
|
2490
|
+
defaultOptions: { fn: "vi" },
|
|
2490
2491
|
description: "This rule triggers an error when an unexpected Vitest accessor is used."
|
|
2491
2492
|
},
|
|
2492
2493
|
"vitest/expect-expect": {
|
|
@@ -2544,7 +2545,7 @@ const builtinRuleDocs = {
|
|
|
2544
2545
|
"vitest/prefer-called-exactly-once-with": { description: "It checks when a target is asserted with both toHaveBeenCalledOnce and toHaveBeenCalledWith instead of toHaveBeenCalledExactlyOnceWith." },
|
|
2545
2546
|
"vitest/prefer-called-once": { description: "Substitute toBeCalledTimes(1) and toHaveBeenCalledTimes(1) with toBeCalledOnce() and toHaveBeenCalledOnce() respectively." },
|
|
2546
2547
|
"vitest/prefer-called-times": { description: "This rule aims to enforce the use of toBeCalledTimes(1) or toHaveBeenCalledTimes(1) over toBeCalledOnce() or toHaveBeenCalledOnce()." },
|
|
2547
|
-
"vitest/prefer-called-with": { description: "Suggest using toBeCalledWith() or toHaveBeenCalledWith()" },
|
|
2548
|
+
"vitest/prefer-called-with": { description: "Suggest using toBeCalledWith() or toHaveBeenCalledWith()." },
|
|
2548
2549
|
"vitest/prefer-comparison-matcher": { description: "This rule checks for comparisons in tests that could be replaced with one of the following built-in comparison matchers:" },
|
|
2549
2550
|
"vitest/prefer-describe-function-title": { description: "When testing a specific function, this rule aims to enforce passing a named function to describe() instead of an equivalent hardcoded string." },
|
|
2550
2551
|
"vitest/prefer-each": { description: "This rule enforces using each rather than manual loops." },
|
|
@@ -2576,7 +2577,7 @@ const builtinRuleDocs = {
|
|
|
2576
2577
|
"vitest/prefer-mock-return-shorthand": { description: "When working with mocks of functions that return simple values, Jest provides some API sugar functions to reduce the amount of boilerplate you have to write." },
|
|
2577
2578
|
"vitest/prefer-snapshot-hint": { description: "Enforces including a hint string with snapshot matchers (toMatchSnapshot and toThrowErrorMatchingSnapshot)." },
|
|
2578
2579
|
"vitest/prefer-spy-on": { description: "When mocking a function by overwriting a property you have to manually restore the original implementation when cleaning up. When using jest.spyOn() Jest keeps track of changes, and they can be restored with jest.restoreAllMocks(), mockFn.mockRestore() or by setting restoreMocks to true in the Jest config." },
|
|
2579
|
-
"vitest/prefer-strict-boolean-matchers": { description: "
|
|
2580
|
+
"vitest/prefer-strict-boolean-matchers": { description: "This rule warns when toBeTruthy() or toBeFalsy() is used with expect or expectTypeOf. With --fix-suggestions, it will be replaced with toBe(true) or toBe(false)." },
|
|
2580
2581
|
"vitest/prefer-strict-equal": { description: "This rule triggers a warning if toEqual() is used to assert equality." },
|
|
2581
2582
|
"vitest/prefer-to-be": { description: "Recommends using toBe matcher for primitive literals and specific matchers for null, undefined, and NaN." },
|
|
2582
2583
|
"vitest/prefer-to-be-falsy": { description: "This rule warns when toBe(false) is used with expect or expectTypeOf. With --fix-suggestions, it will be replaced with toBeFalsy()." },
|
|
@@ -2610,7 +2611,7 @@ const builtinRuleDocs = {
|
|
|
2610
2611
|
maxArgs: 1,
|
|
2611
2612
|
minArgs: 1
|
|
2612
2613
|
},
|
|
2613
|
-
description: "Checks that expect() is called correctly."
|
|
2614
|
+
description: "Checks that expect() is called correctly. vitest/valid-expect also checks that expectTypeOf() calls use valid modifiers and invoke a matcher."
|
|
2614
2615
|
},
|
|
2615
2616
|
"vitest/valid-expect-in-promise": { description: "Ensures that expect calls inside promise chains (.then(), .catch(), .finally()) are properly awaited or returned from the test." },
|
|
2616
2617
|
"vitest/valid-title": { description: "Checks that the titles of Jest and Vitest blocks are valid." },
|
|
@@ -2619,7 +2620,7 @@ const builtinRuleDocs = {
|
|
|
2619
2620
|
"vue/define-emits-declaration": { description: "Enforce consistent declaration style for defineEmits in Vue. This rule only works in <script setup> with lang=\"ts\"." },
|
|
2620
2621
|
"vue/define-props-declaration": { description: "Enforce consistent declaration style for defineProps in Vue. This rule only works in <script setup> with lang=\"ts\"." },
|
|
2621
2622
|
"vue/define-props-destructuring": {
|
|
2622
|
-
defaultOptions: { destructure: "
|
|
2623
|
+
defaultOptions: { destructure: "only-when-assigned" },
|
|
2623
2624
|
description: "This rule enforces a consistent style for handling Vue 3 Composition API props, allowing you to choose between requiring destructuring or prohibiting it."
|
|
2624
2625
|
},
|
|
2625
2626
|
"vue/max-props": {
|