Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 1900f97

Browse files
committed
chore: add prettier & husky
1 parent 227d018 commit 1900f97

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"single-quote": true
3+
}

package.json

+11
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"grunt-karma": "^0.12.1",
1919
"grunt-ngmin": "0.0.x",
2020
"grunt-surround": "0.1.x",
21+
"husky": "^0.14.3",
2122
"jasmine-core": "^2.4.1",
2223
"karma": "^0.13.22",
2324
"karma-chrome-launcher": "0.1.x",
@@ -31,18 +32,28 @@
3132
"karma-phantomjs-launcher": "^1.0.0",
3233
"karma-requirejs": "^0.2.5",
3334
"karma-script-launcher": "^0.2.0",
35+
"lint-staged": "^5.0.0",
3436
"load-grunt-tasks": "0.2.x",
37+
"prettier": "^1.8.2",
3538
"requirejs": "2.1.x",
3639
"wiredep": "1.8.x"
3740
},
3841
"scripts": {
3942
"coverage": "grunt coverage",
4043
"dist": "grunt dist",
44+
"precommit": "lint-staged",
45+
"prettify": "prettier --write \"src/**/*.js\" \"test/**/*.js\"",
4146
"serve": "grunt serve",
4247
"test": "grunt test"
4348
},
4449
"repository": {
4550
"type": "git",
4651
"url": "git://github.com/angular-ui/ui-sortable.git"
52+
},
53+
"lint-staged": {
54+
"*.js": [
55+
"prettier --write",
56+
"git add"
57+
]
4758
}
4859
}

0 commit comments

Comments
 (0)