Skip to main content

ESLint

The library provides default ESLint configurations.

Default

Under the hood this is mostly AirBnB ESLint config, with just a few rules modified, and Babel parser, module resolver configured (in the way compatible with Babel presets provided by this library).

To include it into ESLint config:

{
"extends": "./node_modules/@dr.pogodin/react-utils/config/eslint/default.json"
}

The modified rules are:

Jest

NOTE: Since v1.26.0 it should be included in addition to the default or Typescript config!

This configuration slightly extends default config to be used to lint JS code intended for Jest test environment.

To include it into ESLint config:

{
"extends": "./node_modules/@dr.pogodin/react-utils/config/eslint/jest.json"
}

On top of default configuration this config: