9.0.0 • Published 2 years ago

@tophat/eslint-config v9.0.0

Weekly downloads
1,212
License
Apache-2.0
Repository
github
Last release
2 years ago

@tophat/eslint-config

npm CircleCI build npm downloads Dependabot Status

:shark: Top Hat's shareable eslint configuration

Usage

The default config includes the following:

  • A set of base eslint rules for all JavaScript projects
  • Rules for React apps
  • Rules for Jest tests
  • Rules for web apps

Extend the default config by first installing all the required dependencies:

yarn add --dev \
    @tophat/eslint-config \
    eslint \
    prettier \
    eslint-config-prettier \
    eslint-plugin-prettier \
    eslint-plugin-react \
    eslint-plugin-react-hooks \
    eslint-plugin-jsx-a11y \
    eslint-plugin-jest \
    eslint-plugin-import

or

npm install --save-dev # etc ...

Then update your eslint config (for example, .eslintrc.js):

module.exports = {
    extends: '@tophat'
}

Picking and choosing certain configs

You can extend each of the configs separately by specifying them in your eslint config:

module.exports = {
    extends: [
        // Pick and choose from the following list of configs
        '@tophat/eslint-config/base',
        '@tophat/eslint-config/react',
        '@tophat/eslint-config/jest',
        '@tophat/eslint-config/web',
    ]
}

Peer dependencies per config

Each config requires certain peer dependencies:

  • base: eslint, prettier, eslint-config-prettier, eslint-plugin-import, eslint-plugin-prettier
  • react: eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-jsx-a11y
  • jest: eslint-plugin-jest
  • web: (none)

You only have to install the dependencies for the configs which you are using.

Upgrading this package

See the CHANGELOG.

Making changes to this package

See the CONTRIBUTING guide.

7.0.4

2 years ago

7.0.3

2 years ago

8.0.1

2 years ago

9.0.0-rc.0

2 years ago

8.0.0

2 years ago

9.0.0-rc.1

2 years ago

9.0.0-rc.2

2 years ago

9.0.0

2 years ago

7.0.2

2 years ago

6.0.2

2 years ago

7.0.0

2 years ago

7.0.1

2 years ago

7.0.0-rc.0

2 years ago

7.0.0-rc.1

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

5.0.0

2 years ago

4.1.0

3 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.0.0

3 years ago

3.3.0

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

2.0.0

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.10.5

4 years ago

0.10.4

4 years ago

0.10.3

4 years ago

0.10.0

4 years ago

0.10.1

4 years ago

0.10.2

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago