oxc-project/oxc
Documented errors, page 8 of 12. Back to oxc-project/oxc
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| this expression is assigned to itself | validation | warning | lint, eslint, no-self-assign, assignments, possible-bug |
| Missing radix parameter. | validation | warning | eslint, oxlint, parseint, radix, correctness, lint |
| Prefer `**` over `Math.pow`. | validation | warning | oxlint, eslint, es2016, math, modernization |
| Prevent usage of `next/head` in `pages/_document.js`. | validation | warning | nextjs, pages-router, imports, lint |
| Enforce a clickable non-interactive element has at least… | validation | error | |
| Error message should not be an empty string. | validation | warning | oxlint, lint, unicorn, errors, debugging |
| Unnecessary `else` after `return`. | validation | warning | javascript, eslint, lint, style, control-flow |
| Use import for module ` `. | validation | error | |
| Global variable leak. | validation | warning | oxlint, lint, globals, scope, typos |
| Prefer `.some(…)` over `.findIndex(…)` or… | validation | warning | oxlint, unicorn, arrays, boolean-logic, refactor |
| Prefer top-level await over using an async IIFE. | validation | warning | oxlint, unicorn, async, iife, top-level-await |
| `defineEmits` has both a type-only emit and an argument. | validation | error | |
| Multiple exports of name | validation | error | lint, oxlint, import-plugin, esm, exports, barrel-file |
| Returned expression contains an assignment. | validation | warning | lint, eslint, no-return-assign, expressions, best-practices |
| Use Array destructuring. | validation | warning | oxlint, eslint, style, destructuring, es6, arrays |
| Enforce lowercase test names | validation | warning | jest, vitest, oxlint, testing, naming-conventions, style, static-analysis |
| `for…of` can iterate over an iterable, `.toArray()` is… | validation | warning | lint, oxlint, unicorn, for-of, iterator-helpers, performance, nursery |
| Missing accessibility modifier on | validation | warning | typescript, lint, class, accessibility, oxlint |
| Expected expression to be used | validation | warning | eslint, oxlint, expressions, side-effects, style |
| with empty attribute list is not allowed. | validation | error | |
| Prefer ` ` over `role` attribute ` `. | validation | warning | jsx-a11y, react, accessibility, semantic-html, aria-roles, lint |
| ' ' is assigned a value but never used. | validation | warning | eslint, oxlint, unused-vars, dead-store, dataflow |
| should match | validation | warning | jest, vitest, oxlint, testing, test-title, regex, naming, config, valid-title |
| Custom fonts not added in `pages/_document.js` will only… | validation | warning | nextjs, fonts, performance, lint |
| Do not include stylesheets manually. | validation | warning | nextjs, css, jsx, lint |
| Hoisted API cannot be used in a runtime location in this… | validation | error | |
| Prefer using `dataset` over `removeAttribute`. | validation | error | |
| Prop " " should define at least its type. | validation | error | |
| "return" should be used inside a function. | validation | error | |
| Unexpected empty class. | validation | warning | typescript, lint, class, dead-code |
| Expected property shorthand. | validation | warning | lint, eslint, oxlint, object-literal, shorthand, es6 |
| Prefer `Math.abs(x)` over alternatives | validation | error | |
| Unexpected empty function | validation | warning | javascript, eslint, lint, functions, stub-code |
| Do not define components during render. | validation | error | |
| Expect has an unknown modifier. | validation | warning | jest, vitest, oxlint, testing, typo, promise |
| Expected Unicode BOM (Byte Order Mark) | validation | error | lint, oxlint, eslint, unicode, bom, encoding, utf8 |
| Unexpected operator assignment | validation | warning | oxlint, eslint, style, operators, assignment |
| Unexpected redeclaration of read-only global variable. | validation | warning | oxlint, lint, globals, redeclaration, browser |
| Using `<link />` outside of | validation | warning | nextjs, fonts, next-head, lint |
| Empty constructors are unnecessary | validation | warning | lint, eslint, oxlint, class, constructor |
| Prop ' ' requires default value to be set. | validation | error | |
| Use `toBeUndefined` instead. | validation | warning | jest, vitest, oxlint, matcher, undefined |
| A regular expression literal can be confused with '/='. | validation | warning | javascript, eslint, lint, regex |
| `<Document />` from `next/document` should not be imported… | validation | warning | nextjs, pages-router, imports, lint |
| Unexpected implicit coercion to boolean | validation | warning | eslint, oxlint, lint, coercion, boolean |
| Use a method signature instead of a property signature. | validation | warning | typescript, lint, interface, style, oxlint |
| ' ' import is duplicated | validation | warning | javascript, eslint, lint, imports, modules |
| ' ' is already declared in the upper scope. | validation | warning | lint, eslint, no-shadow, scoping, variables, typescript |
| This is not a valid ARIA state and property value for | validation | error | |
| ` ` can not be used with `. ` to create parameterized test. | validation | error | |
| Invalid loop. Its body allows only one iteration. | validation | warning | eslint, oxlint, loops, control-flow, dead-code |
| `TSEnumMemberName::TemplateString` should have no… | panic | error | |
| Unexpected exponential notation in uppercase. | validation | warning | oxlint, unicorn, style, numeric-literal, exponent, autofix |
| Unexpected use of ternary expression | validation | info | eslint, oxlint, no-ternary, style, conditional-expression |
| Use `< >` instead of `as `. | validation | warning | typescript, oxlint, lint, type-assertion, angle-bracket, style |
| Confusing combinations of non-null assertion and equal test… | validation | warning | typescript, lint, non-null-assertion, readability, oxlint |
| Do not call `jest.setTimeout` multiple times | console | warning | lint, jest, testing, timers, duplicate-code, oxlint |
| Do not `import`/`require` global functions from 'vitest'. | validation | error | |
| Pass a callback function to `nextTick` instead of using the… | validation | info | vue, oxlint, lint, nexttick, style, autofix |
| Unexpected emoji modifier in character class. | validation | error | |
| Unexpected string concatenation of literals. | validation | warning | lint, eslint, oxlint, string, concatenation |
| Unsafe `finally` block. | validation | warning | eslint, oxlint, try-catch, finally, control-flow |
| Add a `./` prefix to the relative URL. | validation | warning | oxlint, unicorn, url, style, config-dependent |
| Prefer `addEventListener()` over their `on`-function… | validation | warning | oxlint, unicorn, dom, events, best-practice |
| Test is missing a timeout. | validation | error | |
| Avoid positive integer values for `tabIndex`. | validation | warning | jsx-a11y, react, accessibility, tabindex, keyboard-navigation, lint |
| Expected longform property syntax. | validation | warning | lint, eslint, oxlint, object-literal, longform, style |
| Unexpected hexadecimal digits in lowercase. | validation | warning | oxlint, unicorn, style, hexadecimal, autofix |
| Unsafe usage of optional chaining | validation | warning | eslint, oxlint, optional-chaining, undefined, typeerror |
| Do not use "use strict" directive. | validation | error | |
| No access key attribute allowed. | validation | warning | jsx-a11y, react, accessibility, keyboard-shortcuts, lint |
| Do not delete dynamically computed property keys. | validation | warning | typescript, lint, delete-operator, performance, oxlint |
| Test is missing function argument | validation | warning | jest, vitest, oxlint, testing, incomplete-test, missing-argument |
| Unexpected joined character sequence in character class. | validation | error | |
| Empty character class will not match anything | validation | warning | javascript, eslint, lint, regex |
| Empty specifier is not allowed | validation | error | |
| Expected the component literal to be directly exported. | validation | error | |
| Function name ` ` should not match variable name ` `. | validation | warning | eslint, oxlint, naming, function-expression, redundant-name |
| Use `toBeNull` instead. | validation | warning | jest, vitest, oxlint, matcher, null |
| Argument is explicitly typed as `any` | validation | warning | typescript, lint, any, type-safety, oxlint |
| Array type using ' []' is forbidden. Use ' < >' instead. | validation | info | typescript, oxlint, style, types, autofix, array-type |
| Do not use Vitest global functions | validation | error | |
| Duplicate key | validation | warning | javascript, eslint, lint, objects, dead-code |
| NaN values will never be found by `Array.prototype. | validation | error | lint, oxlint, eslint, nan, correctness, array, search |
| Expected empty line after statement not followed by another… | validation | error | |
| Matchers must be called to assert. | validation | warning | jest, vitest, oxlint, testing, assertion, valid-expect |
| not found in deeply imported namespace . | validation | error | |
| Title must be a string | validation | warning | jest, vitest, oxlint, testing, test-title, valid-title |
| Use `void` only as a return type or as the type of a `this`… | validation | warning | typescript, lint, void, this-parameter |
| tslint comment detected | validation | warning | typescript, oxlint, lint, tslint, migration, legacy-comment |
| Unsafe declaration merging between classes and interfaces. | validation | error | |
| Missing type parameters on mock function call | validation | error | |
| Unexpected comment inline with code | validation | warning | eslint, oxlint, lint, comments, style |
| Unnecessary escape character | validation | warning | lint, eslint, oxlint, escape-sequences, string, regex |
| Avoid using 'thisArg' with array iteration methods | validation | error | |
| The `autoFocus` attribute is found here, which can cause… | validation | warning | jsx-a11y, react, accessibility, focus-management, lint |
| Assign array to a variable before exporting as module… | validation | warning | lint, oxlint, imports, default-export, arrays, style |
| Both sides of this comparison are exactly the same | validation | warning | lint, eslint, no-self-compare, comparisons, nan, possible-bug |
| Comments should not begin with | validation | error | |
| The vitest function accessor used is not allowed | validation | error |