From 6f938349909571b9a2cc8e2234dc359a42c74d0c Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 5 Jun 2017 21:20:41 -0700 Subject: [PATCH] add prettier --- ui/package.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/package.json b/ui/package.json index 4a39ee759..9bd150877 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,7 +4,8 @@ "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "webpack-dev-server --devtool eval --progress --colors --inline" + "dev": "webpack-dev-server --devtool eval --progress --colors --inline", + "precommit": "lint-staged" }, "keywords": [ "lbry" @@ -52,11 +53,21 @@ "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^2.2.3", "eslint-plugin-react": "^6.7.1", + "husky": "^0.13.4", "json-loader": "^0.5.4", + "lint-staged": "^3.6.0", "node-sass": "^3.13.0", + "prettier": "^1.4.2", "webpack": "^1.13.3", "webpack-dev-server": "^2.4.4", "webpack-notifier": "^1.5.0", "webpack-target-electron-renderer": "^0.4.0" + }, + "lint-staged": { + "gitDir": "../", + "js/**/*.{jsx,js}": [ + "prettier --use-tabs --single-quote --write", + "git add" + ] } }