oxc-project/oxc
Documented errors, page 4 of 12. Back to oxc-project/oxc
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| The function is equivalent to | validation | error | |
| This overload can be combined with another overload into… | validation | warning | oxlint, lint, typescript, overloads, optional-parameters, style |
| ` ` can be escaped with | validation | error | |
| An iframe element defines a sandbox attribute with invalid… | validation | error | |
| Assign literal to a variable before exporting as module… | validation | warning | lint, oxlint, imports, default-export, literals, template-literal, style |
| Label in continue statement is not allowed | validation | warning | lint, javascript, labels, continue, control-flow, style |
| `VirtualFree` failed | panic | warning | vue, oxlint, lint, sfc, default-export, script |
| Bad array method on `arguments`. | validation | error | oxc, javascript, arguments, array-methods, runtime-error, oxlint |
| React Hook cannot be called inside a callback. React Hooks… | validation | error | react, hooks, rules-of-hooks, oxlint, lint, correctness |
| Unexpected surrogate pair in character class. | validation | warning | lint, regex, unicode, surrogate-pairs, emoji, javascript |
| Do not use `arguments. | validation | error | lint, deprecated-api, strict-mode, arguments-object, oxlint |
| ` ` is forbidden after an `await` expression. | validation | warning | vue, async-await, script-setup, lint, expose |
| Unnecessary closing tag | validation | error | |
| Unnecessary `.getTime()` call | validation | warning | oxlint, lint, unicorn, date, refactor |
| Expected to be before . | validation | warning | eslint, oxlint, style, accessor, getter, setter, object-literal |
| Global flag (g) is missing in the regular expression… | validation | error | oxlint, oxc, regexp, matchall, static-analysis, javascript |
| Interactive elements should not be assigned non-interactive… | validation | warning | jsx-a11y, react, accessibility, aria-roles, lint |
| Lacked a call of `super()` in some code paths. | validation | error | eslint, oxlint, class, super, constructor, control-flow |
| The attribute ` ` is not supported by the role ` `. | validation | warning | jsx-a11y, react, accessibility, aria, aria-roles, lint |
| This function does not use any variables from its parent… | validation | warning | oxlint, lint, unicorn, scoping, functions, performance |
| ' ' was used before it was defined. | validation | warning | eslint, oxlint, hoisting, tdz, declaration-order |
| Prefer negative index over `.length - index` when possible. | validation | error | |
| `tabIndex` should only be declared on interactive elements. | validation | warning | jsx-a11y, react, accessibility, tabindex, keyboard-navigation, lint |
| Fast refresh only works when a file only exports… | validation | error | |
| invalid fix capabilities | panic | error | vue, oxlint, lint, emits, validator, falsy-return |
| Do not access a member directly from an await expression. | validation | warning | async-await, style, readability, oxlint |
| Missing name in `@property` tag. | validation | error | |
| Prefer class field declaration over `this` assignment in… | validation | warning | oxlint, unicorn, classes, modernization, refactor |
| Unexpected `await` inside a loop. | validation | warning | lint, async, performance, promise, oxlint |
| `defineOptions` has been called multiple times. | validation | error | vue, script-setup, compiler-macro, defineoptions, lint, duplicate-call |
| Inline helpers are not supported yet | panic | error | vue, oxlint, lint, script-setup, defineemits, compiler-macro |
| Unexpected return statement in constructor. | validation | error | lint, constructor, class, return-value, oxlint |
| Expect must have a corresponding matcher call. | validation | error | jest, vitest, oxlint, expect, assertion, vacuous-test |
| Invalid regular expression: Duplicated flag | validation | error | regex, lint, javascript, syntax-error, flags |
| Prefer consistent types when spreading a ternary in an… | validation | warning | oxlint, lint, unicorn, arrays, spread, types |
| React Hook contains a call to setState. Without a list of… | validation | error | |
| all spread attributes are treated as if they contain an… | validation | warning | react, security, spread-props, tabnabbing, oxlint, lint |
| Unexpected sync method | validation | warning | node, async, performance, event-loop, oxlint |
| Using string literals in ref attributes is deprecated. | validation | error | |
| An `iframe` element defines a sandbox attribute with both… | validation | error | |
| Missing throw | validation | error | oxlint, oxc, error-handling, logic-bug, javascript, static-analysis |
| Second argument must be a function | validation | error | jest, vitest, oxlint, describe, validation |
| This rule can't verify that `export *` only exports… | validation | error | |
| Do not spread accumulators in loops | validation | warning | oxlint, performance, loop, object-spread, quadratic-complexity |
| Useless case in switch statement. | validation | warning | lint, oxlint, unicorn, switch, fall-through, dead-code, pedantic |
| Prefer ternary expressions over simple `if-else` statements. | validation | warning | oxlint, unicorn, style, ternary, conditional |
| The ` ` lifecycle hook is deprecated. Use ` ` instead. | validation | error | vue, oxlint, lint, lifecycle, vue3, migration, deprecated, memory-leak |
| Use ` ` instead. | validation | warning | jest, vitest, test-focus, style, oxlint, lint |
| Import the following Jest functions from `@jest/globals | validation | warning | lint, jest, testing, imports, globals, autofix, oxlint |
| Magic number for `Array.prototype.flat` depth is not… | validation | warning | arrays, magic-numbers, readability, oxlint |
| Missing return type on function. | validation | warning | typescript, lint, annotations, return-type, oxlint |
| Prefer ` `. | validation | error | |
| The ` ` element has an implicit role of ` `. Defining this… | validation | warning | jsx-a11y, react, accessibility, aria-roles, lint |
| Disallowed usage of `process.env`. | validation | warning | node, configuration, environment-variables, restriction, oxlint |
| Mocks should not be manually imported from a `__mocks__`… | validation | warning | jest, vitest, oxlint, testing, mocks, imports |
| Unexpected use of `new` operator with `require` | validation | warning | node, commonjs, require, constructor, oxlint |
| Avoid using a negative index with `Array#with()`. | validation | warning | arrays, es2023, suspicious-code, oxlint |
| Disallow using `Object.assign` with an object literal as… | validation | warning | oxlint, eslint, es2018, objects, spread, modernization |
| Do not construct dirname. | validation | error | |
| Empty array binding pattern | validation | warning | eslint, destructuring, oxlint, lint, correctness |
| Enforces a maximum depth to nested describe calls. | validation | warning | jest, vitest, oxlint, testing, nesting, describe |
| Every test should have either | validation | warning | lint, jest, testing, assertions, autofix, oxlint |
| Missing "key" prop for element in array. | validation | error | react, jsx, list-key, reconciliation, oxlint, lint |
| No duplicate polyfills from Polyfill.io are allowed. | validation | warning | nextjs, polyfill, security, performance, lint |
| Use of ` ` is disallowed | validation | warning | jest, vitest, oxlint, testing, matchers, config, restricted-api |
| Encountered same-named class field declaration and `this`… | validation | warning | oxlint, unicorn, classes, dead-code, refactor |
| Standard form for React fragments is preferred. | validation | error | |
| Test must end with an assertion | validation | warning | lint, jest, testing, assertions, oxlint |
| Unexpected access to `module.exports`. | validation | info | node, commonjs, exports, style, oxlint |
| Usage of namespaced aka wildcard \"*\" imports prohibited | console | warning | lint, oxlint, imports, namespace-import, tree-shaking, style |
| Using a spread operator here creates a new array… | validation | warning | lint, oxlint, unicorn, spread, function-calls, arguments, correctness |
| an empty interface is equivalent to | validation | warning | typescript, lint, interface, type-safety, oxlint |
| Do not use string interpolation inside of snapshots | validation | warning | jest, vitest, oxlint, testing, snapshots, interpolation, template-literal |
| Unexpected Unicode BOM (Byte Order Mark) | validation | warning | eslint, oxlint, unicode, bom, encoding, lint |
| Use uppercase characters for the value of the escape… | validation | warning | oxlint, lint, unicorn, strings, regex, style |
| Unexpected multiple arguments. | validation | warning | vue, slots, lint, render-function |
| Unexpected var, use let or const instead. | validation | warning | lint, eslint, oxlint, variables, scoping, javascript |
| Ambiguous text within anchor, screen reader users rely on… | validation | warning | jsx-a11y, accessibility, link-text, screen-reader, react, lint, oxlint |
| `jest.mock()` factories should not be used without an… | console | warning | lint, jest, typescript, mocking, testing, oxlint |
| Use an `import` instead of an `import type`. | validation | warning | typescript, lint, imports, type-import, oxlint |
| All `if` blocks contain the same code at the end | validation | warning | oxlint, oxc, code-duplication, pedantic, javascript, static-analysis |
| Do not use `new` on `Promise. | validation | error | promise, async, lint, runtime-error, oxlint |
| Error message should be a string. | validation | warning | oxlint, lint, unicorn, errors, types |
| Passing a fragment to a HTML element is useless. | validation | warning | react, jsx, fragment, html-element, autofix, oxlint, lint |
| React does not recognize data-* props with uppercase… | validation | error | |
| Unexpected spread argument. | validation | warning | vue, slots, lint, spread, render-function |
| Backreference ' ' will be ignored. It references group ' '… | validation | warning | lint, eslint, oxlint, regex, lookbehind |
| ES2015 module syntax is preferred over namespaces. | validation | warning | typescript, namespace, modules, modernization, oxlint, lint |
| Object keys should be sorted | validation | info | eslint, oxlint, sorting, objects, style, lint |
| Redundant double negation | validation | warning | javascript, eslint, lint, boolean, autofix |
| The attribute ` ` is not supported by the role ` `. This… | validation | warning | jsx-a11y, react, accessibility, aria, aria-roles, lint |
| Use the rest parameters instead of `arguments`. | validation | warning | eslint, oxlint, es6, modernization, lint |
| Backreference ' ' will be ignored. It references group ' '… | validation | warning | lint, eslint, oxlint, regex, negative-lookahead |
| No spaces inside empty pair of braces allowed | validation | warning | oxlint, lint, unicorn, formatting, whitespace, style |
| Suggest using `toBeCalledWith()` or… | validation | warning | jest, vitest, oxlint, testing, mocks, assertions, static-analysis |
| This overload can be combined with another overload into… | validation | warning | oxlint, lint, typescript, overloads, rest-parameter, style |
| Unexpected declaration in the global scope. | validation | warning | oxlint, lint, globals, scope, scripts |
| Function name ` ` should match property name ` `. | validation | warning | eslint, oxlint, naming, function-expression |
| Prefer `String#replaceAll()` over `String#replace()` when… | validation | warning | oxlint, unicorn, string, regex, es2021 |
| Confusing combinations of non-null assertion and assignment… | validation | warning | typescript, lint, non-null-assertion, assignment, oxlint |