oxc-project/oxc

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

Code / MessageTypeSeverityTags
Expected error to be handled.
validation warning node, callbacks, error-handling, oxlint, lint, restriction
function has too many statements
validation warning eslint, oxlint, complexity, function-length, statements, anonymous-function
unexpected commas in middle of array
validation warning eslint, oxlint, no-sparse-arrays, arrays, holes, aggregate-diagnostic
Do not call `.add()` immediately after initializing a Set.
validation warning set, collections, style, oxlint
Identifier ' ' is restricted.
validation warning eslint, oxlint, style, naming, identifier, denylist
Missing return type on function
validation warning typescript, lint, annotations, return-type, api-design, oxlint
Object declaration on `data` property is deprecated.
validation warning vue, oxlint, lint, options-api, data, vue3, migration, deprecated
Always prefer `const x: T =
validation warning typescript, oxlint, lint, type-assertion, object-literal, type-safety
Avoid using `withDefaults` with destructuring.
validation warning vue, oxlint, lint, script-setup, withdefaults, defineprops, destructuring
Prefer `Object.fromEntries` over manual object construction…
validation error
Missing JSDoc `@returns` description.
validation warning jsdoc, documentation, lint, oxlint
Use `structuredClone(…)` to create a deep clone.
validation warning oxlint, unicorn, deep-clone, structured-clone, json-pitfalls
Identifier '# ' is restricted.
validation warning eslint, oxlint, style, naming, private-class-fields, denylist
`VirtualFree` failed during cleanup
panic warning vue, oxlint, lint, props, naming, style, defineprops
Backreference ' ' will be ignored. It references group ' '…
validation warning lint, eslint, oxlint, regex, static-analysis
Jest tests should not return a value
validation warning jest, vitest, oxlint, testing, async-await, static-analysis
Label in break statement is not allowed
validation warning lint, javascript, labels, break, control-flow, style
Prefer re-exporting directly from the source module.
validation error
Prop " " is forbidden on DOM Nodes
validation error
Suggest having hooks before any test cases.
validation warning jest, vitest, oxlint, testing, lifecycle-hooks, static-analysis
Use `path.join()` or `path.resolve()` instead of string…
validation warning node, filesystem, cross-platform, windows, oxlint
Using target=`_blank` without rel=`noreferrer` or…
validation warning react, security, tabnabbing, noopener, oxlint, lint
Do not call `.set()` immediately after initializing a Map.
validation warning map, collections, style, oxlint
Prefer `await expect(...).resolves` over `expect(await…
validation warning jest, vitest, oxlint, testing, async-await, promises, static-analysis
Too many nested callbacks
validation warning eslint, oxlint, complexity, callbacks, async, callback-hell
Unexpected double comparisons.
validation warning oxlint, oxc, comparison, simplification, javascript, static-analysis
Unexpected empty
validation warning javascript, eslint, lint, functions, stub-code
Cannot create a `NonEmptyStack` from an empty iterator
panic warning vue, oxlint, lint, render, jsx, control-flow
Duplicate in describe block.
validation warning jest, vitest, oxlint, testing, hooks, duplicates
Named exports are not allowed.
console warning lint, oxlint, imports, named-export, style-policy, api-design
Read-only global ' ' should not be modified.
validation error eslint, oxlint, lint, globals, readonly
Suggest using the built-in equality matchers.
validation warning jest, vitest, oxlint, testing, assertions, equality, autofix, static-analysis
Unexpected newline between object and open bracket of…
validation error eslint, oxlint, no-unexpected-multiline, asi, semicolons, computed-member
Async assertions must be awaited.
validation warning jest, vitest, oxlint, testing, async, await, promise, valid-expect
Do not rename import, export, or destructured assignments…
validation warning lint, eslint, oxlint, imports, exports, destructuring
Global flag (g) is missing in the regular expression…
validation error oxlint, oxc, regexp, replaceall, javascript, static-analysis
Suggest using `toStrictEqual()`.
validation warning jest, vitest, oxlint, matcher, equality
Unexpected array literal comparison.
validation error oxlint, oxc, equality, array, javascript, logic-bug
Unexpected console statement.
validation warning lint, console, logging, config, oxlint
Unexpected string concatenation.
validation info eslint, oxlint, template-literals, strings, lint
Blocks are nested too deeply
validation warning eslint, oxlint, complexity, nesting, refactor
Prefer using the `node:` protocol when importing Node.js…
validation error
Backreference ' ' will be ignored. It references group ' '…
validation warning eslint, oxlint, regex, backreference
Imports should be sorted alphabetically.
validation info eslint, oxlint, imports, sorting, style, lint
Include a description after the @ts
validation warning typescript, oxlint, lint, ts-ignore, suppression, comment-directive
' ' is a function.
validation error eslint, oxlint, lint, functions, assignment
Test hooks are not in a consistent order.
validation warning jest, vitest, oxlint, testing, lifecycle-hooks, static-analysis
Use the 'u' flag.
validation warning eslint, oxlint, regex, unicode, lint
Do not import Node.js builtin module
console warning lint, oxlint, imports, nodejs, browser-compatibility, isomorphic
invalid fix kind: . Valid fix kinds are fix, suggestion, or…
panic error vue, oxlint, lint, script-setup, defineemits, compiler-macro, typescript
Key ` ` is reserved in ` ` group.
validation warning vue, naming, lint, reserved-keys, options-api
next/script's `beforeInteractive` strategy should not be…
validation warning nextjs, next-script, pages-router, lint
Number constants declarations must use 'const'.
validation warning lint, javascript, const, style, magic-numbers
Passing `length` as the end argument of a `slice` call is…
validation warning arrays, strings, redundant-code, style, oxlint
`defineOptions()` cannot accept type arguments.
validation error vue, typescript, script-setup, compiler-macro, defineoptions, lint
Some tests appear to be inside comments.
validation warning jest, vitest, oxlint, testing, comments, dead-code
Use `.key` instead of `.
validation error
Arrow function has too many parameters
validation warning eslint, oxlint, complexity, arrow-function, parameters
Prefer using a logical operator over a ternary.
validation error
Use Object destructuring.
validation warning oxlint, eslint, style, destructuring, es6
A `require()` style import is forbidden.
console warning lint, require, commonjs, side-effects, oxlint
Prefer Array#flat() over legacy techniques to flatten…
validation warning oxlint, unicorn, arrays, es2019, refactor, autofix
Prefer `globalThis` over environment-specific global…
validation error
Prefer using `dataset` over `getAttribute`.
validation error
Prefer using `dataset` over `setAttribute`.
validation error
` cannot contain ES module exports.
validation error vue, script-setup, lint, module-syntax, sfc
The arrow function in the callback of the array is…
validation error
Both sides of the logical operator are the same
validation warning oxlint, oxc, conditions, logic, javascript, static-analysis
Prefer `Date.now()` over
validation error
Prefer default export on a file with single export.
console warning lint, import, export, style, esm, oxlint
Unnecessary use of boolean literals in conditional…
validation warning eslint, oxlint, no-unneeded-ternary, ternary, boolean, style
Expected longform method syntax.
validation warning oxlint, eslint, style, object-literal, es6
Expected Symbol to have a description.
validation warning eslint, oxlint, symbol, debugging, lint
Options are not defined.
validation error vue, script-setup, compiler-macro, defineoptions, lint, missing-argument
Use `Array.isArray()` instead of `instanceof Array`.
validation warning arrays, cross-realm, browser, nodejs, oxlint
Found a useless array length check
validation warning lint, oxlint, unicorn, array, boolean-logic, redundant-check, correctness
Prefer `catch` to `then(a, b)` or `then(null, b)`
validation warning promise, async, lint, error-handling, oxlint
Combine this with the previous
validation warning oxlint, eslint, style, variables, declaration
Expected longform method syntax for string literal keys.
validation warning lint, eslint, oxlint, object-literal, shorthand, quoted-keys
Prefer `EventTarget` over `EventEmitter`.
validation error
The function binding is unnecessary.
validation warning javascript, eslint, lint, functions, this-binding
Disallow literal text as JSX children
validation warning react, jsx, i18n, string-literals, restriction, oxlint, lint
Do not use the operator to compare against -0.
validation warning lint, negative-zero, equality, floating-point, oxlint
Prefer `includes()` over `indexOf()` when checking for…
validation error
Prefer `.some(…)` over `.find(…)` or `.findLast(…)`.
validation warning oxlint, unicorn, arrays, boolean-logic, refactor
Unexpected return statement in describe callback
validation error jest, vitest, oxlint, describe, return-statement
Use of ` ` is not allowed
validation warning jest, vitest, oxlint, testing, config, restricted-api, lint
Default parameters should be last
validation warning eslint, oxlint, parameters, function-signature
Interfaces cannot be constructed, only classes.
validation warning typescript, lint, interface, constructor, design
` ` is never reassigned.
validation warning oxlint, eslint, variables, const, best-practice
The computed property cannot be used in `data()` because it…
validation error vue, oxlint, lint, options-api, computed, data, init-order
A module importing itself is not allowed
console warning lint, oxlint, imports, self-import, circular-dependency, refactoring, dead-code
' ' is always 'undefined' because it's never assigned.
validation warning eslint, oxlint, no-unassigned-vars, variables, undefined, dead-code
JSX component must be in PascalCase
validation warning react, jsx, naming-convention, pascalcase, oxlint, lint
should be a `Set`, and use `.has()` to check existence or…
validation warning oxlint, unicorn, performance, set, array-includes
Unexpected constant comparison
validation error oxlint, oxc, conditions, logic-bug, javascript, static-analysis
Use regular expression literal with flags instead of the…
validation warning eslint, oxlint, regex, redundant-code, lint
Using ` ` could result in slower LCP and higher bandwidth.
validation warning nextjs, performance, image, lint
Describe requires name and callback arguments
validation error jest, vitest, oxlint, describe, validation
Found identifier ' ' with the same name as a label.
validation warning lint, javascript, labels, naming, readability