Using ESLint

ESlint is used as the default linter in Bit's official envs. To learn how to use ESLint in an env that uses a different linter, see ESLint configuration.

ESLint uses the same standard commands used by all linters.

Run the following to lint all components in your workspace:

$bit
Copiedcopy

Run the following to lint only new or modified components in your workspace:

$bit
Copiedcopy

Run the following to lint a specific component:

$bit
Copiedcopy

Lint and fix detected issues

Run the following to lint and fix detected issues:

$bit
Copiedcopy

Run the following to lint and fix detected issues of a certain type (problem, suggestion, layout):

$bit
Copiedcopy

Lint during build

Run the following to lint during the build process (assuming your build pipeline has a linter task):

$bit
Copiedcopy