9.0.0 • Published 7 months ago

@tophat/eslint-config v9.0.0

Weekly downloads
1,212
License
Apache-2.0
Repository
github
Last release
7 months 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

10 months ago

7.0.3

10 months ago

8.0.1

8 months ago

9.0.0-rc.0

7 months ago

8.0.0

8 months ago

9.0.0-rc.1

7 months ago

9.0.0-rc.2

7 months ago

9.0.0

7 months ago

7.0.2

10 months ago

6.0.2

1 year ago

7.0.0

1 year ago

7.0.1

1 year ago

7.0.0-rc.0

1 year ago

7.0.0-rc.1

1 year ago

6.0.1

1 year ago

6.0.0

1 year ago

5.0.0

1 year ago

4.1.0

1 year ago

4.2.1

1 year ago

4.2.0

1 year ago

4.0.0

1 year ago

3.3.0

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

2.0.0

2 years ago

0.12.0

3 years ago

0.11.0

3 years ago

0.10.5

3 years ago

0.10.4

3 years ago

0.10.3

3 years ago

0.10.0

3 years ago

0.10.1

3 years ago

0.10.2

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago