1.1.4 • Published 1 year ago
@joengsh/eslint-config-react v1.1.4
eslint-config
install
npx install-peerdeps --dev @joengsh/eslint-config-react
# noted: only install prettier when using cra
yarn add -D eslint-config-prettier prettier @joengsh/eslint-config-react
setup
// .eslintrc.js
module.exports = {
extends: ["@joengsh/eslint-config-react"],
};
// when using cra
module.exports = {
extends: ["@joengsh/eslint-config-react/cra"],
};
usage
{
// ...
"scripts":{
// ...other scripts
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint-fix": "eslint --fix . --ext .js,.jsx,.ts,.tsx"
}
}