@stevencho/eslint-config-fitpet
v1.0.3
Published
Eslint and Prettier for React
Readme
Install
- CRA
npx create-react-app my-app- Intall package
npm i -D @stevencho/eslint-config-fitpet- Create .eslintrc
{
"extends": ["@stevencho/eslint-config-fitpet"]
}- Add lint script to package.json
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},Override prettier settings
Add rules in .eslintrc to override @devstefancho/eslint-config-react rules
{
"extends": ["@stevencho/eslint-config-fitpet"],
"rules": {
"no-console": 2,
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
}
]
}
}Webstorm
on Mac
- Preference(
cmd + ,) > Check 'Automatic ESLint configuration' and 'Run eslint --fix on save'
Ref
Youtube
- https://www.youtube.com/watch?v=tsPXN4mJGSc
Docs
- https://eslint.org/docs/developer-guide/shareable-configs
Github
- https://github.com/mryechkin/eslint-config-acme
- https://github.com/Kamigami55/eslint-config-eason
- https://github.com/viclafouch/eslint-config-viclafouch
