ESLint config for MadeComfy
About
In the interest of DRY and Code formatting we want to define one format across all our applications
Installation
Assumes you have a working node project (ie, package.json
exists) with code in ./src/
install module:
yarn add eslint-config-madecomfy --dev
create eslintrc:
touch .eslintrc
.eslintrc
with:
populate
package.json
:
add lint execution script to ... "scripts": , ...
Linting
yarn lint
Lint staged files before committing
The following steps will prevent badly formatted code from being pushed to remote.
install modules:
yarn add husky lint-staged --dev
package.json
:
add precommit hook to ... "scripts": , "lint-staged": ...