Rules Reference
Browse all 81 rules organized across 17 categories. Each rule includes a description, examples, and configuration options where applicable.
eslint --fixconfigurable Has customizable optionsTS TypeScript onlyArrays
Array formatting, callback destructuring, and line break rules
array-callback-destructureWhen destructuring parameters in array method callbacks, enforces each property on its own line when there are 2 or more properties
array-items-per-lineCollapse arrays with few items to one line; expand larger arrays with each item on its own line
array-objects-on-new-linesEach object in an array starts on its own line for better visual scanning
Arrow Functions
Arrow function body style, implicit returns, and curried functions
arrow-function-block-bodyArrow functions with multiline expressions should use block body or wrap in parentheses
arrow-function-simple-jsxCollapse arrow functions returning simple single-element JSX to one line
arrow-function-simplifyConvert block body with single return to implicit return
curried-arrow-same-lineCurried arrow functions start on same line as =>, not on new line
Call Expressions
Function call argument formatting, bracket placement, and single-line rules
function-arguments-formatFormat function call arguments consistently — one per line when threshold is met
nested-call-closing-bracketsChain closing brackets on same line: })); not scattered across lines
no-empty-lines-in-function-callsNo empty lines between arguments or after opening/before closing parentheses
opening-brackets-same-lineOpening brackets in function arguments stay on same line as the function call
simple-call-single-lineCollapse simple arrow function calls to single line
single-argument-on-one-lineFunction calls with a single simple argument stay on one line
Components
Component props, folder naming, structure consistency, and SVG icons
component-props-destructureComponent props must be destructured in the function parameter
component-props-inline-typeEnforce inline type annotation for component props instead of interface reference
folder-based-naming-conventionEnforce naming based on folder: suffix for views/layouts/pages/providers, camelCase for data/constants
folder-structure-consistencyEnforce consistent folder structure (flat vs wrapped) in module folders
no-redundant-folder-suffixDisallow file/folder names that redundantly include the parent folder name as a suffix
svg-icon-naming-conventionSVG components must end with 'Icon' suffix; 'Icon' suffix components must return SVG
Control Flow
Block formatting, if/else, logical expressions, ternaries, and switch cases
block-statement-newlinesNewline after { and before } in block statements
empty-line-after-blockEmpty line required between closing } and next statement
if-else-spacingEmpty line between consecutive if blocks, no empty line between single-line if/else
if-statement-format{ on same line as if/else if, else on same line as }
logical-expression-multilineLogical expressions with more than threshold operands get one per line
multiline-if-conditionsIf conditions exceeding threshold get one per line
no-empty-lines-in-switch-casesNo empty lines at start of case blocks or between consecutive cases
ternary-condition-multilineSimple ternaries on one line; complex ones (>maxOperands) get multiline formatting
Functions
Function call spacing, declaration style, naming conventions, and parameters
function-call-spacingNo space between function name and opening parenthesis
function-declaration-styleConvert function declarations to const arrow function expressions
function-naming-conventionFunctions use camelCase, start with verb, end with Handler suffix
function-object-destructureNon-component functions: use typed params, destructure in body
function-params-per-lineWhen multiline, each parameter on its own line
no-empty-lines-in-function-paramsNo empty lines between parameters
Hooks
React hook callback formatting, dependency arrays, and naming conventions
hook-callback-formatReact hooks: callback on new line, deps array on separate line
hook-deps-per-lineWhen hook deps exceed threshold, each dependency on its own line
hook-file-naming-conventionHook files in module subfolders must include the module name
hook-function-naming-conventionHook function name must match camelCase of file name
use-state-naming-conventionBoolean useState variables must start with is/has/with/without prefix
Imports & Exports
Import/export formatting, absolute paths, index file conventions, and module exports
absolute-imports-onlyUse alias imports from index files, no relative imports across folders
export-formatCollapse short exports to one line; expand larger ones
import-formatCollapse short imports to one line; expand larger ones
import-source-spacingNo leading/trailing spaces inside import path strings
index-export-styleIndex files: compact re-exports; regular files: blank lines between exports
index-exports-onlyIndex files should only contain imports and re-exports, not code definitions
inline-export-declarationEnforce inline export declarations instead of grouped export statements
module-index-exportsIndex files must export all folder contents
JSX
JSX formatting, className handling, children, logical expressions, and ternaries
classname-dynamic-at-endDynamic expressions in className must be at the end of class strings
classname-multilineLong className strings broken into multiple lines
classname-no-extra-spacesNo extra/leading/trailing spaces in class strings
classname-orderTailwind class ordering in variables, objects, and return statements
jsx-children-on-new-lineMultiple JSX children: each on own line
jsx-closing-bracket-spacingNo space before > or /> in JSX tags
jsx-element-child-new-lineNested JSX elements on new lines; text children can stay inline
jsx-logical-expression-simplifyRemove unnecessary parens around conditions and JSX in logical expressions
jsx-parentheses-positionOpening ( for multiline JSX on same line as return/=>
jsx-prop-naming-conventionProps: camelCase for regular, kebab-case for data-*/aria-*
jsx-simple-element-one-lineCollapse simple JSX with single text/expression child to one line
jsx-string-value-trimNo leading/trailing whitespace inside JSX string attribute values
jsx-ternary-formatSimple ternaries on one line; complex branches get parens with indentation
no-empty-lines-in-jsxNo empty lines between children or after opening/before closing tags
Objects
Object property formatting, empty lines, and string property spacing
no-empty-lines-in-objectsNo empty lines between properties or after {/before }
object-property-per-lineCollapse objects with 1 property; expand larger objects
object-property-value-braceOpening { of object value on same line as :, not on new line
object-property-value-formatSimple property values on same line as :
string-property-spacingNo leading/trailing whitespace inside string property keys
TypeScript
TypeScript enum, interface, type formatting, and definition organization
enum-formatEnforce enum naming (PascalCase + Enum suffix), UPPER_CASE members, trailing commas
enum-type-enforcementUse enum values instead of string literals for variables typed with *Type
interface-formatEnforce interface naming (PascalCase + Interface suffix), camelCase properties, commas
no-inline-type-definitionsInline union types in function params should be extracted to named types
prop-naming-conventionBoolean props start with is/has/with/without, callbacks start with on
type-annotation-spacingNo space before colon, one space after colon, no space before generics
type-formatEnforce type naming (PascalCase + Type suffix), properties, union formatting
typescript-definition-locationEnforce TypeScript definitions to be in designated folders (interfaces/, types/, enums/)