1.0.5 • Published 5 years ago
@shferreira/eslint-config-mailbutler v1.0.5
eslint-config-mailbutler
These are our ESLint rules for internal projects.
Installation
Install this once per project.
If you don't already have a
package.jsonfile, create one withnpm init.Install the required ESLint packages:
npx install-peerdeps --dev eslint-config-mailbutlerThe required dependencies will be now visible in your package.json.
- Create a
.eslintrcor.eslintrc.jsfile in the root of your project's directory (it should live where package.json does).
If you're using a .eslintrc, it should look like this:
{
"extends": [
"mailbutler"
]
}If you're using a .eslintrc.js, that's how it should be:
module.exports = {
"extends": [
"mailbutler"
]
};Tip: You can also put the JSON object in your package.json under the key "eslintConfig":. That will allow you to have one less file.
- Add those two scripts to your
package.jsonfor convenience:
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},Or if you prefer doing it in the command line:
npx npm-add-script -k "lint" -v "eslint ."
npx npm-add-script -k "lint:fix" -v "eslint . --fix"- Run ESLint by calling
npm run lint. Fix issues withnpm run lint:fix.