oxc-project/oxc

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

Code / MessageTypeSeverityTags
Missing `alt` attribute.
validation error jsx-a11y, accessibility, alt-text, react, lint, oxlint
Name " " is reserved in Vue.js.
validation warning vue, naming, lint, vue2, reserved-names, components
` ` may be a typo. Did you mean ` `?
validation warning nextjs, typo, data-fetching, lint
Unexpected empty block statements
validation warning javascript, eslint, lint, control-flow, error-handling
async is not allowed
validation warning oxlint, async-await, restriction, syntax, style-rule
Prefer `. ()` over `. ()`.
validation error
Require `default` cases in `switch` statements.
validation warning eslint, oxlint, switch, default-case
Async function has no `await` expression.
validation warning eslint, oxlint, async-await, lint
Unexpected re-assignment of class
validation error lint, class, strict-mode, const-binding, oxlint
Unnecessary use of conditional expression for default…
validation info eslint, oxlint, no-unneeded-ternary, ternary, default-assignment, nullish-coalescing
Use the Promise returned by `nextTick` instead of passing a…
validation info vue, oxlint, lint, nexttick, style, autofix
Comments inside children section of tag should be placed…
validation warning react, jsx, comments, text-node, oxlint, lint
Duplicate enum value
validation warning typescript, lint, enum, correctness, oxlint
`Promise. ()` requires 1 or 2 arguments, but received .
validation error promise, async, lint, arguments, oxlint
The generic type arguments should be specified as part of…
validation warning typescript, oxlint, lint, generics, constructor, type-annotation, style
This module could be mistakenly parsed as script instead of…
console warning lint, import, esm, module, commonjs, oxlint
Type imports from declaration files must use top-level…
validation warning lint, oxlint, import-plugin, typescript, esm, dts
Unexpected number literal prefix in uppercase.
validation warning oxlint, unicorn, style, numeric-literal, autofix
Unexpected use of comma operator
validation warning lint, eslint, no-sequences, expressions, best-practices
Unnecessary return statement.
validation warning lint, eslint, oxlint, control-flow, return
Approximate value of
validation warning oxc, math, constants, precision, oxlint, autofix
File has too many classes
validation warning eslint, oxlint, style, file-structure, classes
Reserved name `__iterator__`
validation warning lint, javascript, deprecated-api, iterator, spidermonkey
Suggest using `toContain()`.
validation warning jest, vitest, oxlint, matcher, array
Invalid regular expression: Unknown flag
validation error regex, lint, javascript, syntax-error, flags
`jest.setTimeout` should only be called in a global scope
console warning lint, jest, testing, timers, oxlint
Optional chain expressions can return undefined by design…
validation warning typescript, lint, optional-chaining, non-null-assertion, null-safety
` ` role is missing required aria props .
validation warning jsx-a11y, react, accessibility, aria, widget-semantics, lint
Expected shorthand for all properties.
validation warning lint, eslint, oxlint, object-literal, shorthand, style
get string content
panic error
Prefer using ` ` over ` `.
validation error
` ` must be accompanied by `onBlur` for accessibility.
validation warning jsx-a11y, react, accessibility, keyboard-navigation, lint
Function has too many parameters
validation warning eslint, oxlint, complexity, function-signature, parameters, anonymous-function
Invalid regular expression: `u` and `v` flags should be…
validation error regex, lint, javascript, syntax-error, unicode, flags
Suggest using the built-in comparison matchers
validation warning jest, vitest, matchers, style, oxlint, lint
Unexpected argument(s) in describe callback
validation error jest, vitest, oxlint, describe, callback-params
Forbidden non-null assertion.
validation warning typescript, lint, non-null-assertion, null-safety
Function name ` ` should match variable name ` `.
validation warning eslint, oxlint, naming, function-expression, variable
Module ' ' is imported more than once in this file
validation warning lint, oxlint, imports, duplicate-imports, autofix, style
Props default value factory functions no longer have access…
validation error vue, oxlint, lint, props, this-binding, vue3, migration
'The `Object` type actually means "any non-nullish value"
validation warning typescript, oxlint, lint, ban-types, object-type, type-safety
Use literals instead of parseInt().
validation warning oxlint, eslint, modernization, numbers, es2015
Do not throw undefined
validation error eslint, oxlint, no-throw-literal, undefined, throw, exceptions
You should not use an arrow function to define a watcher.
validation warning vue, oxlint, lint, options-api, watch, this-binding
Assignment (=) can be replaced with operator assignment
validation warning oxlint, eslint, style, operators, assignment
The Events api ` ` is deprecated.
validation error vue, oxlint, lint, event-bus, vue3, migration, removed-api
This dependency is specified more than once in the…
validation error
Do not export from a test file.
console warning lint, jest, testing, export, oxlint
The description for the @ts
validation warning typescript, oxlint, lint, ts-ignore, regex, config
Avoid passing a function reference directly to iterator…
validation error
Do not call ` ` multiple times.
validation warning oxlint, unicorn, pedantic, code-style, variadic-methods
Do not use setup or teardown hooks.
validation warning jest, vitest, oxlint, testing, hooks, lifecycle, style
[HIRBuilder] expected block
panic error vue, oxlint, lint, script-setup, defineemits, compiler-macro
Prefer String#startsWith over a regex with a caret.
validation warning oxlint, unicorn, string, regex, startswith, deprecated-rule
This argument should be a number.
validation warning jest, vitest, oxlint, testing, assertions, api-misuse, static-analysis
This pattern can be replaced with
validation warning oxlint, unicorn, string, regex, replaceall
Unexpected focused test.
validation warning jest, vitest, oxlint, testing, only, focused-tests, ci
Using this.refs is deprecated.
validation error
Test title is used multiple times in the same describe…
validation warning jest, vitest, oxlint, testing, titles, duplicates
Use `toBe` when expecting primitive literals.
validation warning jest, vitest, oxlint, matcher, style
`$delete` and `$set` are deprecated.
validation error vue, oxlint, lint, vue3, migration, reactivity, removed-api
Do not use the empty object type literal.
validation warning typescript, lint, type-safety, object-type
Non-interactive elements should not be assigned interactive…
validation warning jsx-a11y, react, accessibility, aria-roles, lint
`rel="preconnect"` is missing from Google Font.
validation warning nextjs, performance, fonts, resource-hints, lint
`String.raw` should be used to avoid escaping `\`.
validation warning oxlint, unicorn, string, readability, template-literal
Do not use " ".
validation error
Prefer named exports
validation warning lint, oxlint, imports, default-export, named-export, style-policy
Disallow use of `Object.prototype.hasOwnProperty.call()`…
validation warning oxlint, eslint, es2022, objects, modernization
Prefer the spread operator (`...`) over
validation warning oxlint, unicorn, style, spread, es2015
Checking inequality with NaN will always return true
validation error lint, oxlint, eslint, nan, correctness, floating-point, operators
Require or disallow "Yoda" conditions
validation warning lint, oxlint, eslint, style, operators, readability
Call to pending()
validation warning jest, vitest, oxlint, testing, pending, legacy, jasmine
Don't return in a finally callback
validation warning promise, async, lint, code-style, oxlint
Identifier name is too short
validation warning eslint, oxlint, style, naming, identifier-length
Prefer `childNode.remove()` over…
validation error
Non-interactive elements should not be assigned mouse or…
validation warning jsx-a11y, react, accessibility, event-handlers, lint
Unexpected require().
validation warning node, commonjs, require, style, oxlint
Literals should be exposed using readonly fields.
validation warning typescript, oxlint, lint, class, getter, readonly, style
Prefer `.some(…)` over non-zero length check from…
validation warning oxlint, unicorn, arrays, performance, boolean-logic, autofix
Use type-based declaration instead of runtime declaration
validation info vue, oxlint, lint, script-setup, defineprops, style, typescript
Cannot pop all entries
panic warning vue, oxlint, lint, props, types, validation
`debugger` statement is not allowed
validation warning javascript, eslint, lint, debugging
Prefer bigint literals over `BigInt(...)`.
validation warning oxlint, unicorn, bigint, es2020, autofix
Relative imports from parent directories are not allowed
console warning lint, oxlint, imports, relative-import, architecture, layering, monorepo
Unexpected comma in middle of array
validation warning eslint, oxlint, no-sparse-arrays, arrays, holes, elision
Unexpected `if` as the only statement in a `if` block…
validation info control-flow, style, readability, oxlint
Do not construct filename using `fileURLToPath()`.
validation error
Do not use as a type. Use " " instead
validation warning typescript, oxlint, lint, ban-types, primitive-types, style
Prefer a single `.flatMap(…)` over `.filter(…).flatMap(…)`.
validation warning lint, javascript, arrays, code-style
Prefer top-level await over using a promise chain.
validation warning oxlint, unicorn, async, top-level-await, esm
encountered allocation error
panic warning vue, oxlint, lint, typescript, ref, reactivity, type-safety
No default export found in imported module
validation error lint, oxlint, import-plugin, esm, modules, default-export
This component has too many props
validation warning vue, oxlint, lint, component-design, props
`Vue.config.keyCodes` are deprecated.
validation warning vue, oxlint, lint, keycodes, vue3, migration, removed-api
Prefer await to then()/catch()/finally()
validation warning promise, async, await, lint, code-style, oxlint
Prefer `indexOf` over `findIndex` for simple equality checks
validation warning oxlint, unicorn, arrays, performance, refactor, autofix
Unexpected mix of shorthand and non-shorthand properties.
validation warning oxlint, eslint, style, object-literal, consistency
Do not use any type assertions.
validation warning typescript, oxlint, lint, type-assertion, type-safety, strict-mode
' ' export is duplicated
validation warning javascript, eslint, lint, exports, modules
Unexpected conditional expect
validation warning jest, vitest, oxlint, testing, assertions, control-flow