From aafeacda6f3a78fb8328fe76f4da67626dee2327 Mon Sep 17 00:00:00 2001 From: Martin Stovicek Date: Sun, 24 Feb 2019 09:47:51 +0100 Subject: [PATCH] Move config files --- .huskyrc.json | 5 +++++ .lintstagedrc.json | 6 ++++++ .prettierrc => .prettierrc.json | 0 package.json | 12 ++---------- 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 .huskyrc.json create mode 100644 .lintstagedrc.json rename .prettierrc => .prettierrc.json (100%) diff --git a/.huskyrc.json b/.huskyrc.json new file mode 100644 index 0000000..4d077c8 --- /dev/null +++ b/.huskyrc.json @@ -0,0 +1,5 @@ +{ + "hooks": { + "pre-commit": "lint-staged" + } +} diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000..91574fa --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,6 @@ +{ + "*.json": ["sort-json", "git add"], + "*.{js,json,md}": ["prettier --write", "git add"], + "*.{js}": ["import-sort --write", "git add"], + "*package.json": ["prettier-package-json --write", "git add"] +} diff --git a/.prettierrc b/.prettierrc.json similarity index 100% rename from .prettierrc rename to .prettierrc.json diff --git a/package.json b/package.json index e5ee49b..29fc22f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "react-native-version", - "description": - "Version your React Native or Expo app in a `npm version` fashion.", + "description": "Version your React Native or Expo app in a `npm version` fashion.", "license": "MIT", "author": "Martin Stovicek", "homepage": "https://github.com/stovmascript/react-native-version#readme", @@ -18,7 +17,6 @@ "react-native-version": "cli.js" }, "scripts": { - "precommit": "lint-staged", "docs": "./docs.sh", "test": "./test.sh" }, @@ -72,11 +70,5 @@ "version", "versionCode", "versionName" - ], - "lint-staged": { - "*.json": ["sort-json", "git add"], - "*.{js,json,md}": ["prettier --write", "git add"], - "*.{js}": ["import-sort --write", "git add"], - "*package.json": ["prettier-package-json --write", "git add"] - } + ] }