Requires that a function expression be named. Named functions provide more information in the error stack trace than anonymous functions.
Requires object destructuring for multiple return values, not array destructuring.
Disallows arrow functions.
Requires the first alphabetical character of a comment to be lowercase.
Disallows commas as last token on a line in lists.
Disallows curly braces after statements.
Disallows identifiers that start or end in _
.
Disallows empty blocks (except for catch blocks).
Disallows function declarations.
Disallows identical destructuring names for the key and value in favor of using shorthand destructuring.
Disallows a specified set of identifier names.
Disallows implicit type conversion.
Disallows keywords in your comments, such as TODO or FIXME
Disallows placing keywords on a new line.
Disallows usage of specified keywords.
Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if "smart"
Disallows the test, consequent and alternate to be on separate lines when using the ternary operator.
Disallows multiple blank lines in a row.
Disallows strings that span multiple lines without using concatenation.
Disallows multiple indentation characters (tabs or spaces) between identifiers, keywords, and any other token
Disallows multiple var
declaration (except for-loop).
Disallows unassigned functions to be named inline
Disallows nested ternaries.
Disallows newline before opening curly brace of all block statements.
Disallow use of certain AST Node types.
Disallows the not, not equals, and strict not equals operators in conditionals.
Disallows placing object keys on new line
Requires putting certain operators on the next line rather than on the current line before a line break.
Disallow a newline after blocks
Disallow a blank line after 'use strict';
statements
Disallows newline before module.exports
Disallow an empty line above the specified keywords.
Disallows newline before line comments
Disallows blocks from beginning or ending with 2 newlines.
Disallows newlines adjacent to curly braces in all object literals.
Disallows parentheses around arrow function expressions with a single parameter.
Disallows quoted keys in object if possible.
Disallows lines from ending in a semicolon.
Require arrow functions to use a block statement (explicit return).
Requires sticking binary operators to the right.
Disallows spaces after commas
Disallows space after keyword.
Requires that a line comment (//
) not be followed by a space.
Disallows space after object keys.
Requires sticking unary operators to the right.
Requires sticking binary operators to the left.
Disallows space before block statements (for loops, control structures).
Disallows spaces before commas
Disallows space before keyword.
Disallows space before object values.
Requires sticking unary operators to the left.
Disallows spaces before semicolons.
Ensure there are no spaces after argument separators in call expressions.
Disallows space before ()
or {}
in anonymous function expressions.
Disallows space before ()
in call expressions.
Disallows space before and/or after ?
or :
in conditional expressions.
Disallow spaces in between for statement.
Disallows space before ()
or {}
in function declarations.
Disallow space before or after *
in generator functions
Disallows space before ()
or {}
in named function expressions.
Disallows space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use disallowSpacesInsideBrackets to report on all brackets.
Disallows space after opening square bracket and before closing. Reports on all on brackets, even on property accessors. Use disallowSpacesInsideArrayBrackets to exclude property accessors.
Disallow space after opening object curly brace and before closing in import statements.
Disallows space after opening object curly brace and before closing.
Disallows space after opening round bracket and before closing.
Disallows space after opening and before closing grouping parentheses.
Disallows spaces before and after curly brace inside template string placeholders.
Disallows tabs everywhere.
Disallows an extra comma following the final element of an array or object literal.
Requires all lines to end on a non-whitespace character
Disallows unused params in function expression and function declaration.
Disallows unused variables defined with var, let or const.
Disallows declaring variables with var
.
Requires the variable to be the left hand operator when doing a boolean comparison
Validate jsdoc comments
Requires all lines to be at most the number of characters specified
Requires the file to be at most the number of lines specified
Enforces indentation of parameters in multiline functions
Requires proper alignment in object literals.
Requires that a function expression be anonymous.
Requires that variable assignment from array values are * destructured.
Requires that arrow functions are used instead of anonymous function expressions in callbacks.
Requires blocks to begin and end with a newline
Requires identifiers to be camelCased or UPPERCASE_WITH_UNDERSCORES
Requires the first alphabetical character of a comment to be uppercase, unless it is part of a multi-line textblock.
Requires capitalized constructors to to use the new
keyword
Requires constructors to be capitalized (except for this
)
Requires commas as last token on a line in lists.
Requires curly braces after statements.
Require a $ before variable names that are jquery assignments.
Requires member expressions to use dot notation when possible
Requires to return early in a function.
Requires declaring objects via ES6 enhanced object literals
Requires function declarations by disallowing assignment of functions expressions to variables. Function expressions are allowed in all other contexts, including when passed as function arguments or immediately invoked.
Requires imports to be alphabetised
Requires placing keywords on a new line.
Requires placing line feed after assigning a variable.
Requires placing line feed at file end.
Requires function names to match member and property names.
Requires the test, consequent and alternate to be on separate lines when using the ternary operator.
Requires multiple var
declaration.
Require unassigned functions to be named inline
Requires newline before opening curly brace of all block statements.
Requires newline before single if statements
Requires use of binary, hexadecimal, and octal literals instead of parseInt.
Requires variable declarations from objects via destructuring
Requires placing object keys on new line
Requires operators to appear before line breaks and not after.
Requires an extra blank newline after var declarations, as long as it is not the last expression in the current block.
Requires newline after blocks
Requires a blank line after 'use strict';
statements
Requires newline before module.exports
Requires an empty line above the specified keywords unless the keyword is the first expression in a block.
Requires newline before line comments
Requires blocks to begin and end with 2 newlines
Requires newline inside curly braces of all objects.
Requires parentheses around arrow function expressions with a single parameter.
Requires parentheses around immediately invoked function expressions.
Requires quoted keys in objects.
Requires semicolon after:
Require arrow functions to use an expression body when returning a single statement (no block statement, implicit return).
Disallows sticking binary operators to the right.
Requires space after comma
Requires space after keyword.
Requires that a line comment (//
) be followed by a space.
Requires space after object keys.
Disallows sticking unary operators to the right.
Disallows sticking binary operators to the left.
Requires space(s) before block statements (for loops, control structures).
Requires space before comma
Require space after colon in object destructuring.
Requires space before keyword.
Requires space after object keys.
Disallows sticking unary operators to the left.
Ensure there are spaces after argument separators in call expressions.
Requires space before ()
or {}
in anonymous function expressions.
Requires space before ()
in call expressions.
Requires space before and/or after ?
or :
in conditional expressions.
Requires spaces inbetween for statement.
Requires space before ()
or {}
in function declarations.
Requires space before and after *
in generator functions
Requires space before ()
or {}
in named function expressions.
Requires space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use requireSpacesInsideBrackets to report on all brackets.
Requires space after opening square bracket and before closing. Reports on all on brackets, even on property accessors. Use requireSpacesInsideArrayBrackets to exclude property accessors.
Requires space after opening object curly brace and before closing in import statements.
Requires space after opening object curly brace and before closing.
Requires space after opening round bracket and before closing.
Requires space after opening and before closing grouping parentheses.
Disallows using .apply
in favor of the spread operator
Requires the use of template strings instead of string concatenation.
Requires an extra comma following the final element of an array or object literal.
Requires 'use strict';
statements
Requires var
declaration to be on the top of an enclosing scope
Requires the variable to be the right hand operator when doing a boolean comparison
Option to check var that = this
expressions
Validates proper alignment of function parameters.
This rule is for validating the positioning of line comments. Block comments are ignored.
Validates indentation for switch statements and block statements
Option to check line break characters
Requires each element in array on a single line when array length is more than passed maximum number or array fills more than one line.
Validates the order in object keys.
Enable validation of separators between function parameters. Will ignore newlines.
Requires all quote marks to be either the supplied value, or consistent if true