Adding eslint to your Meteor project
We'll use the popular
eslint-config-airbnb as a starter as well as Meteor specific rules using
We also need to install
babel-parser to lint Meteor enabled ES7 features such as async/await.
Then simply use this boilerplate
.eslintrc.json to get started, you can override the rules as you wish.
Using an npm script to lint your code
package.json to add the following script :
Then run it using
npm run lint
exit 0 as a trick to gracefully terminate the script when linting fails, otherwise
npm will use
eslint return code and crash.