Skip to content

Instantly share code, notes, and snippets.

@rerodrigues
Created June 28, 2019 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rerodrigues/c13205f69b63db6272f64910656b5513 to your computer and use it in GitHub Desktop.
Save rerodrigues/c13205f69b63db6272f64910656b5513 to your computer and use it in GitHub Desktop.
// package.json
{
"devDependencies": {
"eslint": "4.9.0",
"eslint-config-airbnb-base": "9.0.0",
"eslint-plugin-import": "2.0.1",
"git-validate": "2.2.4",
"lint-staged": "^8.1.7",
"prettier-eslint-cli": "^4.7.1"
},
"scripts": {
"test:unit": "mocha app/**/*.js",
"lint-staged": "lint-staged" // se fosse o husky não precisaria disso, dava pra chamar o cli direto
},
"pre-commit": [
"lint-staged"
],
"pre-push": [
"test:unit"
]
}
// .lintstagedrc
{
"*.js": [
"eslint --fix",
"prettier-eslint --write",
"git add"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment