requires v6 of eslint or higher
-
yarn add -D eslint@8 eslint-config-teselagen
-
Add the following to
.eslintrc.js
module.exports = {
//choose one of the following:
extends: "teselagen/react"
extends: "teselagen/node"
extends: "teselagen/cypress"
extends: "teselagen/es5"
}
For React.js projects, extend from teselagen/react
For Node.js projects, extend from teselagen/node
Then add this to your package.json:
"scripts": {
"precommit": "lint-staged"
},
"lint-staged": {
"src/**/*.js": [
"eslint --fix --max-warnings=0",
"prettier --write",
"git add"
]
},
-We're now using a patch to simplify installation!