@chantelle/eslint-config

Chantelle Lingerie's ESLint config

Usage no npm install needed!

<script type="module">
  import chantelleEslintConfig from 'https://cdn.skypack.dev/@chantelle/eslint-config';
</script>

README

@chantelle/eslint-config

Chantelle Lingerie's ESLint config

Installation

yarn add --dev @chantelle/eslint-config

Make sure to install the peerDependencies as well:

yarn add --dev eslint eslint-config-airbnb-base eslint-plugin-import

Usage

On .eslintrc, add the following:

{
  "extends": ["@chantelle"]
}

React

If your project uses React, you should add the react ruleset to your .eslintrc:

{
  "extends": [
    "@chantelle",
    "@chantelle/eslint-config/react"
  ]
}

And also install the following packages:

yarn add --dev eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks

Typescript

If your project uses Typescript, you should add the typescript ruleset to your .eslintrc:

{
  "extends": [
    "@chantelle",
    "@chantelle/eslint-config/typescript"
  ]
}

And also install the following packages:

yarn add --dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser

For more info on using extended eslint rules, check the documentation

VSCode

  1. Install ESLint extension;
  2. Add the following configuration:
"eslint.nodePath": "/usr/local/bin/eslint",
"eslint.validate": [
  "javascript",
  "javascriptreact",
  {
    "language": "typescript",
    "autoFix": true
  },
  {
    "language": "typescriptreact",
    "autoFix": true
  }
],