@g123jp/eslint-config-react
Eslint config for frontend react + ts projects with prettier
1. install
yarn add -D @g123jp/eslint-config-react
with
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- eslint
- eslint-config-airbnb
- eslint-config-prettier
- eslint-plugin-import
- eslint-plugin-import-helpers
- eslint-plugin-jsx-a11y
- eslint-plugin-prettier
- eslint-plugin-react
- eslint-plugin-react-hooks
- prettier
- typescript
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-import-helpers eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier typescript
2. usage
{
"scripts": {
"fix:ts": "eslint --fix \"./**/*.ts\" \"./**/*.tsx\"",
"lint:ts": "tsc --noEmit && eslint \"./**/*.ts\" \"./**/*.tsx\"",
}
}
{
"plugins": [
"react",
"@typescript-eslint",
"prettier",
"import-helpers"
],
"extends": [
"@g123jp/eslint-config-react"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"node": true,
"es6": true
}
}
3. ref