Skip to main content

Rules

JavaScript

Rule semantics and descriptions taken from ESLint. See individual rule docs for direct references.

noArguments

disallow the use of `arguments`

noAsyncPromiseExecutor

disallow using an async function as a Promise executor

noCatchAssign

disallow reassigning exceptions in `catch` clauses

noCommaOperator

disallow comma operators

noCompareNegZero

disallow comparing against `-0`

noCondAssign

disallow assignment operators in conditional expressions

noDebugger

disallow the use of `debugger`

noDelete

disallow the use of the `delete` operator

noDeleteVars

disallow deleting variables

noDoubleEquals

require the use of `===` and `!==`

noDupeArgs

disallow duplicate arguments in `function` definitions

noDuplicateCase

disallow duplicate case labels

noDuplicateImportSource

disallow several import statements for a module

noDuplicateKeys

disallow duplicate keys in object literals

noEmptyBlocks

disallow empty block statements

noExtraBooleanCast

disallow unnecessary boolean casts

noFunctionAssign

disallow reassigning `function` declarations

noGetterReturn

enforce `return` statements in getters

noImportAssign

disallow assigning to imported bindings

noLabelVar

disallow labels that share a name with a variable

noNegationElse

MISSING DOCUMENTATION

noNestedTernary

disallow nested ternary expressions

noRestrictedGlobals

disallow certain global variables

noSetterReturn

disallow returning values from setters

noShadowRestrictedNames

disallow identifiers from shadowing restricted names

noShoutyConstants

MISSING DOCUMENTATION

noSparseArray

disallow sparse arrays

noTemplateCurlyInString

disallow template literal placeholder syntax in regular strings

noUndeclaredVariables

MISSING DOCUMENTATION

noUnnecessaryContinue

disallow unnecessary `continue` statements inside loops

noUnsafeFinally

disallow control flow statements in `finally` blocks

noUnsafeNegation

disallow negating the left operand of relational operators

noUnusedTemplateLiteral

MISSING DOCUMENTATION

noUnusedVariables

disallow unused variables

noVar

require `let` or `const` instead of `var`

preferOptionalChaining

MISSING DOCUMENTATION

useBlockStatements

MISSING DOCUMENTATION

useCamelCase

enforce camelcase naming convention

useDefaultExportBasename

MISSING DOCUMENTATION

useDefaultImportBasename

MISSING DOCUMENTATION

useFunctionDeclarations

MISSING DOCUMENTATION

useSingleCaseStatement

MISSING DOCUMENTATION

useSingleVarDeclarator

MISSING DOCUMENTATION

useSortedSpecifiers

MISSING DOCUMENTATION

useTemplate

require template literals instead of string concatenation

useWhile

MISSING DOCUMENTATION

TypeScript

noExplicitAny

it bans the use of `any`

preferShorthandArrayType

promotes the use of `[]` over `Array<>`

useInterfaces

MISSING DOCUMENTATION

JSX Accessibility

Rule semantics and descriptions taken from eslint-plugin-jsx-a11y. See individual rule docs for direct references.

noAccessKey

enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader

noAriaUnsupportedElements

enforce that elements that do not support ARIA roles, states, and properties do not have those attributes

noAutofocus

discourage the usage of `autoFocus`

noDistractingElements

enforce distracting elements are not used

noHeaderScope

enforce scope prop is only used on `th` elements

noNoninteractiveElementToInteractiveRole

non-interactive elements should not be assigned interactive roles

noNoninteractiveTabindex

"`tabIndex` should only be declared on interactive elements"

noOnChange

discourage the usage of `onChange`

noPositiveTabindex

enforce tabIndex value is not greater than zero

noRedundantAlt

enforce `img` alt prop does not contain the word "image", "picture", or "photo"

noRedundantRoles

enforce explicit role property is not the same as implicit/default role property on element

noTargetBlank

Prevent usage of unsafe `target="_blank"`

useAltText

enforce alternative text

useAnchorContent

enforce that anchors have content and that the content is accessible to screen readers

useAriaProps

enforce all `aria-*` props are valid

useAriaPropsForRole

enforce that elements with ARIA roles must have all required attributes for that role

useAriaProptypes

enforce ARIA state and property values are valid

useHeadingContent

enforce heading (`h1`, `h2`, etc) elements contain accessible content

useHtmlLang

the `lang` attribute is mandatory

useIframeTitle

enforce `iframe` elements have a title attribute

useKeyWithClickEvents

enforce a clickable non-interactive element has at least one keyboard event listener.

useKeyWithMouseEvents

enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users

useMediaCaption

enforces that `audio` and `video` elements must have a `track` for captions

useValidAnchor

enforce all anchors are valid, navigable elements

useValidLang

check if `lang` attribute is valid

React

Rule semantics and descriptions taken from eslint-plugin-react. See individual rule docs for direct references.

noAccessStateInSetState

prevent using `this.state` within a `this.setState`

noArrayIndexKey

prevent usage of Array index in keys

noChildrenProp

prevent passing of children as props

noDanger

prevent usage of dangerous JSX props

noDangerWithChildren

report when a DOM element is using both `children` and `dangerouslySetInnerHTML`

noDidMountSetState

prevent usage of `setState` in `componentDidMount`

noDidUpdateSetState

pevent usage of `setState` in `componentDidUpdate`

noDirectMutationState

prevent direct mutation of `this.state`

noFindDOMNode

prevent usage of `findDOMNode`

noRedundantShouldComponentUpdate

flag `shouldComponentUpdate` when extending `PureComponent`

noRenderReturnValue

prevent usage of the return value of `React.render`

noStringRefs

prevent string definitions for references and prevent referencing `this.refs`

noThisInSFC

report `this` being used in stateless components

noUnsafe

prevent usage of unsafe lifecycle methods

noUselessFragment

disallow unnecessary fragments

noVoidElementsWithChildren

This rules prevent void elements from have children

noWillUpdateSetState

prevent usage of `setState` in `componentWillUpdate`

useButtonType

Enforces a `type` attribute for `button`

useFragmentSyntax

This rule enforces the use of `<>...</>`

useKey

This rule detects a missing `key` prop

useRenderReturn

This rule makes sure the render function is returning content

useSortComp

enforce component methods order

useStylePropObject

enforce style prop value is an object