Skip to content

Instantly share code, notes, and snippets.

@paulmathis
Created October 25, 2018 14:44
Show Gist options
  • Save paulmathis/e820edf33190876f0b7ad0d6a14f1197 to your computer and use it in GitHub Desktop.
Save paulmathis/e820edf33190876f0b7ad0d6a14f1197 to your computer and use it in GitHub Desktop.
Starter package.json with pre-commit linter
{
"name": "pre-commit",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint ./ --fix"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
},
"author": "",
"license": "ISC",
"devDependencies": {
"eslint": "^5.7.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0",
"husky": "^1.1.2",
"lint-staged": "^7.3.0"
},
"dependencies": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment