Commit 84365e59 authored by Guillaume Perréal's avatar Guillaume Perréal

Set up husky and lint-staged.

parent e5b1a862
......@@ -27,6 +27,8 @@
"devDependencies": {
"@angular/compiler": "^8.2.9",
"@angular/core": "^8.2.9",
"husky": "^3.0.8",
"lint-staged": "^10.0.0-0",
"prettier": "^1.15.0",
"rxjs": "^6",
"tslint": "^5.9.1",
......@@ -35,6 +37,16 @@
},
"scripts": {
"test": "tslint -p tsconfig.json --print-config tsconfig.json >/dev/null",
"lint": "prettier --check '*.js' '*.json'"
"lint": "prettier --check *.js *.json",
"lint:fix": "prettier --write *.js *.json"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": "npm run lint:fix",
"*.json": "npm run lint:fix"
}
}
......@@ -5,11 +5,7 @@
"rxjs-tslint-rules",
"tslint-config-prettier"
],
"rulesDirectory": [
"codelyzer",
"tslint-defocus",
"tslint-plugin-prettier"
],
"rulesDirectory": ["codelyzer", "tslint-defocus", "tslint-plugin-prettier"],
"rules": {
"arrow-return-shorthand": true,
"array-type": [true, "array-simple"],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment