Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit b78856e

Browse files
authored
Merge pull request #49 from ashwin-sureshkumar/issue-45
chore(tooling): Add prettier, lint-staged and precommit hook for tooling
2 parents 73a724e + 99b382b commit b78856e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
"path": "cz-conventional-changelog"
88
}
99
},
10+
"lint-staged": {
11+
"*.@(ts)": [
12+
"prettier --parser typescript --write",
13+
"tslint --fix",
14+
"git add"
15+
]
16+
},
1017
"scripts": {
1118
"ng": "ng",
1219
"start": "ng serve",
@@ -15,7 +22,8 @@
1522
"test": "ng test",
1623
"lint": "ng lint",
1724
"e2e": "ng e2e",
18-
"commit": "git-cz"
25+
"commit": "git-cz",
26+
"precommit": "lint-staged"
1927
},
2028
"private": true,
2129
"dependencies": {
@@ -53,6 +61,7 @@
5361
"danger": "1.2.0",
5462
"doctoc": "^1.3.0",
5563
"electron": "1.6.11",
64+
"husky": "0.14.3",
5665
"jasmine-core": "2.6.2",
5766
"jasmine-spec-reporter": "4.1.0",
5867
"karma": "1.7.0",
@@ -61,10 +70,13 @@
6170
"karma-coverage-istanbul-reporter": "1.2.1",
6271
"karma-jasmine": "1.1.0",
6372
"karma-jasmine-html-reporter": "0.2.2",
73+
"lint-staged": "4.3.0",
6474
"lodash": "4.17.4",
75+
"prettier": "1.7.4",
6576
"protractor": "5.1.2",
6677
"ts-node": "3.2.0",
6778
"tslint": "5.3.2",
79+
"tslint-config-prettier": "1.6.0",
6880
"typescript": "2.3.3",
6981
"validate-commit-msg": "2.14.0",
7082
"wallaby-webpack": "*"

tslint.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,8 @@
136136
"component-class-suffix": true,
137137
"directive-class-suffix": true,
138138
"invoke-injectable": true
139-
}
139+
},
140+
"extends": [
141+
"tslint-config-prettier"
142+
]
140143
}

0 commit comments

Comments
 (0)