Weasel & Fox ESlint config
- Install this package:
yarn add -D eslint-config-wslfx
- Install the correct versions of each package, which are listed by the command:
npm info "eslint-config-wslfx@latest" peerDependencies
If using npm 5+, use this shortcut
npx install-peerdeps --dev eslint-config-wslfx
- Create
.eslintrc.js
configuration file:
module.exports = {
extends: ['wslfx']
}
- Add lint scripts to
package.json
:
"scripts": {
"lint": "yarn eslint .",
"lint:fix": "yarn lint --fix"
}
- Run
yarn lint
to lint your code. - Run
yarn lint:fix
to lint, format and fix your code.