This README assumes you are using npm 3.
npm install eslint-config-emplify-react-web --save-dev
Create a file in the root directory of your project called .eslintrc.js
. Fill it out like this:
module.exports = {
extends: 'eslint-config-emplify-react-web',
rules: {
// Project-specific overrides, if any
}
}
Add a new script to your package.json
. For instance, if you want to lint all the JS in the src
directory.
{
"scripts": {
"lint": "eslint src"
}
}
Then, from the command line: npm run lint
.