Skip to main content

Rules

JavaScript

noArguments (since v0.7.0)

Disallow the use of arguments

noAsyncPromiseExecutor (since v0.7.0)

Disallows using an async function as a Promise executor.

noCatchAssign (since v0.7.0)

Disallow reassigning exceptions in catch clauses

noCompareNegZero (since v0.7.0)

Disallow comparing against -0

noDeadCode (since v0.7.0)

Disallow unreachable code

noDebugger (since v0.7.0)

Disallow the use of debugger

noDelete (since v0.7.0)

Disallow the use of the delete operator

noDoubleEquals (since v0.7.0)

Require the use of === and !==

noEmptyPattern (since v0.7.0)

Disallows empty destructuring patterns.

noFunctionAssign (since v0.7.0)

Disallow reassigning function declarations.

noLabelVar (since v0.7.0)

Disallow labels that share a name with a variable

noNegationElse (since v0.7.0)

Disallow negation in the condition of an if statement if it has an else clause

noShoutyConstants (since v0.7.0)

Disallow the use of constants which its value is the upper-case version of its name.

noSparseArray (since v0.7.0)

Disallow sparse arrays

noUnnecessaryContinue (since v0.7.0)

Avoid using unnecessary ContinueStatement.

noUnsafeNegation (since v0.7.0)

Disallow using unsafe negation.

noUnusedTemplateLiteral (since v0.7.0)

Disallow template literals if interpolation and special-character handling are not needed

useBlockStatements (since v0.7.0)

Requires following curly brace conventions. JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity.

useSimplifiedLogicExpression (since v0.7.0)

Discard redundant terms from logical expressions.

useSingleCaseStatement (since v0.7.0)

Enforces case clauses have a single statement, emits a quick fix wrapping the statements in a block

useSingleVarDeclarator (since v0.7.0)

Disallow multiple variable declarations in the same variable statement

useTemplate (since v0.7.0)

Template literals are preferred over string concatenation.

useValidTypeof (since v0.7.0)

This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions

useWhile (since v0.7.0)

Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed

JSX

noCommentText (since v0.7.0)

Prevent comments from being inserted as text nodes

noImplicitBoolean (since v0.7.0)

Disallow implicit true values on JSX boolean attributes

useSelfClosingElements (since v0.7.0)

Prevent extra closing tags for components without children

RegExp

noMultipleSpacesInRegularExpressionLiterals (since v0.7.0)

Disallow unclear usage of multiple space characters in regular expression literals

TypeScript

useShorthandArrayType (since v0.7.0)

When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.