Skip to content

Commit 5d072ea

Browse files
committed
chore: Add lint-staged for prettier
1 parent cdb75c5 commit 5d072ea

File tree

2 files changed

+247
-5
lines changed

2 files changed

+247
-5
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"node": ">=6.0.0"
1717
},
1818
"scripts": {
19+
"precommit": "lint-staged",
1920
"start": "./cli.js",
2021
"now-build": "npm install micro-analytics-adapter-memory",
2122
"now-start": "node src/index.js --adapter memory",
@@ -32,6 +33,9 @@
3233
"src/**/*.js"
3334
]
3435
},
36+
"lint-staged": {
37+
"*.js": ["prettier --single-quote --trailing-comma es5 --write", "git add"]
38+
},
3539
"author": "Max Stoiber <[email protected]> (http://mxstbr.com/)",
3640
"license": "MIT",
3741
"repository": "https://github.com/mxstbr/micro-analytics",
@@ -52,7 +56,9 @@
5256
"babel-plugin-transform-async-to-generator": "^6.16.0",
5357
"babel-polyfill": "^6.20.0",
5458
"babel-preset-node6": "^11.0.0",
59+
"husky": "^0.13.4",
5560
"jest": "^19.0.2",
61+
"lint-staged": "^3.5.0",
5662
"micro-analytics-adapter-memory": "^0.1.0",
5763
"nodemon": "^1.11.0",
5864
"prettier": "^1.3.1",

0 commit comments

Comments
 (0)