# Oxc > url: /docs/guide/usage/linter/rules/eslint/accessor-pairs.md ## Pages - [Accessor Pairs](accessor-pairs.md): Enforces getter/setter pairs in objects and classes. - [Adding Linter Rules](adding-rules.md): The best and easiest way to contribute to Oxlint is by adding new linter rules. - [Adjacent Overload Signatures](adjacent-overload-signatures.md): Require that function overload signatures be consecutive. - [Alt Text](alt-text.md): Enforce that all elements that require alternative text have meaningful - [Always Return](always-return.md): Require returning inside each`then()`to create readable and reusable Promise chains. - [Anchor Ambiguous Text](anchor-ambiguous-text.md): Inspects anchor link text for the use of ambiguous words. - [Anchor Has Content](anchor-has-content.md): Enforce that anchors have content and that the content is accessible to screen readers. - [Anchor Is Valid](anchor-is-valid.md): The HTML``element, with a valid href attribute, is formally defined as representing a **hyperlink**. - [Approx Constant](approx-constant.md): Disallows the use of approximate constants, instead preferring the use - [Aria Activedescendant Has Tabindex](aria-activedescendant-has-tabindex.md): Enforce elements with aria-activedescendant are tabbable. - [Aria Props](aria-props.md): Enforces that elements do not use invalid ARIA attributes. - [Aria Proptypes](aria-proptypes.md): Enforces that elements do not use invalid ARIA state and property values. - [Aria Role](aria-role.md): Elements with ARIA roles must use a valid, non-abstract ARIA role. A - [Aria Unsupported Elements](aria-unsupported-elements.md): Enforces that reserved DOM elements do not contain ARIA roles, states, - [Array Callback Return](array-callback-return.md): Enforce return statements in callbacks of array methods - [Array Type](array-type.md): Require consistently using either`T[]`or`Array`for arrays. - [Arrow Body Style](arrow-body-style.md): This rule can enforce or disallow the use of braces around arrow function body. - [AST Tools](ast-tools.md): The [AST Tools](https://github.com/oxc-project/oxc/tree/main/tasks/ast_tools) task serves as our secret weapon for ma... - [AST](ast.md): The parser in the upcoming chapter is responsible for turning Tokens into an abstract syntax tree (AST). - [Autocomplete Valid](autocomplete-valid.md): Enforces that an element's autocomplete attribute must be a valid value. - [Automatic fixes](automatic-fixes.md): Oxlint can automatically fix some lint violations. Automatic fixes are only applied when passing the relevant CLI fla... - [Avoid New](avoid-new.md): Disallow creating promises with`new Promise()`. - [Await Thenable](await-thenable.md): This rule disallows awaiting a value that is not a Thenable. - [Bad Array Method On Arguments](bad-array-method-on-arguments.md): This rule applies when an array method is called on the arguments object itself. - [Bad Bitwise Operator](bad-bitwise-operator.md): This rule applies when bitwise operators are used where logical operators are expected. - [Bad Char At Comparison](bad-char-at-comparison.md): This rule warns when the return value of the`charAt`method is used to compare a string of length greater than 1. - [Bad Comparison Sequence](bad-comparison-sequence.md): This rule applies when the comparison operator is applied two or more times in a row. - [Bad Min Max Func](bad-min-max-func.md): Checks whether the clamp function`Math.min(Math.max(x, y), z)`always evaluate to a - [Bad Object Literal Comparison](bad-object-literal-comparison.md): Checks for comparisons between object and array literals. - [Bad Replace All Arg](bad-replace-all-arg.md): This rule warns when the`replaceAll`method is called with a regular expression that does not have the global flag (g). - [Ban Ts Comment](ban-ts-comment.md): This rule lets you set which directive comments you want to allow in your codebase. - [Ban Tslint Comment](ban-tslint-comment.md): This rule disallows`tslint:`comments - [Ban Types](ban-types.md): This rule bans specific types and can suggest alternatives. Note that it does not ban the corresponding runtime objec... - [All Benchmarks](benchmarks.md): Oxc's parser is at least 3x faster than swc and 5x faster than Biome. - [Block Scoped Var](block-scoped-var.md): Enforces that variables are both **declared** and **used** within the same block scope. - [Branches Sharing Code](branches-sharing-code.md): Checks if the`if`and`else`blocks contain shared code that can be moved out of the blocks. - [Branding](branding.md): * Designed by: [@tongtong-lu](https://github.com/tongtong-lu) and [@guan-wy](https://github.com/guan-wy) - [Button Has Type](button-has-type.md): Enforces explicit`type`attribute for all the`button`HTML elements. - [Capitalized Comments](capitalized-comments.md): Enforces or disallows capitalization of the first letter of a comment. - [Catch Error Name](catch-error-name.md): This rule enforces consistent and descriptive naming for error variables - [Catch Or Return](catch-or-return.md): Ensure that each time a`then()`is applied to a promise, a`catch()` - [Check Access](check-access.md): Checks that`@access`tags use one of the following values: - [Check Property Names](check-property-names.md): Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots. - [Check Tag Names](check-tag-names.md): Reports invalid block tag names. - [Checked Requires Onchange Or Readonly](checked-requires-onchange-or-readonly.md): This rule enforces`onChange`or`readOnly`attribute for checked property of input elements. - [Ci](ci.md): You can - and should - set up your CI pipeline to run Oxfmt and fail the build on formatting differences. - [Class Methods Use This](class-methods-use-this.md): Enforce that class methods utilize`this`. - [Command-line Interface](cli.md): **`oxfmt`** \[**`-c`**=*`PATH`*] \[*`PATH`*]... - [Click Events Have Key Events](click-events-have-key-events.md): Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress. - [Complexity](complexity.md): Enforces a maximum cyclomatic complexity in a program, which is the number - [Configuration options for the Oxfmt.](config-file-reference.md): Most options are the same as Prettier's options, but not all of them. - [Configuration](config.md): Oxfmt works out of the box, but most teams commit a configuration file to keep formatting consistent across local run... - [Consistent Assert](consistent-assert.md): Enforces consistent usage of the`assert`module. - [Consistent Date Clone](consistent-date-clone.md): The Date constructor can clone a`Date`object directly when passed as an argument, - [Consistent Each For](consistent-each-for.md): This rule ensure consistency on which method used to create parameterized test. - [Consistent Empty Array Spread](consistent-empty-array-spread.md): When spreading a ternary in an array, we can use both \[] and '' as fallbacks, - [Consistent Existence Index Check](consistent-existence-index-check.md): Enforce consistent style for element existence checks with`indexOf()`, - [Consistent Function Scoping](consistent-function-scoping.md): Disallow functions that are declared in a scope which does not capture - [Consistent Generic Constructors](consistent-generic-constructors.md): When constructing a generic class, you can specify the type arguments on either the left-hand side (as a type annotat... - [Consistent Indexed Object Style](consistent-indexed-object-style.md): Choose between requiring either`Record`type or indexed signature types. - [Consistent Test Filename](consistent-test-filename.md): This rule triggers an error when a file is considered a test file, but its name - [Consistent Test It](consistent-test-it.md): Jest allows you to choose how you want to define your tests, using the`it`or - [Consistent Type Definitions](consistent-type-definitions.md): Enforce type definitions to consistently use either`interface`or`type`. - [Consistent Type Imports](consistent-type-imports.md): Enforce consistent usage of type imports. - [Consistent Type Specifier Style](consistent-type-specifier-style.md): This rule either enforces or bans the use of inline type-only markers for named imports. - [Consistent Vitest Vi](consistent-vitest-vi.md): This rule triggers an error when an unexpected vitest accessor is used. - [Const Comparisons](const-comparisons.md): Checks for redundant or logically impossible comparisons. This includes: - [Constructor Super](constructor-super.md): Requires`super()`calls in constructors of derived classes and disallows`super()`calls - [Curly](curly.md): This rule enforces the use of curly braces`{}`for all control statements - [Dead Code Elimination](dead-code-elimination.md): Oxc minifier supports eliminating dead code. For example, it removes the statements inside a`if (false)`block and t... - [Debugging](debugging.md): The`OXC_LOG`environment variable enables runtime tracing in`oxlint`and`oxfmt`. When not set, logging is complete... - [Default Case Last](default-case-last.md): Requires the`default`clause in`switch`statements to be the last one. - [Default Case](default-case.md): Enforces that all`switch`statements include a`default`case, - [Default Param Last](default-param-last.md): Requires default parameters in functions to be the last ones. - [Default](default.md): If a default import is requested, this rule will report if there is no - [Define Emits Declaration](define-emits-declaration.md): This rule enforces`defineEmits`typing style which you should use`type-based`, strict`type-literal`(introduced in... - [Define Props Declaration](define-props-declaration.md): This rule enforces`defineProps`typing style which you should use`type-based`or`runtime`declaration. - [Define Props Destructuring](define-props-destructuring.md): This rule enforces a consistent style for handling Vue 3 Composition API props, - [Getting Started](development.md): git clone -c core.longpaths=true git@github.com:oxc-project/oxc.git - [Display Name](display-name.md): Enforces that React components have a`displayName`property. - [Double Comparisons](double-comparisons.md): This rule checks for double comparisons in logical expressions. - [Editors](editors.md): Editor extensions use`oxfmt --lsp`from your project, so`oxfmt`must be installed locally. - [Embedded Formatting](embedded-formatting.md): :::warning - [Empty Brace Spaces](empty-brace-spaces.md): Removes the extra spaces or new line characters inside a pair of braces - [Empty Tags](empty-tags.md): Expects the following tags to be empty of any content: - [Endorsements](endorsements.md): Ran oxlint on the Vue 3 codebase, ~200 rules + ~590 files finished in 50ms 🤯 (30ms re-runs) - [Eqeqeq](eqeqeq.md): Requires the use of the`===`and`!==`operators, disallowing the use of`==`and`!=`. - [Erasing Op](erasing-op.md): Checks for erasing operations, e.g., \`x \* 0\`\`. - [Error Message](error-message.md): Enforces providing a`message`when creating built-in`Error`objects to - [Dealing with Errors](errors.md): Quoting from the [Dragon Book](https://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811) - [Escape Case](escape-case.md): Enforces defining escape sequence values with uppercase characters rather than lowercase ones. - [Exhaustive Deps](exhaustive-deps.md): Verifies the list of dependencies for Hooks like`useEffect`and similar. - [Expect Expect](expect-expect.md): This rule triggers when there is no call made to`expect`in a test, ensure that there is at least one`expect`call ... - [Explicit Function Return Type](explicit-function-return-type.md): This rule enforces that functions have an explicit return type annotation. - [Explicit Length Check](explicit-length-check.md): Enforce explicitly comparing the length or size property of a value. - [Explicit Module Boundary Types](explicit-module-boundary-types.md): Require explicit return and argument types on exported functions' and classes' public class methods. - [Export](export.md): Reports funny business with exports, like repeated exports of names or defaults. - [Exports Last](exports-last.md): This rule enforces that all exports are declared at the bottom of the file. - [Extensions](extensions.md): Some file resolve algorithms allow you to omit the file extension within the import source path. - [FAQ](faq.md): Top level variables are removed when the source type is`module`. This is because top level variables in module code ... - [Filename Case](filename-case.md): Enforces a consistent case style for filenames to improve project organization and maintainability. - [First](first.md): Forbids any non-import statements before imports except directives. - [For Direction](for-direction.md): Disallow`for`loops where the update clause moves the counter in the wrong - [Forbid Dom Props](forbid-dom-props.md): This rule prevents passing of props to elements. This rule only applies to DOM Nodes (e.g. ) and not Components (e.g.... - [Forbid Elements](forbid-elements.md): Allows you to configure a list of forbidden elements and to specify their desired replacements. - [Formatter (oxfmt)](formatter.md): We are currently porting Prettier and Biome Formatter to Oxc to create a high-performance, Prettier-compatible format... - [Forward Ref Uses Ref](forward-ref-uses-ref.md): Requires that components wrapped with`forwardRef`must have a`ref`parameter. - [Func Names](func-names.md): Require or disallow named function expressions. - [Func Style](func-style.md): Enforce the consistent use of either function declarations or expressions assigned to variables. - [Generated Cli](generated-cli.md): **`oxfmt`** \[**`-c`**=*`PATH`*] \[*`PATH`*]... - [Configuration options for the Oxfmt.](generated-config.md): Most options are the same as Prettier's options, but not all of them. - [Getter Return](getter-return.md): Requires all getters to have a`return`statement. - [Global Require](global-require.md): Require`require()`calls to be placed at top-level module scope - [Global Variable Replacement](global-variable-replacement.md): Oxc transformer supports replacing global variables. - [Google Font Display](google-font-display.md): Enforce font-display behavior with Google Fonts. - [Google Font Preconnect](google-font-preconnect.md): Enforces the presence of`rel="preconnect"`when using Google Fonts via``tags. - [Grammar](grammar.md): JavaScript has one of the most challenging grammar to parse, - [Group Exports](group-exports.md): Reports when named exports are not grouped together in a single export declaration - [Grouped Accessor Pairs](grouped-accessor-pairs.md): Require grouped accessor pairs in object literals and classes - [Guard For In](guard-for-in.md): Require for-in loops to include an if statement. - [Heading Has Content](heading-has-content.md): Enforce that heading elements (h1, h2, etc.) have content and - [Hoisted Apis On Top](hoisted-apis-on-top.md): Enforce hoisted APIs to be on top of the file. - [Id Length](id-length.md): This rule enforces a minimum and/or maximum identifier length convention by counting the - [Iframe Has Title](iframe-has-title.md): Enforce iframe elements have a title attribute. - [Iframe Missing Sandbox](iframe-missing-sandbox.md): Enforce sandbox attribute on iframe elements - [Inline ignore comments](ignore-comments.md): For JS/TS files, use`oxfmt-ignore`to skip formatting the next statement: - [Ignore files](ignore-files.md): Oxfmt provides several ways to exclude files from formatting. - [Ignoring](ignoring.md): Oxfmt provides several ways to ignore files. - [Img Redundant Alt](img-redundant-alt.md): Enforce that`img`alt attributes do not contain redundant words like - [Implements On Classes](implements-on-classes.md): Reports an issue with any non-constructor function using`@implements`. - [Init Declarations](init-declarations.md): Require or disallow initialization in variable declarations. - [Inline Script Id](inline-script-id.md): Enforces that all`next/script`components with inline content or`dangerouslySetInnerHTML`must have an`id`prop. - [Integration](integration.md): For VS Code, the Oxc extension is available from the [Visual Studio Marketplace](https://marketplace.visualstudio.com... - [Introduction](intro.md): We are in [The Third Age of JavaScript](https://www.swyx.io/js-third-age/), - [Getting Started](introduction.md): * Lint: [Oxlint](/docs/guide/usage/linter) - [Isolated Declarations Emit](isolated-declarations.md): Oxc transformer supports emitting TypeScript declarations without using the TypeScript compiler for projects with [is... - [JS Plugins](js-plugins.md): Oxlint supports plugins written in JS - either custom-written, or from NPM. - [Jsx Boolean Value](jsx-boolean-value.md): Enforce a consistent boolean attribute style in your code. - [Jsx Curly Brace Presence](jsx-curly-brace-presence.md): Disallow unnecessary JSX expressions when literals alone are - [Jsx Filename Extension](jsx-filename-extension.md): Enforces consistent use of the`.jsx`file extension. - [Jsx Fragments](jsx-fragments.md): Enforces the shorthand or standard form for React Fragments. - [Jsx Handler Names](jsx-handler-names.md): Ensures that any component or prop methods used to handle events are correctly prefixed. - [Jsx Key](jsx-key.md): Enforce`key`prop for elements in array - [Jsx Max Depth](jsx-max-depth.md): Enforces a maximum depth for nested JSX elements and fragments. - [Jsx No Comment Textnodes](jsx-no-comment-textnodes.md): This rule prevents comment strings (e.g. beginning with`//`or`/*`) from being - [Jsx No Duplicate Props](jsx-no-duplicate-props.md): This rule prevents duplicate props in JSX elements. - [Jsx No Jsx As Prop](jsx-no-jsx-as-prop.md): Prevent JSX elements that are local to the current method from being - [Jsx No New Array As Prop](jsx-no-new-array-as-prop.md): Prevent Arrays that are local to the current method from being used - [Jsx No New Function As Prop](jsx-no-new-function-as-prop.md): Prevent Functions that are local to the current method from being used - [Jsx No New Object As Prop](jsx-no-new-object-as-prop.md): Prevent Objects that are local to the current method from being used - [Jsx No Script Url](jsx-no-script-url.md): Disallow usage of`javascript:`URLs. - [Jsx No Target Blank](jsx-no-target-blank.md): This rule aims to prevent user generated link hrefs and form actions from creating security vulnerabilities by - [Jsx No Undef](jsx-no-undef.md): Disallow undeclared variables in JSX. - [Jsx No Useless Fragment](jsx-no-useless-fragment.md): Disallow unnecessary fragments. - [Jsx Pascal Case](jsx-pascal-case.md): Enforce PascalCase for user-defined JSX components - [Jsx Props No Spread Multi](jsx-props-no-spread-multi.md): Enforces that any unique expression is only spread once. - [Jsx Props No Spreading](jsx-props-no-spreading.md): Disallow JSX prop spreading - [JSX](jsx.md): Oxc transformer supports transforming JSX. - [Label Has Associated Control](label-has-associated-control.md): Enforce that a label tag has a text label and an associated control. - [Language_Server](language-server.md): This page tells you the main concept of the`oxc_language_server`and what the differences to the CLI are. - [Lexer](lexer.md): The lexer, also known as tokenizer or scanner, is responsible for transforming source text into tokens. - [Linter](linter.md): See the [adding rules](./linter/adding-rules.md) guide for how to add new rules to Oxlint. - [Lowering](lowering.md): Oxc transformer supports lowering ESNext to ES2015 syntax. - [Mangling](mangling.md): Oxc minifier supports mangling variable names and private class fields. - [Max Classes Per File](max-classes-per-file.md): Enforce a maximum number of classes per file - [Max Dependencies](max-dependencies.md): Forbid modules to have too many dependencies (import or require statements). - [Max Depth](max-depth.md): Enforce a maximum depth that blocks can be nested. This rule helps to limit the complexity - [Max Expects](max-expects.md): This rule enforces a maximum number of`expect()`calls in a single test. - [Max Lines Per Function](max-lines-per-function.md): Enforce a maximum number of lines of code in a function. This rule ensures - [Max Lines](max-lines.md): Enforce a maximum number of lines per file. - [Max Nested Callbacks](max-nested-callbacks.md): Enforce a maximum depth that callbacks can be nested. This rule helps to limit - [Max Nested Describe](max-nested-describe.md): This rule enforces a maximum depth to nested`describe()`calls. - [Max Params](max-params.md): Enforce a maximum number of parameters in function definitions which by - [Max Props](max-props.md): Enforce maximum number of props in Vue component. - [Max Statements](max-statements.md): Enforce a maximum number of statements in a function. This rule ensures - [Media Has Caption](media-has-caption.md): Checks if``and``elements have a``element for captions. - [Talks & media](media.md): * Shopify Uses oxlint - [Performance👆, complexity👇: Killer updates from Shopify engineering](https://www.shopify.com/... - [Migrate from ESLint](migrate-from-eslint.md): This guide is for existing JavaScript and TypeScript projects that currently use ESLint and want to migrate to Oxlint. - [Migrate from Prettier](migrate-from-prettier.md): This guide covers migrating from Prettier to Oxfmt. - [Minifier](minifier.md): JavaScript minification plays a crucial role in optimizing website performance as it reduces the amount of data sent ... - [Misrefactored Assign Op](misrefactored-assign-op.md) - [Missing Throw](missing-throw.md): Checks whether the`throw`keyword is missing in front of a`new`expression. - [Mouse Events Have Key Events](mouse-events-have-key-events.md): Enforce`onMouseOver`/`onMouseOut`are accompanied by`onFocus`/`onBlur`. - [Multi-file analysis](multi-file-analysis.md): Multi-file analysis allows rules to use project-wide information, such as the module dependency graph, instead of ana... - [Named](named.md): Verifies that all named imports are part of the set of named exports in - [Namespace](namespace.md): Enforces names exist at the time they are dereferenced, when imported as - [Nested configuration files](nested-config.md): Oxlint can use multiple configuration files in the same repository. It automatically detects configuration files name... - [New Cap](new-cap.md): This rule requires constructor names to begin with a capital letter. - [New For Builtins](new-for-builtins.md): Enforces the use of`new`for the following builtins:`Object`,`Array`,`ArrayBuffer`,`BigInt64Array`, - [Next Script For Ga](next-script-for-ga.md): Enforces the use of the`next/script`component when implementing Google Analytics in Next.js applications, - [No Absolute Path](no-absolute-path.md): This rule forbids the import of modules using absolute paths. - [No Abusive Eslint Disable](no-abusive-eslint-disable.md): Disallows`oxlint-disable`or`eslint-disable`comments without specifying rules. - [No Access Key](no-access-key.md): Enforces that the`accessKey`prop is not used on any element to avoid complications with keyboard commands used by a... - [No Accessor Recursion](no-accessor-recursion.md): Disallow recursive access to this within getters and setters - [No Accumulating Spread](no-accumulating-spread.md): Prevents using object or array spreads on accumulators in`Array.prototype.reduce()`and in loops. - [No Alert](no-alert.md): Disallow the use of alert, confirm, and prompt - [No Alias Methods](no-alias-methods.md): This rule ensures that only the canonical name as used in the Jest documentation is used in the code. - [No Amd](no-amd.md): Forbids the use of AMD`require`and`define`calls. - [No Anonymous Default Export](no-anonymous-default-export.md): Reports if a module's default export is unnamed. - [No Aria Hidden On Focusable](no-aria-hidden-on-focusable.md): Enforces that`aria-hidden="true"`is not set on focusable elements. - [No Array Callback Reference](no-array-callback-reference.md): Prevents passing a function reference directly to iterator methods - [No Array Constructor](no-array-constructor.md): Disallows creating arrays with the`Array`constructor. - [No Array Delete](no-array-delete.md): This rule disallows using the delete operator on array values. - [No Array For Each](no-array-for-each.md): Forbids the use of`Array#forEach`in favor of a for loop. - [No Array Index Key](no-array-index-key.md): Warn if an element uses an Array index in its key. - [No Array Method This Argument](no-array-method-this-argument.md): Disallows the use of the`thisArg`parameter in array iteration methods such as - [No Array Reduce](no-array-reduce.md): Disallow`Array#reduce()`and`Array#reduceRight()`. - [No Array Reverse](no-array-reverse.md): Prefer using`Array#toReversed()`over`Array#reverse()`. - [No Array Sort](no-array-sort.md): Prefer using`Array#toSorted()`over`Array#sort()`. - [No Arrow Functions In Watch](no-arrow-functions-in-watch.md): This rule disallows using arrow functions when defining a watcher. - [No Assign Module Variable](no-assign-module-variable.md): Prevents the assignment or declaration of variables named`module`in Next.js applications. - [No Async Await](no-async-await.md): Disallows the use of`async`/`await`. - [No Async Client Component](no-async-client-component.md): Prevents the use of async functions for client components in Next.js applications. - [No Async Endpoint Handlers](no-async-endpoint-handlers.md): Disallows the use of`async`functions as Express endpoint handlers. - [No Async Promise Executor](no-async-promise-executor.md): Disallow using an async function as a Promise executor. - [No Autofocus](no-autofocus.md): Enforce that`autoFocus`prop is not used on elements. - [No Await Expression Member](no-await-expression-member.md): Disallows member access from`await`expressions. - [No Await In Loop](no-await-in-loop.md): This rule disallows the use of`await`within loop bodies. (for, for-in, for-of, while, do-while). - [No Await In Promise Methods](no-await-in-promise-methods.md): Disallow using`await`in`Promise`method parameters - [No Barrel File](no-barrel-file.md): Disallow the use of barrel files where the file contains`export *`statements, - [No Base To String](no-base-to-string.md): This rule requires toString() and toLocaleString() calls to only be called on objects which provide useful informatio... - [No Bitwise](no-bitwise.md): Disallow bitwise operators - [No Callback In Promise](no-callback-in-promise.md): Disallows calling a callback function (`cb()`) inside a`Promise.prototype.then()` - [No Caller](no-caller.md): Disallow the use of`arguments.caller`or`arguments.callee`. - [No Case Declarations](no-case-declarations.md): Disallow lexical declarations in case clauses. - [No Children Prop](no-children-prop.md): Checks that children are not passed using a prop. - [No Class Assign](no-class-assign.md): Disallow reassigning class variables. - [No Commented Out Tests](no-commented-out-tests.md): This rule raises a warning about commented out tests. It's similar to the - [No Commonjs](no-commonjs.md): Forbids the use of CommonJS`require`calls. Also forbids`module.exports`and`exports.*`. - [No Compare Neg Zero](no-compare-neg-zero.md): Disallow comparing against`-0` - [No Cond Assign](no-cond-assign.md): Disallow assignment operators in conditional expressions - [No Conditional Expect](no-conditional-expect.md): This rule prevents the use of expect in conditional blocks, such as ifs & catch(s). - [No Conditional In Test](no-conditional-in-test.md): Disallow conditional statements in tests. - [No Conditional Tests](no-conditional-tests.md): The rule disallows the use of conditional statements within test cases to - [No Confusing Non Null Assertion](no-confusing-non-null-assertion.md): Disallow non-null assertion in locations that may be confusing. - [No Confusing Set Timeout](no-confusing-set-timeout.md): Disallow confusing usages of jest.setTimeout - [No Confusing Void Expression](no-confusing-void-expression.md): This rule forbids using void expressions in confusing locations such as arrow function returns. - [No Console Spaces](no-console-spaces.md): Disallows leading/trailing space inside`console.log()`and similar methods. - [No Console](no-console.md): Disallow the use of console. - [No Const Assign](no-const-assign.md): Disallow reassigning`const`variables. - [No Const Enum](no-const-enum.md): Disallow TypeScript`const enum` - [No Constant Binary Expression](no-constant-binary-expression.md): Disallow expressions where the operation doesn't affect the value - [No Constant Condition](no-constant-condition.md): Disallow constant expressions in conditions - [No Constructor Return](no-constructor-return.md): Disallow returning value from constructor - [No Continue](no-continue.md): Disallow`continue`statements - [No Control Regex](no-control-regex.md): Disallows control characters and some escape sequences that match - [No Css Tags](no-css-tags.md): Prevents manual inclusion of stylesheets using``tags in Next.js applications. - [No Cycle](no-cycle.md): Ensures that there is no resolvable path back to this module via its dependencies. - [No Danger With Children](no-danger-with-children.md): Disallows when a DOM element is using both`children`and`dangerouslySetInnerHTML`properties. - [No Danger](no-danger.md): This rule prevents the use of`dangerouslySetInnerHTML`prop. - [No Debugger](no-debugger.md): Checks for usage of the`debugger`statement - [No Default Export](no-default-export.md): Forbids a module from having default exports. This helps your editor - [No Defaults](no-defaults.md): This rule reports defaults being used on the relevant portion of`@param`or`@default`. - [No Delete Var](no-delete-var.md): The purpose of the`delete`operator is to remove a property from an - [No Deprecated Destroyed Lifecycle](no-deprecated-destroyed-lifecycle.md): Disallow using deprecated`destroyed`and`beforeDestroy`lifecycle hooks in Vue.js 3.0.0+. - [No Deprecated Functions](no-deprecated-functions.md): Over the years Jest has accrued some debt in the form of functions that have - [No Deprecated](no-deprecated.md): Disallow using code marked as`@deprecated`. - [No Did Mount Set State](no-did-mount-set-state.md): Disallows using`setState`in the`componentDidMount`lifecycle method. - [No Direct Mutation State](no-direct-mutation-state.md): This rule forbids the direct mutation of`this.state`in React components. - [No Disabled Tests](no-disabled-tests.md): This rule raises a warning about disabled tests. - [No Distracting Elements](no-distracting-elements.md): Enforces that no distracting elements are used. - [No Div Regex](no-div-regex.md): Disallow equal signs explicitly at the beginning of regular expressions. - [No Document Cookie](no-document-cookie.md): Disallow direct use of - [No Document Import In Page](no-document-import-in-page.md): Prevent importing`next/document`outside of`pages/_document.js`. - [No Done Callback](no-done-callback.md): This rule checks the function parameter of hooks & tests for use of the done argument, suggesting you return a promis... - [No Dupe Class Members](no-dupe-class-members.md): Disallow duplicate class members. - [No Dupe Else If](no-dupe-else-if.md): Disallow duplicate conditions in if-else-if chains - [No Dupe Keys](no-dupe-keys.md): Disallow duplicate keys in object literals. - [No Duplicate Case](no-duplicate-case.md): Disallow duplicate case labels - [No Duplicate Enum Values](no-duplicate-enum-values.md): Disallow duplicate enum member values. - [No Duplicate Hooks](no-duplicate-hooks.md): Disallows duplicate hooks in describe blocks. - [No Duplicate Imports](no-duplicate-imports.md): Disallow duplicate module imports. - [No Duplicate Type Constituents](no-duplicate-type-constituents.md): This rule disallows duplicate constituents of union or intersection types. - [No Duplicates](no-duplicates.md): Reports if a resolved path is imported more than once in the same module. - [No Dynamic Delete](no-dynamic-delete.md): Disallow using the delete operator on computed key expressions. - [No Dynamic Require](no-dynamic-require.md): Forbids imports that use an expression for the module argument. This includes - [No Else Return](no-else-return.md): Disallow`else`blocks after`return`statements in`if`statements - [No Empty Character Class](no-empty-character-class.md): Disallow empty character classes in regular expressions - [No Empty File](no-empty-file.md): Disallows files that do not contain any meaningful code. - [No Empty Function](no-empty-function.md): Disallows the usages of empty functions - [No Empty Interface](no-empty-interface.md): Disallow the declaration of empty interfaces. - [No Empty Named Blocks](no-empty-named-blocks.md): Enforces that named import blocks are not empty. - [No Empty Object Type](no-empty-object-type.md): To avoid confusion around the`{}`type allowing any non-nullish value, this rule bans usage of the`{}`type. That i... - [No Empty Pattern](no-empty-pattern.md): Disallow empty destructuring patterns. - [No Empty Static Block](no-empty-static-block.md): Disallows the usages of empty static blocks - [No Empty](no-empty.md): Disallows empty block statements - [No Eq Null](no-eq-null.md): Disallow`null`comparisons without type-checking operators. - [No Eval](no-eval.md): Disallows referencing the`eval`function. This rule is aimed at preventing - [No Ex Assign](no-ex-assign.md): Disallow reassigning exceptions in catch clauses - [No Explicit Any](no-explicit-any.md): Disallows explicit use of the`any`type. - [No Export In Script Setup](no-export-in-script-setup.md): Disallow`export`in`` - [No Export](no-export.md): Prevents using exports if a file has one or more tests in it. - [No Exports Assign](no-exports-assign.md): Disallows assignment to`exports`. - [No Extend Native](no-extend-native.md): Prevents extending native global objects such as`Object`,`String`, or`Array`with new - [No Extra Bind](no-extra-bind.md): Disallow unnecessary calls to .bind() - [No Extra Boolean Cast](no-extra-boolean-cast.md): This rule disallows unnecessary boolean casts. - [No Extra Label](no-extra-label.md): Disallow unnecessary labels. - [No Extra Non Null Assertion](no-extra-non-null-assertion.md): Disallow extra non-null assertions. - [No Extraneous Class](no-extraneous-class.md): This rule reports when a class has no non-static members, such as for a - [No Fallthrough](no-fallthrough.md): Disallow fallthrough of`case`statements - [No Find Dom Node](no-find-dom-node.md): This rule disallows the use of`findDOMNode`, which was deprecated in 2018 and removed in React 19. - [No Floating Promises](no-floating-promises.md): This rule disallows "floating" Promises in TypeScript code, which is a Promise that is created without any code to ha... - [No Focused Tests](no-focused-tests.md): This rule reminds you to remove`.only`from your tests by raising a warning - [No For In Array](no-for-in-array.md): This rule disallows iterating over an array with a for-in loop. - [No Func Assign](no-func-assign.md): Disallow reassigning`function`declarations. - [No Global Assign](no-global-assign.md): Disallow modifications to read-only global variables. - [No Head Element](no-head-element.md): Prevents the usage of the native``element inside a Next.js application. - [No Hex Escape](no-hex-escape.md): Enforces a convention of using [Unicode escapes](https://mathiasbynens.be/notes/javascript-escapes#unicode) instead o... - [No Hooks](no-hooks.md): Disallows Jest setup and teardown hooks, such as`beforeAll`. - [No Html Link For Pages](no-html-link-for-pages.md): Prevents the usage of``elements to navigate between Next.js pages. - [No Identical Title](no-identical-title.md): This rule looks at the title of every test and test suite. - [No Img Element](no-img-element.md): Prevent the usage of``element due to slower - [No Immediate Mutation](no-immediate-mutation.md): Disallows mutating a variable immediately after initialization. - [No Implicit Coercion](no-implicit-coercion.md): Disallows shorthand type conversions using operators like`!!`,`+`,`""+`, etc. - [No Implied Eval](no-implied-eval.md): This rule disallows the use of eval-like methods. - [No Import Assign](no-import-assign.md): Disallow assigning to imported bindings. - [No Import Compiler Macros](no-import-compiler-macros.md): Disallow importing Vue compiler macros. - [No Import Node Test](no-import-node-test.md): This rule warns when`node:test`is imported (usually accidentally). - [No Import Type Side Effects](no-import-type-side-effects.md): Enforce the use of top-level`import type`qualifier when an import only - [No Inferrable Types](no-inferrable-types.md): Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean - [No Inline Comments](no-inline-comments.md): Disallows comments on the same line as code. - [No Inner Declarations](no-inner-declarations.md): Disallow variable or function declarations in nested blocks. - [No Instanceof Array](no-instanceof-array.md): Require`Array.isArray()`instead of`instanceof Array`. - [No Instanceof Builtins](no-instanceof-builtins.md): Disallows the use of`instanceof`with ECMAScript built-in constructors because: - [No Interpolation In Snapshots](no-interpolation-in-snapshots.md): Prevents the use of string interpolations in snapshots. - [No Invalid Fetch Options](no-invalid-fetch-options.md): Disallow invalid options in`fetch()`and`new Request()`. Specifically, this rule ensures that - [No Invalid Regexp](no-invalid-regexp.md): Disallow invalid regular expression strings in RegExp constructors. - [No Invalid Remove Event Listener](no-invalid-remove-event-listener.md): It warns when you use a non-function value as the second argument of`removeEventListener`. - [No Irregular Whitespace](no-irregular-whitespace.md): Disallows the use of irregular whitespace characters in the code. - [No Is Mounted](no-is-mounted.md): This rule prevents using`isMounted`in class components. - [No Iterator](no-iterator.md): Disallow the use of the`__iterator__`property - [No Jasmine Globals](no-jasmine-globals.md): This rule reports on any usage of Jasmine globals, which is not ported to - [No Label Var](no-label-var.md): Disallow labels that share a name with a variable. - [No Labels](no-labels.md): Disallow labeled statements. - [No Large Snapshots](no-large-snapshots.md): Disallow large snapshots. - [No Length As Slice End](no-length-as-slice-end.md): Disallow using`length`as the end argument of a`slice`call. - [No Lifecycle After Await](no-lifecycle-after-await.md): Disallow asynchronously registered lifecycle hooks. - [No Lone Blocks](no-lone-blocks.md): Disallows unnecessary standalone block statements. - [No Lonely If](no-lonely-if.md): Disallow`if`statements as the only statement in`else`blocks - [No Loop Func](no-loop-func.md): Disallows function declarations and expressions inside loop statements - [No Loss Of Precision](no-loss-of-precision.md): Disallow precision loss of number literal. - [No Magic Array Flat Depth](no-magic-array-flat-depth.md): Disallow magic numbers for`Array.prototype.flat`depth. - [No Magic Numbers](no-magic-numbers.md): This rule aims to make code more readable and refactoring easier by ensuring that special numbers are declared as con... - [No Map Spread](no-map-spread.md): Disallow the use of object or array spreads in - [No Meaningless Void Operator](no-meaningless-void-operator.md): This rule disallows the void operator when its argument is already of type void or undefined. - [No Misleading Character Class](no-misleading-character-class.md): This rule reports regular expressions which include multiple code point characters in character class syntax. This in... - [No Misused New](no-misused-new.md): Enforces valid definition of new and constructor. This rule prevents classes from defining - [No Misused Promises](no-misused-promises.md): This rule forbids providing Promises to logical locations such as if statements in places where the TypeScript - [No Misused Spread](no-misused-spread.md): This rule disallows spreading syntax in places where it doesn't make sense or could cause runtime errors. - [No Mixed Enums](no-mixed-enums.md): This rule disallows enums from having both string and numeric members. - [No Mocks Import](no-mocks-import.md): This rule reports imports from a path containing a **mocks** component. - [No Multi Assign](no-multi-assign.md): Disallow use of chained assignment expressions. - [No Multi Comp](no-multi-comp.md): Prevents multiple React components from being defined in the same file. - [No Multi Str](no-multi-str.md): Disallow multiline strings. - [No Multiple Resolved](no-multiple-resolved.md): This rule warns of paths that resolve multiple times in executor functions that Promise constructors. - [No Multiple Slot Args](no-multiple-slot-args.md): Disallow passing multiple arguments to scoped slots. - [No Mutable Exports](no-mutable-exports.md): Forbids the use of mutable exports with var or let. - [No Named As Default Member](no-named-as-default-member.md): Reports the use of an exported name (named export) as a property on the - [No Named As Default](no-named-as-default.md): Reports use of an exported name as the locally imported name of a default export. - [No Named Default](no-named-default.md): Reports use of a default export as a locally named import. - [No Named Export](no-named-export.md): Prohibit named exports. - [No Namespace](no-namespace.md): Enforce a convention of not using namespaced (a.k.a. "wildcard" \*) imports. - [No Negated Condition](no-negated-condition.md): Disallow negated conditions. - [No Negation In Equality Check](no-negation-in-equality-check.md): Disallow negated expressions on the left of (in)equality checks. - [No Nested Ternary](no-nested-ternary.md): Disallows nested ternary expressions to improve code readability and maintainability. - [No Nesting](no-nesting.md): Disallow nested then() or catch() statements. - [No New Array](no-new-array.md): Disallow`new Array()`. - [No New Buffer](no-new-buffer.md): Disallows the deprecated`new Buffer()`constructor. - [No New Func](no-new-func.md): The rule disallow`new`operators with the`Function`object. - [No New Native Nonconstructor](no-new-native-nonconstructor.md): Disallow`new`operators with global non-constructor functions (`Symbol`,`BigInt`). - [No New Require](no-new-require.md): Warn about calling`new`on`require`. - [No New Statics](no-new-statics.md): Disallows calling new on static`Promise`methods. - [No New Wrappers](no-new-wrappers.md): Disallow`new`operators with the`String`,`Number`, and`Boolean`objects - [No New](no-new.md): Disallow new operators outside of assignments or comparisons. - [No Nodejs Modules](no-nodejs-modules.md): Forbid the use of Node.js builtin modules. Can be useful for client-side web projects that do not have access to thos... - [No Non Null Asserted Nullish Coalescing](no-non-null-asserted-nullish-coalescing.md): Disallow non-null assertions in the left operand of a nullish coalescing operator. - [No Non Null Asserted Optional Chain](no-non-null-asserted-optional-chain.md): Disallow non-null assertions after an optional chain expression. - [No Non Null Assertion](no-non-null-assertion.md): Disallow non-null assertions using the ! postfix operator. - [No Noninteractive Tabindex](no-noninteractive-tabindex.md): This rule checks that non-interactive elements don't have a tabIndex which would make them interactive via keyboard n... - [No Nonoctal Decimal Escape](no-nonoctal-decimal-escape.md): This rule disallows \8 and \9 escape sequences in string literals - [No Null](no-null.md): Disallow the use of the`null`literal, to encourage using`undefined`instead. - [No Obj Calls](no-obj-calls.md): Disallow calling some global objects as functions. - [No Object As Default Parameter](no-object-as-default-parameter.md): Disallow the use of an object literal as a default value for a parameter. - [No Object Constructor](no-object-constructor.md): Disallow calls to the Object constructor without an argument - [No Optional Chaining](no-optional-chaining.md): Disallow [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_cha... - [No Param Reassign](no-param-reassign.md): Disallow reassigning function parameters or, optionally, their properties. - [No Plusplus](no-plusplus.md): Disallow the unary operators`++`and`--`. - [No Process Env](no-process-env.md): Disallows use of`process.env`. - [No Process Exit](no-process-exit.md): Disallow`process.exit()`. - [No Promise Executor Return](no-promise-executor-return.md): Disallow returning values from Promise executor functions. - [No Promise In Callback](no-promise-in-callback.md): Disallows the use of Promises within error-first callback functions. - [No Proto](no-proto.md): Disallow the use of the`__proto__`property. - [No Prototype Builtins](no-prototype-builtins.md): Disallow calling some Object.prototype methods directly on objects - [No Redeclare](no-redeclare.md): This rule disallows redeclaring variables within the same scope, ensuring that each variable - [No Redundant Roles](no-redundant-roles.md): Enforces that the explicit`role`property is not the same as - [No Redundant Should Component Update](no-redundant-should-component-update.md): Disallow usage of`shouldComponentUpdate`when extending`React.PureComponent`. - [No Redundant Type Constituents](no-redundant-type-constituents.md): This rule disallows type constituents of unions and intersections that are redundant. - [No Regex Spaces](no-regex-spaces.md): Disallow 2+ consecutive spaces in regular expressions. - [No Relative Parent Imports](no-relative-parent-imports.md): Forbids importing modules from parent directories using relative paths. - [No Render Return Value](no-render-return-value.md): This rule will warn you if you try to use the`ReactDOM.render()`return value. - [No Require Imports](no-require-imports.md): Forbids the use of CommonJS`require`calls. - [No Required Prop With Default](no-required-prop-with-default.md): Enforce props with default values to be optional. - [No Rest Spread Properties](no-rest-spread-properties.md): Disallow [Object Rest/Spread Properties](https://github.com/tc39/proposal-object-rest-spread#readme). - [No Restricted Globals](no-restricted-globals.md): This rule allows you to specify global variable names that you don't want to use in your application. - [No Restricted Imports](no-restricted-imports.md): This rule allows you to specify imports that you don’t want to use in your application. - [No Restricted Jest Methods](no-restricted-jest-methods.md): Restrict the use of specific`jest`and`vi`methods. - [No Restricted Matchers](no-restricted-matchers.md): Ban specific matchers & modifiers from being used, and can suggest alternatives. - [No Restricted Types](no-restricted-types.md): Disallow certain types from being used. - [No Return Assign](no-return-assign.md): Disallows assignment operators in return statements. - [No Return In Finally](no-return-in-finally.md): Disallow return statements in a finally() callback of a promise. - [No Return Wrap](no-return-wrap.md): Prevents unnecessary wrapping of return values in promises with either`Promise.resolve` - [No Script Component In Head](no-script-component-in-head.md): Prevent usage of`next/script`in`next/head`component. - [No Script Url](no-script-url.md): Disallow javascript: urls - [No Self Assign](no-self-assign.md): Disallow assignments where both sides are exactly the same. - [No Self Compare](no-self-compare.md): Disallow comparisons where both sides are exactly the same - [No Self Import](no-self-import.md): Forbids a module from importing itself. This can sometimes happen accidentally, - [No Sequences](no-sequences.md): Disallows the use of the comma operator. - [No Set State](no-set-state.md): Disallow the usage of`this.setState`in React components. - [No Setter Return](no-setter-return.md): Setters cannot return values. - [No Shadow Restricted Names](no-shadow-restricted-names.md): Disallows the redefining of global variables such as`undefined`,`NaN`,`Infinity`, - [No Single Promise In Promise Methods](no-single-promise-in-promise-methods.md): Disallow passing single-element arrays to Promise methods - [No Sparse Arrays](no-sparse-arrays.md): Disallow sparse arrays. - [No Standalone Expect](no-standalone-expect.md): Prevents`expect`statements outside of a`test`or`it`block. An`expect` - [No Static Element Interactions](no-static-element-interactions.md): Enforces that static HTML elements with event handlers must have appropriate ARIA roles. - [No Static Only Class](no-static-only-class.md): Disallow classes that only have static members. - [No String Refs](no-string-refs.md): This rule prevents using the deprecated behavior of string literals in ref attributes. - [No Sync Scripts](no-sync-scripts.md): This rule prevents the use of synchronous``tags in Next.js applications. - [No Template Curly In String](no-template-curly-in-string.md): Disallow template literal placeholder syntax in regular strings. This rule ensures that - [No Ternary](no-ternary.md): Disallow ternary operators - [No Test Prefixes](no-test-prefixes.md): Require using`.only`and`.skip`over`f`and`x`. - [No Test Return Statement](no-test-return-statement.md): Disallow explicitly returning from tests. - [No Thenable](no-thenable.md): Disallow`then`property - [No This Alias](no-this-alias.md): Disallow aliasing of`this`. - [No This Assignment](no-this-assignment.md): Disallow assigning`this`to a variable. - [No This Before Super](no-this-before-super.md): Requires calling`super()`before using`this`or`super`. - [No This In Before Route Enter](no-this-in-before-route-enter.md): Disallow`this`usage in a`beforeRouteEnter`method. - [No This In Exported Function](no-this-in-exported-function.md): Disallows the use of`this`in exported functions. - [No This In Sfc](no-this-in-sfc.md): Prevents using`this`in stateless functional components. - [No Throw Literal](no-throw-literal.md): Disallows throwing literals or non-Error objects as exceptions. - [No Title In Document Head](no-title-in-document-head.md): Prevent usage of``with`Head`component from`next/document`. - [No Typeof Undefined](no-typeof-undefined.md): Disallow`typeof`comparisons with`undefined`. - [No Typos](no-typos.md): Detects common typos in Next.js data fetching function names. - [No Unassigned Import](no-unassigned-import.md): This rule aims to remove modules with side-effects by reporting when a module is imported but not assigned. - [No Unassigned Vars](no-unassigned-vars.md): Disallow let or var variables that are read but never assigned - [No Undef](no-undef.md): Disallow the use of undeclared variables. - [No Undefined](no-undefined.md): Disallow the use of`undefined`as an identifier - [No Unescaped Entities](no-unescaped-entities.md): This rule prevents characters that you may have meant as JSX escape characters from being accidentally injected as a ... - [No Unexpected Multiline](no-unexpected-multiline.md): In most cases, semicolons are not required in JavaScript in order for code to be parsed - [No Unknown Property](no-unknown-property.md): Disallow usage of unknown DOM properties. - [No Unnecessary Array Flat Depth](no-unnecessary-array-flat-depth.md): Disallows passing`1`to`Array.prototype.flat` - [No Unnecessary Array Splice Count](no-unnecessary-array-splice-count.md): Disallows passing`.length`or`Infinity`as the`deleteCount`or`skipCount`argument of`Array#splice()`or`Array#... - [No Unnecessary Await](no-unnecessary-await.md): Disallow awaiting on non-promise values. - [No Unnecessary Boolean Literal Compare](no-unnecessary-boolean-literal-compare.md): This rule disallows unnecessary equality comparisons with boolean literals. - [No Unnecessary Parameter Property Assignment](no-unnecessary-parameter-property-assignment.md): Prevents unnecessary assignment of parameter properties. - [No Unnecessary Slice End](no-unnecessary-slice-end.md): Omitting the end argument defaults it to the object's .length. - [No Unnecessary Template Expression](no-unnecessary-template-expression.md): Disallows unnecessary template expressions (interpolations) that can be simplified. - [No Unnecessary Type Arguments](no-unnecessary-type-arguments.md): This rule disallows type arguments that are identical to the default type parameter. - [No Unnecessary Type Assertion](no-unnecessary-type-assertion.md): This rule disallows type assertions that do not change the type of an expression. - [No Unnecessary Type Constraint](no-unnecessary-type-constraint.md): Disallow unnecessary constraints on generic types. - [No Unneeded Async Expect Function](no-unneeded-async-expect-function.md): Disallows unnecessary async function wrapper for expected promises. - [No Unneeded Ternary](no-unneeded-ternary.md): Disallow ternary operators when simpler alternatives exist - [No Unreachable](no-unreachable.md): Disallow unreachable code after`return`,`throw`,`continue`, and`break`statements. - [No Unreadable Array Destructuring](no-unreadable-array-destructuring.md): Disallow unreadable array destructuring - [No Unreadable Iife](no-unreadable-iife.md): This rule disallows IIFEs with a parenthesized arrow function body. - [No Unsafe Argument](no-unsafe-argument.md): This rule disallows calling a function with an argument which is typed as`any`. - [No Unsafe Assignment](no-unsafe-assignment.md): This rule disallows assigning a value with type`any`to variables and properties. - [No Unsafe Call](no-unsafe-call.md): This rule disallows calling a value with type`any`. - [No Unsafe Declaration Merging](no-unsafe-declaration-merging.md): Disallow unsafe declaration merging. - [No Unsafe Enum Comparison](no-unsafe-enum-comparison.md): This rule disallows comparing an enum value with a non-enum value. - [No Unsafe Finally](no-unsafe-finally.md): Disallow control flow statements in`finally`blocks. - [No Unsafe Function Type](no-unsafe-function-type.md): Disallow using the unsafe built-in Function type. - [No Unsafe Member Access](no-unsafe-member-access.md): This rule disallows member access on a value with type`any`. - [No Unsafe Negation](no-unsafe-negation.md): Disallows negating the left operand of relational operators to prevent logical errors - [No Unsafe Optional Chaining](no-unsafe-optional-chaining.md): Disallow use of optional chaining in contexts where the undefined value is not allowed - [No Unsafe Return](no-unsafe-return.md): This rule disallows returning a value with type`any`from a function. - [No Unsafe Type Assertion](no-unsafe-type-assertion.md): Disallows unsafe type assertions that narrow a type. - [No Unsafe Unary Minus](no-unsafe-unary-minus.md): This rule disallows using the unary minus operator on a value which is not of type 'number' | 'bigint'. - [No Unsafe](no-unsafe.md): This rule identifies and restricts the use of unsafe React lifecycle methods. - [No Untyped Mock Factory](no-untyped-mock-factory.md): This rule triggers a warning if`mock()`or`doMock()`is used without a generic - [No Unused Expressions](no-unused-expressions.md): This rule disallows unused expressions. - [No Unused Labels](no-unused-labels.md): Disallow unused labels. - [No Unused Private Class Members](no-unused-private-class-members.md): Disallow unused private class members - [No Unused Vars](no-unused-vars.md): Disallows variable declarations, imports, or type declarations that are - [No Unwanted Polyfillio](no-unwanted-polyfillio.md): Prevent use of unsafe polyfill.io domains and duplicate polyfills. - [No Useless Backreference](no-useless-backreference.md): Disallows backreferences in regular expressions that will always be ignored - [No Useless Call](no-useless-call.md): Disallow unnecessary calls to`.call()`and`.apply()` - [No Useless Catch](no-useless-catch.md): Disallow unnecessary catch clauses - [No Useless Collection Argument](no-useless-collection-argument.md): Disallow useless values or fallbacks in Set, Map, WeakSet, or WeakMap - [No Useless Computed Key](no-useless-computed-key.md): Disallow unnecessary computed property keys in objects and classes - [No Useless Concat](no-useless-concat.md): Disallow unnecessary concatenation of literals or template literals - [No Useless Constructor](no-useless-constructor.md): Disallow constructors that can be safely removed without changing how the class works. - [No Useless Empty Export](no-useless-empty-export.md): Disallow empty exports that don't change anything in a module file. - [No Useless Error Capture Stack Trace](no-useless-error-capture-stack-trace.md): Disallows unnecessary`Error.captureStackTrace(…)`in error constructors. - [No Useless Escape](no-useless-escape.md): Disallow unnecessary escape characters. - [No Useless Fallback In Spread](no-useless-fallback-in-spread.md): Disallow useless fallback when spreading in object literals. - [No Useless Length Check](no-useless-length-check.md): It checks for an unnecessary array length check in a logical expression. - [No Useless Promise Resolve Reject](no-useless-promise-resolve-reject.md): Disallows returning values wrapped in`Promise.resolve`or`Promise.reject`in an async function or a`Promise#then`/... - [No Useless Rename](no-useless-rename.md): Disallow renaming import, export, and destructured assignments to the same name. - [No Useless Return](no-useless-return.md): Disallows redundant return statements. - [No Useless Spread](no-useless-spread.md): Disallows using spread syntax in following, unnecessary cases: - [No Useless Switch Case](no-useless-switch-case.md): Disallows useless default cases in switch statements. - [No Useless Undefined](no-useless-undefined.md): Do not use useless`undefined`. - [No Var Requires](no-var-requires.md): Disallow`require`statements except in import statements. - [No Var](no-var.md): ECMAScript 2015 allows programmers to create variables with block scope - [No Void](no-void.md): Disallows the use of the`void`operator. - [No Warning Comments](no-warning-comments.md): Disallows warning comments such as TODO, FIXME, XXX in code. - [No Webpack Loader Syntax](no-webpack-loader-syntax.md): Forbids using Webpack loader syntax directly in import or require statements. - [No Will Update Set State](no-will-update-set-state.md): Disallows using`setState`in the`componentWillUpdate`lifecycle method. - [No With](no-with.md): Disallow [`with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with) statements. - [No Wrapper Object Types](no-wrapper-object-types.md): Disallow the use of wrapper object types. - [No Zero Fractions](no-zero-fractions.md): Prevents the use of zero fractions. - [Non Nullable Type Assertion Style](non-nullable-type-assertion-style.md): This rule prefers a non-null assertion over an explicit type cast for non-nullable types. - [Number Arg Out Of Range](number-arg-out-of-range.md): Checks whether the radix or precision arguments of number-related functions exceeds the limit. - [Number Literal Case](number-literal-case.md): This rule enforces proper case for numeric literals. - [Numeric Separators Style](numeric-separators-style.md): Enforces a convention of grouping digits using numeric separators. - [Only Export Components](only-export-components.md): Ensures that modules only **export React components (and related HMR-safe items)** so - [Only Throw Error](only-throw-error.md): This rule disallows throwing non-Error values. - [Only Used In Recursion](only-used-in-recursion.md): Checks for arguments that are only used in recursion with no side-effects. - [Operator Assignment](operator-assignment.md): This rule requires or disallows assignment operator shorthand where possible. - [Output formats](output-formats.md): Oxlint supports multiple output formats for emitting lint results. These can be used to integrate with various CI sys... - [Padding Around Test Blocks](padding-around-test-blocks.md): This rule enforces a line of padding before and after 1 or more - [Param Names](param-names.md): Enforce standard parameter names for Promise constructors. - [Parser](parser.md): The Oxc parser is designed to be the fastest and most conformant JavaScript and TypeScript parser available. Contribu... - [Pursuit of Performance on Building a JavaScript Compiler](performance.md): Originally posted on - [Built-in Plugins](plugins.md): Oxlint includes built-in implementations of many popular ESLint plugin rule sets. Most rules in the`recommended`con... - [Prefer Add Event Listener](prefer-add-event-listener.md): Enforces the use of`.addEventListener()`and`.removeEventListener()`over their`on`-function counterparts. - [Prefer Array Find](prefer-array-find.md): Encourages using`Array.prototype.find`instead of`filter(...)[0]`or - [Prefer Array Flat Map](prefer-array-flat-map.md): Prefers the use of`.flatMap()`when`map().flat()`are used together. - [Prefer Array Flat](prefer-array-flat.md): Prefers`Array#flat()`over legacy techniques to flatten arrays. - [Prefer Array Index Of](prefer-array-index-of.md): Enforces using`indexOf`or`lastIndexOf`instead of`findIndex`or`findLastIndex` - [Prefer Array Some](prefer-array-some.md): Prefers using [`Array#some()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array... - [Prefer As Const](prefer-as-const.md): Enforce the use of`as const`over literal type. - [Prefer At](prefer-at.md): Prefer`.at()`method for index access and`String#charAt()`. - [Prefer Await To Callbacks](prefer-await-to-callbacks.md): The rule encourages the use of`async/await`for handling asynchronous code - [Prefer Await To Then](prefer-await-to-then.md): Prefer`await`to`then()`/`catch()`/`finally()`for reading Promise values - [Prefer Bigint Literals](prefer-bigint-literals.md): Requires using BigInt literals (e.g.`123n`) instead of calling the`BigInt()`constructor - [Prefer Blob Reading Methods](prefer-blob-reading-methods.md): Recommends using`Blob#text()`and`Blob#arrayBuffer()`over`FileReader#readAsText()`and`FileReader#readAsArrayBuf... - [Prefer Called Once](prefer-called-once.md): Substitute`toBeCalledTimes(1)`and`toHaveBeenCalledTimes(1)`with - [Prefer Called Times](prefer-called-times.md): This rule aims to enforce the use of`toBeCalledTimes(1)`or`toHaveBeenCalledTimes(1)`over`toBeCalledOnce()`or`t... - [Prefer Called With](prefer-called-with.md): Suggest using`toBeCalledWith()`or`toHaveBeenCalledWith()` - [Prefer Catch](prefer-catch.md): Prefer`catch`to`then(a, b)`and`then(null, b)`. This rule disallows the passing of an - [Prefer Class Fields](prefer-class-fields.md): Prefers class field declarations over`this`assignments in constructors for static values. - [Prefer Classlist Toggle](prefer-classlist-toggle.md): Prefers the use of`element.classList.toggle(className, condition)`over - [Prefer Code Point](prefer-code-point.md): Prefers usage of`String.prototype.codePointAt`over`String.prototype.charCodeAt`. - [Prefer Comparison Matcher](prefer-comparison-matcher.md): This rule checks for comparisons in tests that could be replaced with one of the - [Prefer Const](prefer-const.md): Requires`const`declarations for variables that are never - [Prefer Date Now](prefer-date-now.md): Prefers use of`Date.now()`over`new Date().getTime()`or`new Date().valueOf()`. - [Prefer Default Export](prefer-default-export.md): In exporting files, this rule checks if there is default export or not. - [Prefer Default Parameters](prefer-default-parameters.md): Instead of reassigning a function parameter, default parameters should be used. The`foo = foo || 123`statement eval... - [Prefer Describe Function Title](prefer-describe-function-title.md): When testing a specific function, this rule aims to enforce passing a named function to describe() - [Prefer Destructuring](prefer-destructuring.md): Require destructuring from arrays and/or objects - [Prefer Dom Node Append](prefer-dom-node-append.md): Enforces the use of, for example,`document.body.append(div);`over`document.body.appendChild(div);`for DOM nodes. - [Prefer Dom Node Dataset](prefer-dom-node-dataset.md): Use [`.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) on DOM elements over`getAttri... - [Prefer Dom Node Remove](prefer-dom-node-remove.md): Prefers the use of`child.remove()`over`parentNode.removeChild(child)`. - [Prefer Dom Node Text Content](prefer-dom-node-text-content.md): Enforces the use of`.textContent`over`.innerText`for DOM nodes. - [Prefer Each](prefer-each.md): This rule enforces using`each`rather than manual loops. - [Prefer Enum Initializers](prefer-enum-initializers.md): Require each enum member value to be explicitly initialized. - [Prefer Equality Matcher](prefer-equality-matcher.md): Jest has built-in matchers for expecting equality, which allow for more readable - [Prefer Es6 Class](prefer-es6-class.md): React offers you two ways to create traditional components: using the - [Prefer Event Target](prefer-event-target.md): Prefers`EventTarget`over`EventEmitter`. - [Prefer Expect Resolves](prefer-expect-resolves.md): Prefer`await expect(...).resolves`over`expect(await ...)`when testing - [Prefer Exponentiation Operator](prefer-exponentiation-operator.md): Disallow the use of Math.pow in favor of the \*\* operator - [Prefer For Of](prefer-for-of.md): Enforces the use of for-of loop instead of a for loop with a simple iteration. - [Prefer Function Type](prefer-function-type.md): Enforce using function types instead of interfaces with call signatures. - [Prefer Global This](prefer-global-this.md): Enforces the use of [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/g... - [Prefer Hooks In Order](prefer-hooks-in-order.md): Ensures that hooks are in the order that they are called in. - [Prefer Hooks On Top](prefer-hooks-on-top.md): While hooks can be setup anywhere in a test file, they are always called in a - [Prefer Import From Vue](prefer-import-from-vue.md): Enforce`import from 'vue'`instead of`import from '@vue/*'`. - [Prefer Includes](prefer-includes.md): Enforce using`.includes()`instead of`.indexOf() !== -1`or`/regex/.test()`. - [Prefer Jest Mocked](prefer-jest-mocked.md): When working with mocks of functions using Jest, it's recommended to use the - [Prefer Keyboard Event Key](prefer-keyboard-event-key.md): Enforces the use of [`KeyboardEvent#key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) over [`... - [Prefer Literal Enum Member](prefer-literal-enum-member.md): Explicit enum value must only be a literal value (string, number, boolean, etc). - [Prefer Logical Operator Over Ternary](prefer-logical-operator-over-ternary.md): This rule finds ternary expressions that can be simplified to a logical operator. - [Prefer Lowercase Title](prefer-lowercase-title.md): Enforce`it`,`test`,`describe`, and`bench`to have descriptions that begin with a - [Prefer Math Min Max](prefer-math-min-max.md): Prefers use of`Math.min()`and`Math.max()`instead of ternary - [Prefer Math Trunc](prefer-math-trunc.md): Prefers use of [`Math.trunc()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math... - [Prefer Mock Promise Shorthand](prefer-mock-promise-shorthand.md): When working with mocks of functions that return promises, Jest provides some - [Prefer Modern Dom Apis](prefer-modern-dom-apis.md): Enforces the use of: - [Prefer Modern Math Apis](prefer-modern-math-apis.md): Checks for usage of legacy patterns for mathematical operations. - [Prefer Namespace Keyword](prefer-namespace-keyword.md): This rule reports when the module keyword is used instead of namespace. - [Prefer Native Coercion Functions](prefer-native-coercion-functions.md): Prefers built in functions, over custom ones with the same functionality. - [Prefer Negative Index](prefer-negative-index.md): Prefer negative index over`.length`- index when possible - [Prefer Node Protocol](prefer-node-protocol.md): Prefer using the`node:protocol`when importing Node.js builtin modules - [Prefer Nullish Coalescing](prefer-nullish-coalescing.md): Enforce using the nullish coalescing operator (`??`) instead of logical OR (`||`) - [Prefer Number Properties](prefer-number-properties.md): Disallows use of`parseInt()`,`parseFloat()`,`isNan()`,`isFinite()`,`Nan`,`Infinity`and`-Infinity`as global v... - [Prefer Numeric Literals](prefer-numeric-literals.md): Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal - [Prefer Object From Entries](prefer-object-from-entries.md): Encourages using`Object.fromEntries`when converting an array of key-value pairs - [Prefer Object Has Own](prefer-object-has-own.md): Disallow use of`Object.prototype.hasOwnProperty.call()`and prefer use of`Object.hasOwn()` - [Prefer Object Spread](prefer-object-spread.md): Disallow using`Object.assign`with an object literal as the first argument and prefer the use of object spread instead - [Prefer Optional Catch Binding](prefer-optional-catch-binding.md): Prefers omitting the catch binding parameter if it is unused - [Prefer Optional Chain](prefer-optional-chain.md): Enforce using concise optional chain expressions instead of chained logical AND - [Prefer Promise Reject Errors](prefer-promise-reject-errors.md): Require using Error objects as Promise rejection reasons. - [Prefer Prototype Methods](prefer-prototype-methods.md): This rule prefers borrowing methods from the prototype instead of the instance. - [Prefer Query Selector](prefer-query-selector.md): Prefer`.querySelector()`over`.getElementById()`,`.querySelectorAll()`over`.getElementsByClassName()`and`.getE... - [Prefer Reduce Type Parameter](prefer-reduce-type-parameter.md): This rule prefers using a type parameter for the accumulator in Array.reduce instead of casting. - [Prefer Reflect Apply](prefer-reflect-apply.md): Disallows the use of`Function.prototype.apply()`and suggests using`Reflect.apply()`instead. - [Prefer Regexp Test](prefer-regexp-test.md): Prefers`RegExp#test()`over`String#match()`and`String#exec()`. - [Prefer Response Static Json](prefer-response-static-json.md): Enforces the use of`Response.json()`over`new Response(JSON.stringify())`. - [Prefer Rest Params](prefer-rest-params.md): Disallows the use of the`arguments`object and instead enforces the use of rest parameters. - [Prefer Return This Type](prefer-return-this-type.md): This rule enforces using`this`types for return types when possible. - [Prefer Set Has](prefer-set-has.md): Prefer`Set#has()`over`Array#includes()`when checking for existence or non-existence. - [Prefer Set Size](prefer-set-size.md): Prefer`Set#size`over`Set#length`when the`Set`is converted to an array. - [Prefer Spread](prefer-spread.md): Require spread operators instead of`.apply()` - [Prefer Spy On](prefer-spy-on.md): When mocking a function by overwriting a property you have to manually restore - [Prefer Strict Equal](prefer-strict-equal.md): This rule triggers a warning if`toEqual()`is used to assert equality. - [Prefer String Raw](prefer-string-raw.md): Prefers use of String.raw to avoid escaping . - [Prefer String Replace All](prefer-string-replace-all.md): Prefers [`String#replaceAll()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Stri... - [Prefer String Slice](prefer-string-slice.md): Prefer [`String#slice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/sli... - [Prefer String Starts Ends With](prefer-string-starts-ends-with.md): Prefer [`String#startsWith()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/s... - [Prefer String Trim Start End](prefer-string-trim-start-end.md): [`String#trimLeft()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimLef... - [Prefer Structured Clone](prefer-structured-clone.md): Prefer using structuredClone to create a deep clone. - [Prefer Tag Over Role](prefer-tag-over-role.md): Enforces using semantic HTML tags over`role`attribute. - [Prefer Template](prefer-template.md): Require template literals instead of string concatenation. - [Prefer To Be Falsy](prefer-to-be-falsy.md): This rule warns when`toBe(false)`is used with`expect`or`expectTypeOf`. - [Prefer To Be Object](prefer-to-be-object.md): This rule enforces using`toBeObject()`to check if a value is of type`Object`. - [Prefer To Be Truthy](prefer-to-be-truthy.md): This rule warns when`toBe(true)`is used with`expect`or`expectTypeOf`. - [Prefer To Be](prefer-to-be.md): Recommends using`toBe`matcher for primitive literals and specific - [Prefer To Contain](prefer-to-contain.md): In order to have a better failure message,`toContain()`should be used upon - [Prefer To Have Been Called Times](prefer-to-have-been-called-times.md): In order to have a better failure message, [`toHaveBeenCalledTimes`should be used - [Prefer To Have Been Called](prefer-to-have-been-called.md): Suggests using`toHaveBeenCalled()`or`not.toHaveBeenCalled()`over`toHaveBeenCalledTimes(0)`or`toBeCalledTimes(0)`. - [Prefer To Have Length](prefer-to-have-length.md): In order to have a better failure message,`toHaveLength()`should be used upon - [Prefer Todo](prefer-todo.md): When test cases are empty then it is better to mark them as`test.todo`as it - [Prefer Top Level Await](prefer-top-level-await.md): Prefer top-level await over top-level promises and async function calls. - [Prefer Ts Expect Error](prefer-ts-expect-error.md): Enforce using @ts-expect-error over @ts-ignore. - [Prefer Type Error](prefer-type-error.md): Enforce throwing a`TypeError`instead of a generic`Error`after a type checking if-statement. - [Preserve Caught Error](preserve-caught-error.md): Enforces that when re-throwing an error in a catch block, the original error - [Profiling](profiling.md): For profiling, you will need to compile the`oxlint`binary in release mode with debug information enabled. You can d... - [Projects Using Oxc](projects.md): * [Andromeda](https://github.com/tryandromeda/andromeda) - A modern, and secure JavaScript & TypeScript runtime built... - [Promise Function Async](promise-function-async.md): This rule requires any function or method that returns a Promise to be marked as async. - [Quickstart](quickstart.md): Recommended setup and common workflows. - [Radix](radix.md): Enforce the consistent use of the radix argument when using`parseInt()`. - [React In Jsx Scope](react-in-jsx-scope.md): Enforces that React is imported and in-scope when using JSX syntax. - [References](references.md): * [The Rust Performance Book](https://nnethercote.github.io/perf-book/introduction.html) - [Related Getter Setter Pairs](related-getter-setter-pairs.md): This rule enforces that getters and setters for the same property are defined together and have related types. - [Require Array Join Separator](require-array-join-separator.md): Enforce using the separator argument with Array#join() - [Require Array Sort Compare](require-array-sort-compare.md): This rule requires Array.sort() to be called with a comparison function. - [Require Await](require-await.md): Disallow async functions which have no`await`expression. - [Require Default Export](require-default-export.md): Require components to be the default export. - [Require Hook](require-hook.md): This rule flags any expression that is either at the toplevel of a test file or - [Require Local Test Context For Concurrent Snapshots](require-local-test-context-for-concurrent-snapshots.md): The rule is intended to ensure that concurrent snapshot tests are executed - [Require Module Attributes](require-module-attributes.md): This rule enforces non-empty attribute list in import/export statements and import() expressions. - [Require Module Specifiers](require-module-specifiers.md): Enforce non-empty specifier list in`import`and`export`statements. - [Require Number To Fixed Digits Argument](require-number-to-fixed-digits-argument.md): Enforce using the digits argument with Number.toFixed() - [Require Param Description](require-param-description.md): Requires that each`@param`tag has a description value. - [Require Param Name](require-param-name.md): Requires that all`@param`tags have names. - [Require Param Type](require-param-type.md): Requires that each`@param`tag has a type value (within curly brackets). - [Require Param](require-param.md): Requires that all function parameters are documented with JSDoc`@param`tags. - [Require Post Message Target Origin](require-post-message-target-origin.md): Enforce using the targetOrigin argument with window.postMessage() - [Require Property Description](require-property-description.md): Requires that all`@property`tags have descriptions. - [Require Property Name](require-property-name.md): Requires that all`@property`tags have names. - [Require Property Type](require-property-type.md): Requires that each`@property`tag has a type value (within curly brackets). - [Require Property](require-property.md): Requires that all`@typedef`and`@namespace`tags have`@property`tags - [Require Render Return](require-render-return.md): Enforce ES5 or ES2015 class for returning value in the`render`function. - [Require Returns Description](require-returns-description.md): Requires that the`@returns`tag has a description value. - [Require Returns Type](require-returns-type.md): Requires that`@returns`tag has a type value (in curly brackets). - [Require Returns](require-returns.md): Requires that return statements are documented. - [Require To Throw Message](require-to-throw-message.md): This rule triggers a warning if`toThrow()`or`toThrowError()`is used without an error message. - [Require Top Level Describe](require-top-level-describe.md): Requires test cases and hooks to be inside a top-level`describe`block. - [Require Typed Ref](require-typed-ref.md): Require`ref`and`shallowRef`functions to be strongly typed. - [Require Yield](require-yield.md): This rule generates warnings for generator functions that do not have the yield keyword. - [Require Yields](require-yields.md): Requires that yields are documented. - [Resolver](resolver.md): The Oxc resolver is a high-performance Node.js module resolution implementation that's compatible with webpack's enha... - [Restrict Plus Operands](restrict-plus-operands.md): This rule requires both operands of addition to be the same type and be number, string, or any. - [Restrict Template Expressions](restrict-template-expressions.md): This rule restricts the types allowed in template literal expressions. - [Return Await](return-await.md): This rule enforces consistent returning of awaited values from async functions. - [Role Has Required Aria Props](role-has-required-aria-props.md): Enforces that elements with ARIA roles must have all required attributes - [Role Supports Aria Props](role-supports-aria-props.md): Enforce that elements with explicit or implicit roles defined contain only`aria-*`properties supported by that`role`. - [Rules Of Hooks](rules-of-hooks.md): Enforces the Rules of Hooks, ensuring that React Hooks are only called - [Rules](rules.md): The progress of all rule implementations is tracked [here](https://github.com/oxc-project/oxc/issues/481). - [Scope](scope.md): The scope prop should be used only on``elements. - [Security](security.md): The following security policies are applied to all projects within the [oxc-project](https://github.com/oxc-project) ... - [Self Closing Comp](self-closing-comp.md): Detects components without children which can be self-closed to avoid - [Semantic_Analysis](semantic-analysis.md): Semantic analysis is the process of checking whether our source code is correct or not. - [Sort Imports](sort-imports.md): This rule checks all import declarations and verifies that all imports are first sorted - [Sort Keys](sort-keys.md): When declaring multiple properties, sorting property names alphabetically makes it easier - [Sort Vars](sort-vars.md): When declaring multiple variables within the same block, sorting variable names make it - [Sorting](sorting.md): Oxfmt includes sorting features for imports, Tailwind classes, and package.json. - [Spec Only](spec-only.md): Disallow use of non-standard Promise static methods. - [Spec](spec.md): [The ECMAScript® 2023 Language Specification](https://tc39.es/ecma262/) details everything about the JavaScript langu... - [🌟 Become an Oxc Sponsor](sponsor.md): You may sponsor through [GitHub Sponsors](https://github.com/sponsors/Boshen) or [OpenCollective](https://opencollect... - [State In Constructor](state-in-constructor.md): Enforces the state initialization style to be either in a - [Strict Boolean Expressions](strict-boolean-expressions.md): Disallow certain types in boolean expressions. - [Style Prop Object](style-prop-object.md): Require that the value of the prop`style`be an object or a variable that is an object. - [Switch Case Braces](switch-case-braces.md): Requires empty switch cases to omit braces, while non-empty cases must use braces. - [Switch Exhaustiveness Check](switch-exhaustiveness-check.md): This rule requires switch statements to be exhaustive when switching on union types. - [Symbol Description](symbol-description.md): Require symbol descriptions. - [Syntax Normalization](syntax-normalization.md): Oxc minifier supports transforming syntaxes to make the output shorter and repetitive. - [Tabindex No Positive](tabindex-no-positive.md): Enforces that positive values for the`tabIndex`attribute are not used - [Terminology](terminology.md): A value being assigned/bound within a scope. - [Test](test.md): ::: info - [Text Encoding Identifier Case](text-encoding-identifier-case.md): This rule enforces consistent casing for text encoding identifiers, specifically: - [Throw New Error](throw-new-error.md): This rule makes sure you always use`new`when throwing an error. - [Transformer](transformer.md): The Oxc transformer is responsible for converting higher versions of ECMAScript and TypeScript to lower versions that... - [Triple Slash Reference](triple-slash-reference.md): Disallow certain triple slash directives in favor of ES module import declarations. - [Troubleshooting](troubleshooting.md): This is a npm (< v11.3.0) bug, things you can try: - [Type Aware](type-aware.md): Type-aware linting enables rules that rely on TypeScript’s type system, such as detecting unhandled promises or unsaf... - [Typescript](typescript.md): Oxc transformer supports transforming TypeScript to JavaScript. - [Unambiguous](unambiguous.md): Warn if a`module`could be mistakenly parsed as a`script`instead of - [Unbound Method](unbound-method.md): This rule enforces unbound methods are called with their expected scope. - [Unicode Bom](unicode-bom.md): Require or disallow Unicode byte order mark (BOM) - [Uninvoked Array Callback](uninvoked-array-callback.md): This rule applies when an Array function has a callback argument used for an array with empty slots. - [Unsupported features](unsupported-features.md): :::info - [Use Isnan](use-isnan.md): Disallows checking against NaN without using`isNaN()`call. - [Use Unknown In Catch Callback Variable](use-unknown-in-catch-callback-variable.md): This rule enforces using`unknown`for catch clause variables instead of`any`. - [Valid Define Emits](valid-define-emits.md): This rule checks whether defineEmits compiler macro is valid. - [Valid Define Props](valid-define-props.md): This rule checks whether`defineProps`compiler macro is valid. - [Valid Describe Callback](valid-describe-callback.md): This rule validates that the second parameter of a`describe()`function is a - [Valid Expect](valid-expect.md): Checks that`expect()`is called correctly. - [Valid Params](valid-params.md): Enforces the proper number of arguments are passed to Promise functions. - [Valid Title](valid-title.md): Checks that the titles of Jest and Vitest blocks are valid. - [Valid Typeof](valid-typeof.md): Enforce comparing`typeof`expressions against valid strings. - [Vars On Top](vars-on-top.md): Enforces that all`var`declarations are placed at the top of their containing scope. - [Versioning policy](versioning.md): Oxlint follows semantic versioning, with the goal of providing clarity and predictability as you upgrade. - [Void Dom Elements No Children](void-dom-elements-no-children.md): Disallow void DOM elements (e.g.``,``) from receiving children. - [VS Code Extension](vscode.md): ::: tip - [Warn Todo](warn-todo.md): This rule triggers warnings when`.todo`is used in`describe`,`it`, or`test`functions. - [What is Oxc?](what-is-oxc.md): /oʊ ɛks siː/ - [Whitespace Stripping](whitespace-stripping.md): Oxc minifier supports removing whitespace and comments. - [Yoda](yoda.md): Require or disallow "Yoda" conditions.