From 2efce8e402773a6ec4e1e276b40dc91b3bd81780 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Sun, 3 Jun 2018 21:32:32 +0200 Subject: [PATCH] chore: add a precommit hook --- packages/tabs/package.json | 2 ++ packages/tabs/yarn.lock | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/packages/tabs/package.json b/packages/tabs/package.json index 9e45b646..b43fdb87 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -12,6 +12,7 @@ "test": "jest", "flow": "flow", "lint": "eslint .", + "precommit": "yarn lint && yarn flow && yarn test", "build": "babel --no-babelrc --plugins=syntax-jsx,syntax-class-properties,syntax-object-rest-spread,transform-flow-strip-types src --out-dir dist --ignore '**/__tests__/**'", "prepublish": "yarn build" }, @@ -59,6 +60,7 @@ "eslint-config-satya164": "^1.0.1", "eslint-plugin-react-native-globals": "^0.1.0", "flow-bin": "~0.67.0", + "husky": "^0.14.3", "jest": "^21.2.1", "prettier": "^1.8.2", "react": "16.3.1", diff --git a/packages/tabs/yarn.lock b/packages/tabs/yarn.lock index e470460d..648da603 100644 --- a/packages/tabs/yarn.lock +++ b/packages/tabs/yarn.lock @@ -2998,6 +2998,14 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +husky@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" + dependencies: + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" + iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" @@ -4330,6 +4338,10 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + normalize-path@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -5626,6 +5638,10 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + strip-json-comments@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"