no-unused-vars

- Disallow unused variables

Recommended

This rule is aimed at eliminating unused variables, functions, and parameters of functions.

What ESLint should do when it catches the rule break

Show a warning

Options

vars

all

Specifies a regular expression not to check for usage matching variables.

args

after-used

ignoreRestSiblings

Ignores the rest property’s siblings.

Specifies a regular expression not to check for usage matching arguments.

caughtErrors

none

Specifies a regular expression not to check for usage matching catch arguments.

Rule examples

You can check them out here.