Skip to content

Commit 3fbdb87

Browse files
committed
style(*): add prettier automation
1 parent a8919cd commit 3fbdb87

File tree

2 files changed

+603
-441
lines changed

2 files changed

+603
-441
lines changed

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"build:package": "gulp build && cd dist/package && npm install --production && npm shrinkwrap && npm pack && shx mv *.tgz ../",
2323
"test": "gulp build && gulp build:tests && gulp test && gulp test:integration",
2424
"dev": "gulp dev",
25-
"commitmsg": "validate-commit-msg"
25+
"commitmsg": "validate-commit-msg",
26+
"precommit": "lint-staged"
2627
},
2728
"main": "index.js",
2829
"devDependencies": {
@@ -71,8 +72,10 @@
7172
"karma-mocha": "^1.3.0",
7273
"karma-spec-reporter": "^0.0.30",
7374
"karma-typescript": "^3.0.1",
75+
"lint-staged": "^4.0.0",
7476
"merge2": "^1.0.3",
7577
"mkdirp": "^0.5.1",
78+
"prettier": "^1.5.1",
7679
"require-dir": "^0.3.1",
7780
"rimraf": "^2.6.1",
7881
"shx": "^0.2.2",
@@ -101,5 +104,11 @@
101104
"cz-customizable": {
102105
"config": "./.cz-config.js"
103106
}
107+
},
108+
"lint-staged": {
109+
"**/*.ts": [
110+
"prettier --write {src,tests}/**/*.ts",
111+
"git add"
112+
]
104113
}
105114
}

0 commit comments

Comments
 (0)