22.1.0 • Published 2 years ago

eslint-config-chotot v22.1.0

Weekly downloads
42
License
MIT
Repository
github
Last release
2 years ago

eslint-config-chotot

npm version

This package provides Chotot's .eslintrc as an extensible shared config. This config is based on Airbnb's but with following important differences:

  • Built-in support for Prettier (skip conflicted Prettier's formatting rules while remain some for double checking)
  • Built-in support for experimental ES syntax (via eslint-babel parser).
  • Many rules were relaxed to provide some flexibility and improve developer's ergonomics.
  • Extra supports for Next.js framework
  • Additional custom rules that suit Chotot Web team and provided by eslint-plugin-chotot

Usage

We export following ESLint configurations for your usage.

eslint-config-chotot

Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires eslint, eslint-plugin-import, eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-jsx-a11y, eslint-plugin-chotot and @babel/eslint-parser. If you don't need React, see eslint-config-chotot-base.

  1. Install the correct versions of each package, which are listed by the command:
npx install-peerdeps --dev eslint-config-chotot
  1. Add "extends": "chotot" to your .eslintrc

eslint-config-chotot/next

This entry point enables the linting rules for Next.js framework. To use, add "extends": ["chotot", "chotot/next"] to your .eslintrc

eslint-config-chotot/hooks

This entry is deprecated. Rules for React hooks already defined in chotot.

This entry point enables the linting rules for React hooks (requires v16.8+). To use, add "extends": ["chotot", "chotot/hooks"] to your .eslintrc

eslint-config-chotot/base

This entry point is deprecated. See eslint-config-chotot-base.

Chotot JavaScript Style Guide

This eslint config preset is to validate and enfore Chotot's JavaScript style guide. See Chotot's JavaScript style guide and the ESlint config docs for more information.

Improving this config

Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Perhaps in a distant future, we could use literate programming to structure our README as test cases for our .eslintrc?

You can run tests with npm test.

You can make sure this module lints with itself using npm run lint.

22.1.0

2 years ago

22.0.0

2 years ago

21.0.0

3 years ago

20.0.2

3 years ago

20.0.1

3 years ago

20.0.0

3 years ago

20.0.0-beta.1

3 years ago

19.0.0

4 years ago

19.0.0-beta.2

4 years ago

19.0.0-beta.1

4 years ago

18.2.0

4 years ago

18.1.0

4 years ago

18.0.0

4 years ago

18.0.0-beta.2

4 years ago

18.0.0-beta.1

4 years ago

18.0.1-beta.0

4 years ago