Skip to content

Commit e26a8b2

Browse files
committed
style(*): add prettier automation
1 parent c8dfea3 commit e26a8b2

File tree

2 files changed

+710
-516
lines changed

2 files changed

+710
-516
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": {
@@ -69,8 +70,10 @@
6970
"karma-mocha": "^1.3.0",
7071
"karma-spec-reporter": "^0.0.30",
7172
"karma-typescript": "^3.0.4",
73+
"lint-staged": "^4.0.0",
7274
"merge2": "^1.0.3",
7375
"mkdirp": "^0.5.1",
76+
"prettier": "^1.5.1",
7477
"require-dir": "^0.3.1",
7578
"rimraf": "^2.6.1",
7679
"shx": "^0.2.2",
@@ -98,5 +101,11 @@
98101
"cz-customizable": {
99102
"config": "./.cz-config.js"
100103
}
104+
},
105+
"lint-staged": {
106+
"**/*.ts": [
107+
"prettier --write {src,tests}/**/*.ts",
108+
"git add"
109+
]
101110
}
102111
}

0 commit comments

Comments
 (0)