oxc-project/oxc

Documented errors, page 2 of 12. Back to oxc-project/oxc

Code / MessageTypeSeverityTags
Unexpected control characters
validation warning lint, regex, control-characters, invisible-characters, oxlint
Use a regular expression literal instead of the `RegExp`…
validation warning eslint, oxlint, regex, style, lint
Type can be trivially inferred from the initializer
validation warning typescript, type-inference, redundant-code, oxlint, lint, style
Unexpected empty named `import` block.
validation warning lint, oxlint, imports, dead-code, autofix, suspicious
Props are not defined.
validation error vue, script-setup, compiler-macro, defineprops, lint, missing-argument
Class component should be written as a function component.
validation error
Unexpected combining class in character class.
validation warning lint, regex, unicode, combining-marks, normalization, javascript
Use either `checked` or `defaultChecked`, but not both.
validation warning react, jsx, lint, controlled-components, forms, oxlint
Use of incorrect `href` for the 'a' element.
validation error jsx-a11y, accessibility, anchor, href, react, lint, oxlint
Fixed size allocators are only supported on 64-bit…
panic warning vue, oxlint, lint, props, type, constructor, autofix
State initialization should be in a class property
validation error
This overload can be combined with another overload into…
validation error
`Promise. ()` requires 0 or 1 arguments, but received .
validation error promise, async, lint, arguments, oxlint
Property should be declared as a parameter property.
validation error
React Hook does nothing when called with only one argument.
validation error
Don't use a zero fraction in the number.
validation warning lint, oxlint, unicorn, number-literal, style, autofix
Expected a conditional expression and instead saw an…
validation error lint, assignment, condition, typo, oxlint
Promise in `Promise.
validation warning async-await, promise, concurrency, oxlint
eval can be harmful.
validation warning javascript, eslint, lint, security, eval
Fast refresh only works when a file only exports…
validation error
Replace default import with named import.
console warning lint, oxlint, imports, default-export, import-syntax, style
Do not call `Object.assign()` immediately after…
validation warning objects, style, code-quality, oxlint
JSX nesting depth of
validation warning react, jsx, nesting-depth, refactoring, style, oxlint, lint
react-hooks
Functions returned from `useEffectEvent` must not be included in the dependency…
validation error
an interface declaring no members is equivalent to its…
validation warning typescript, lint, interface, inheritance, oxlint
Arbitrary module namespace identifier names are not…
validation error oxc, transformer, es2022, modules, import, compile-target
Do not assign a property immediately after initializing an…
validation warning objects, style, code-quality, oxlint
Expected a literal string or immutable template literal
validation warning lint, oxlint, imports, dynamic-require, static-analysis, bundling
Function ' ' has too many parameters ( ). Maximum allowed…
validation warning eslint, oxlint, complexity, function-signature, parameters
Shadowing of global properties such as `undefined` is not…
validation error eslint, oxlint, no-shadow-restricted-names, restricted-globals, scope, strict-mode
The Context `value` prop should not be constructed.
validation warning react, context, performance, rerender, usememo, oxlint, lint
Misrefactored assign op. Variable appears on both sides of…
validation error oxlint, oxc, assignment, refactoring, logic-bug, javascript
No magic number
validation warning lint, javascript, magic-numbers, readability, style
The is useless
validation warning lint, oxlint, unicorn, set, map, weakmap, dead-code, style
`alert`, `confirm` and `prompt` functions are not allowed
validation warning eslint, oxlint, browser, debugging, ui, restriction
{error_message:?}
validation warning jest, jasmine, migration, oxlint, lint
Redundant super call in constructor
validation warning lint, eslint, oxlint, class, constructor, super
React 19 disallows `javascript:` URLs as a security…
validation error react, jsx, security, xss, javascript-url, react-19, oxlint, lint
TS1203
Export assignment cannot be used when targeting ECMAScript modules.
error_code error oxc, typescript, transformer, esm, commonjs, ts1203
All `if` blocks contain the same code at the start
validation warning oxlint, oxc, code-duplication, pedantic, javascript, static-analysis
Props are defined in both `defineProps` and `export default
validation error vue, script-setup, compiler-macro, defineprops, options-api, lint, duplicate-declaration
The catch parameter should be named
validation warning oxlint, lint, unicorn, naming, error-handling
Unexpected aliasing of members of 'this' to local variables.
validation error
Prefer using method from
validation error
TS5042
Option 'project' cannot be mixed with source files on a command line.
validation error vue, oxlint, lint, script-setup, defineemits, compiler-macro, hoisting
Your `render` method should have a `return` statement.
validation error
Expected a `for...of` loop instead of a `for` loop with…
validation error
The has too many lines ( ). Maximum allowed is .
validation warning eslint, oxlint, complexity, function-length, refactor
Variable or `function` declarations are not allowed in…
validation error eslint, oxlint, lint, hoisting, scope, functions
Do not call ` ()` immediately after initializing an array.
validation warning arrays, style, code-quality, oxlint
Require statement not part of import statement.
validation error
Unexpected lexical declaration in case block.
validation error lint, switch, scope, lexical-declaration, oxlint
Unexpected side effect in computed function.
validation warning vue, computed, lint, side-effects, composition-api
Components should use an ES2015 class instead of…
validation error
Do not mix 'require' and other declarations.
validation warning node, commonjs, require, style, oxlint
useState call is not destructured into value + setter pair
validation error
`expect` is shadowed by a callback parameter and cannot be…
validation warning jest, vitest, oxlint, testing, variable-shadowing, static-analysis
Expected to always call `super()` before `this`/`super`…
validation error eslint, oxlint, no-this-before-super, classes, inheritance, constructor, control-flow
IIFE with parenthesized arrow function body is considered…
validation warning lint, oxlint, unicorn, iife, arrow-function, readability, pedantic
Expected ' ' syntax before ' ' syntax.
validation info eslint, oxlint, imports, sorting, style, lint
Invalid fix capabilities. Did you mean 'fix'?
panic warning vue, oxlint, lint, computed, control-flow, options-api
Key ` ` is reserved.
validation warning vue, naming, lint, reserved-keys, options-api
Missing JSDoc `@yields` declaration for generator function.
validation warning jsdoc, generator, documentation, lint, oxlint
Math.min and Math.max combination leads to constant result
validation error oxlint, oxc, math, clamp, logic-bug, javascript
`nextTick` expects zero or one parameters.
validation error vue, nexttick, lint, too-many-arguments
Combine this with the previous
validation warning oxlint, eslint, style, variables, declaration
This comparison will always evaluate to
validation error oxlint, oxc, comparison, logic-bug, javascript, operator-precedence
Unexpected irregular whitespace
validation warning lint, whitespace, unicode, javascript, copy-paste
`model` definition is deprecated.
validation warning vue, oxlint, lint, v-model, vue3, migration, deprecated
Prefer `toHaveBeenCalledTimes()` over `toHaveLength()` when…
validation warning jest, vitest, oxlint, mock, autofix
Value must be omitted for boolean attribute
validation error
Duplicate key ' ' found in JSX elements
validation error react, jsx, list-key, duplicate-key, reconciliation, oxlint, lint
Imported module should be assigned
console warning lint, import, side-effects, oxlint, esm
Stateless functional components should not use `this`
validation error
`React` must be in scope when using JSX.
validation error
Unexpected re-assignment of `const` variable
validation critical lint, const, assignment, runtime-error, oxlint
Void DOM element < /> cannot receive children.
validation error
`defineProps` has both a type-only emit and an argument.
validation error vue, typescript, script-setup, compiler-macro, defineprops, lint
Require setup and teardown code to be within a hook.
validation warning jest, vitest, oxlint, hooks, test-structure
TypeScript will only remove the inline type specifiers…
validation warning typescript, lint, imports, tree-shaking, autofix
Invalid character comparison
validation error oxc, javascript, string, comparison, logic-bug, dead-code, oxlint
Empty exports do nothing in module files
validation error
JSX component must be in PascalCase or SCREAMING_SNAKE_CASE
validation warning react, jsx, naming-convention, pascalcase, oxlint, lint
Prefer mock resolved/rejected shorthands for promises.
validation warning jest, vitest, mocking, promises, style, oxlint, lint
React Hook has unnecessary dependency
validation error
Avoid using `.length` as the index in `Array#with()`.
validation error arrays, es2023, runtime-error, bug, oxlint
Avoid wrapping return values in Promise.resolve
validation warning promise, async, lint, code-style, oxlint
Do not mix core, module, file and computed requires.
validation warning node, commonjs, require, style, oxlint
Do not use `setState` in `componentWillUpdate`.
validation error
This number literal will lose precision at runtime.
validation error lint, javascript, numbers, ieee-754, precision, bigint, correctness
Unexpected `super()` because `super` is not a constructor.
validation error eslint, oxlint, class, super, extends, typeerror
Lifecycle hook ` ` is called after `await` in `setup()`.
validation error vue, async-await, lifecycle, lint, script-setup
Unexpected use of ` `.
validation warning lint, bitwise, stylistic, config, oxlint
Expected to always return a value in getter.
validation error eslint, oxlint, getter, return-value, possible-error
TS5081
Cannot find a tsconfig.json file at the current directory
validation error vue, oxlint, lint, script-setup, defineemits, compiler-macro, options-api
Exporting mutable ' ' binding, use 'const' instead.
validation warning lint, oxlint, imports, export, mutability, esm, style
function ` ` has too many statements ( ). Maximum allowed…
validation warning eslint, oxlint, complexity, function-length, statements
No async describe callback
validation error jest, vitest, oxlint, describe, async
Unexpected comparison of two newly constructed objects
validation error lint, reference-equality, loose-equality, dead-code, oxlint
"body" is not allowed when method is
validation error fetch, http, runtime-error, browser, typescript, oxlint