oxc-project/oxc
Documented errors, page 9 of 12. Back to oxc-project/oxc
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| Unexpected implicit coercion to number | validation | warning | eslint, oxlint, lint, coercion, number |
| Unexpected negation of the left operand of | validation | warning | eslint, oxlint, operators, precedence, in-operator, instanceof |
| Enforce default clauses in switch statements to be last | validation | warning | eslint, oxlint, switch, clause-order, style |
| Expect in a promise chain is unreachable after a `return`… | validation | warning | jest, vitest, oxlint, testing, unreachable-code, promise-chain, dead-code, valid-expect-in-promise |
| Prefer default export to be present on every file that has… | console | warning | lint, import, export, style, esm, oxlint |
| Use `as ` instead of `< >`. | validation | warning | typescript, oxlint, lint, type-assertion, as-cast, style |
| `Array.flatMap` performs `Array.map` and `Array.flat` in… | validation | warning | oxlint, unicorn, arrays, performance, es2019, autofix |
| Negated expression is not allowed in equality check. | validation | error | |
| Prefer using inline type specifiers instead of a top-level… | validation | warning | lint, oxlint, import-plugin, typescript, esm, style |
| Unused directive (no problems were reported). | validation | error | |
| `yield*` can delegate to an iterable, `.toArray()` is… | validation | warning | lint, oxlint, unicorn, generator, yield, iterator-helpers, nursery |
| Disallow recursive access to `this` within | validation | error | |
| Expected to return a value in computed property. | validation | error | |
| File is larger than `isize::MAX` bytes | exception | error | |
| `expect. ` must be awaited or returned | validation | error | |
| Prefer using a top-level type-only import instead of inline… | validation | warning | lint, oxlint, import-plugin, typescript, esm, style |
| ' ' import is restricted from being used. | validation | warning | lint, eslint, no-restricted-imports, es-modules, dependencies, configuration |
| not found in imported namespace . | validation | error | |
| This default export is missing a name | validation | error | |
| ' . ' is restricted from being used. | validation | warning | lint, eslint, no-restricted-properties, api-usage, configuration |
| Property name " " is not . | validation | error | |
| Unexpected use of `continue` statement. | validation | info | lint, continue, control-flow, stylistic, oxlint |
| ' ' is marked as ignored but is used. | validation | warning | eslint, oxlint, unused-vars, ignore-pattern, naming |
| Unreachable code. | validation | warning | eslint, oxlint, control-flow, dead-code |
| An index signature is preferred over a record. | validation | warning | typescript, oxlint, lint, record-type, index-signature, style |
| Prefer ` ` over ` `. | validation | error | |
| Unexpected `javascript:` url | validation | warning | lint, eslint, no-script-url, security, xss, csp |
| Use `toBeDefined` instead. | validation | warning | jest, vitest, oxlint, matcher, defined |
| Backreference ' ' will be ignored. It references group ' '… | validation | warning | eslint, oxlint, regex, backreference, alternation |
| Prefer `String#at()` over `String#substring()` when getting… | validation | warning | lint, javascript, strings, code-style, es2022 |
| Unexpected number literal prefix in uppercase and… | validation | warning | oxlint, unicorn, style, hexadecimal, numeric-literal, autofix |
| `typeof` comparisons should be to string literals. | validation | error | lint, oxlint, eslint, typeof, correctness, operators |
| Invalid access level is specified or missing. | validation | warning | lint, jsdoc, documentation, access-modifier, oxlint |
| Public accessibility modifier on | validation | warning | typescript, lint, class, accessibility, oxlint |
| Split uninitialized ' ' declarations into multiple… | validation | warning | oxlint, eslint, style, variables, declaration |
| Implied eval. Do not use execScript(). | validation | warning | eslint, oxlint, lint, security, eval, legacy |
| Prefer explicitly define the object shape | validation | warning | typescript, oxlint, lint, ban-types, empty-object-type, type-safety |
| Prevent usage of ` ` with `Head` component from… | validation | warning | nextjs, seo, pages-router, lint |
| `expect. ` must be awaited or returned as the last… | validation | error | |
| No root defined for `@property` path. | validation | error | |
| Remove the `./` prefix from the relative URL. | validation | warning | oxlint, unicorn, url, style, config-dependent |
| Unary operator ' ' used. | validation | error | |
| Confusing combination of non-null assertion and | validation | warning | typescript, lint, non-null-assertion, operators, oxlint |
| Passing ` ` as the `deleteCount` argument is unnecessary. | validation | error | |
| Wrapping single-element array with `Promise. | validation | error | |
| Do not use ` ` element. Use `<Head />` from `next/head`… | validation | warning | nextjs, seo, pages-router, lint |
| File extension " " should not be included in the… | validation | error | |
| Prevent synchronous scripts. | validation | warning | nextjs, performance, script, lint |
| should not match | validation | warning | jest, vitest, oxlint, testing, test-title, regex, naming, config, valid-title |
| Unexpected erasing operation. This expression will always… | validation | error | oxlint, oxc, arithmetic, logic-bug, javascript, static-analysis |
| Curly braces are required here. | validation | error | |
| named import not found | validation | error | |
| No named exports found in module | validation | error | lint, oxlint, import-plugin, esm, modules, exports |
| Parameter ' ' is declared but never used. | validation | warning | eslint, oxlint, unused-vars, parameters |
| Remove `void` from this union type constituent. | validation | warning | typescript, lint, void, union-type |
| A control must be associated with a text label. | validation | error | |
| Use `void` only as a return type. | validation | warning | typescript, lint, void, type-annotation |
| do not access Object.prototype method | validation | error | |
| Do not use `null` comparisons without type-checking… | validation | warning | javascript, eslint, lint, equality, null-handling |
| ' ' is used outside of binding context. | validation | error | |
| Avoid having conditionals in tests | validation | error | |
| extra non-null assertion | validation | warning | typescript, lint, non-null-assertion, redundant-code |
| Missing JSDoc `@returns` type. | validation | warning | jsdoc, documentation, lint, oxlint |
| `styled-jsx` should not be used in `pages/_document.js` | validation | warning | nextjs, styled-jsx, pages-router, lint |
| Array type using ' < >' is forbidden. Use ' []' instead. | validation | info | typescript, oxlint, style, types, autofix, array-type |
| Missing alternative text. | validation | error | jsx-a11y, accessibility, alt-text, object-embed, react, lint, oxlint |
| Prop ' ' is not in . | validation | error | |
| Unable to validate computed reference to imported namespace | validation | error | |
| Use `void` only as a return type or generic type argument. | validation | warning | typescript, lint, void, type-annotation |
| Expect takes at most | validation | warning | jest, vitest, oxlint, testing, arguments, valid-expect |
| Use `Buffer.alloc()` or `Buffer.from()` instead of the… | validation | error | |
| Checking `switch` discriminant against NaN will never match | validation | error | lint, oxlint, eslint, nan, correctness, switch, control-flow |
| Exported error name should match error class | validation | error | |
| Missing value for `aria-label` attribute. | validation | error | jsx-a11y, accessibility, aria, alt-text, react, lint, oxlint |
| Array destructuring may not contain consecutive ignored… | validation | error | |
| unclosed markdown code block in documentation, please close… | exception | error | |
| Curly braces are unnecessary here. | validation | error | |
| `defineEmits` is referencing locally declared variables. | validation | error | |
| Invalid radix parameter, must be an integer between 2 and… | validation | warning | eslint, oxlint, parseint, radix, correctness, lint |
| The `@typedef` and `@namespace` tags must include a… | validation | error | |
| Unexpected empty static blocks | validation | warning | javascript, eslint, lint, classes, es2022 |
| Use new type literal declaration instead of the old call… | validation | error | |
| Don't use `Array#reduce()` and `Array#reduceRight()`, use… | validation | error | |
| line break count must fit in u32 | panic | error | |
| missing `version = "x.y.z"` or `version = "next"` in… | validation | error | |
| The `a` element has `href` and `onClick`. | validation | error | |
| Use `new ()` instead of ` () | validation | error | |
| Use `void` only as a return type, generic type argument, or… | validation | warning | typescript, lint, void, type-annotation |
| Mocked modules must be dynamic imported. | validation | error | |
| Prefer `toBeObject()` for object assertions | validation | error | |
| Should not have duplicate prefix | validation | warning | jest, vitest, oxlint, testing, test-title, naming, valid-title |
| Unexpected return value in callback for | validation | error | |
| Use imports from `vue` instead of `@vue/*`. | validation | error | |
| Use `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`… | validation | error | |
| Array type using ' []' is forbidden for non-simple types… | validation | info | typescript, oxlint, style, types, autofix, array-type |
| Missing value for `aria-labelledby` attribute. | validation | error | jsx-a11y, accessibility, aria, alt-text, react, lint, oxlint |
| ' ' is defined but never used. | validation | warning | eslint, oxlint, classes, private-fields, dead-code |
| Prefer `toHaveBeenCalledExactlyOnceWith` over… | validation | error | |
| The use of `toBeCalledTimes(1)` and… | validation | error | |
| is not allowed in test title | validation | warning | jest, vitest, oxlint, testing, test-title, naming, config, valid-title |