# javascript/eslint

> Runs the shipped ESLint rules on JavaScript, TypeScript, component files, and package.json.

Runs the shipped ESLint rules on JavaScript, TypeScript, component files, and package.json.

Part of the [`javascript`](/reference/configurations/javascript/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), per file. It runs eslint. `gspot check --fix` fixes what it can.

## Why

ESLint catches mistakes that the runtime accepts: unused code, unsafe patterns, and functions that only forward.

## What to do

Run `gspot check --fix` for the rules that fix themselves, then read each remaining line; `gspot explain <rule>` links the rule documentation.

## Example

The declaration `const unused = 1;` reports no-unused-vars. Delete the variable.

## Turn it off

Turn it off for some files, or one of its lint rules, with a reason:

```shell
gspot ignore javascript/eslint --paths "<glob>" --reason "<why>"
gspot ignore javascript/eslint --rule <rule> --reason "<why>"
```

To silence one place, write a comment such as:

```text
// eslint-disable-next-line no-console -- the command prints its result
```
