@grapes-agency/eslint-config-grapes-react
v1.4.6
Published
Grapes company eslint rules including react
Downloads
15
Readme
Grapes ESLint Config
Our standard eslint config. It is intended to be pretty strict.
Usage
Installing eslint:
npm i -D @grapes-agency/eslint-config-grapes-react
npx install-peerdeps --dev @grapes-agency/eslint-config-grapes-react
Add the configuration file .eslintrc.json
with the following content:
{
"extends": "@grapes-agency/eslint-config-grapes-react"
}
Add a lint script to your package.json like so
"lint": "eslint --ext js,jsx,ts,tsx --cache src"
Also configure your ESLint editor plugin to lint .js
, jsx
, .ts
and .tsx
.
For VSCode this can be achieved by adding the following to settings.json
"eslint.options": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
]
At last do not forget to add .eslintcache
to your .gitignore