Rules

Rules in ESLint are divided into several categories to help you better understand their value. Though none are enabled by default, some are specifically recommended by ESLint and may be turned on using configuration.

Possible Errors

The following rules point out areas where you might have made mistakes.

Best Practices

These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns.

Strict Mode

These rules relate to using strict mode.

Variables

These rules have to do with variable declarations.

Node.js

These rules are specific to JavaScript running on Node.js.

Stylistic Issues

These rules are purely matters of style and are quite subjective.

ECMAScript 6

These rules are only relevant to ES6 environments.

Legacy

The following rules are included for compatibility with JSHint and JSLint. While the names of the rules may not match up with the JSHint/JSLint counterpart, the functionality is the same.

Removed

These rules existed in a previous version of ESLint but have since been replaced by newer rules.