@chantelle/eslint-config
v0.22.0
Published
Chantelle Lingerie's ESLint config
Downloads
22
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
- Install ESLint extension;
- Add the following configuration:
"eslint.nodePath": "/usr/local/bin/eslint",
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],