diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..e250383 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,7 @@ +# ... +# ... This file ignores commits that are just cleaning up the code, fixing prettier +# ... or code-style-related eslint warnings +# ... + +# prettier warnings cleanup after introducing @bonfida/prettier-config +fa2c3bf739b008b9397a064ad91bf3329f844350 diff --git a/package.json b/package.json index 77f341c..0b39143 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "extract": "lingui extract", "compile": "lingui compile", "format": "npx prettier --write src/**/*.{ts,tsx}", - "prepare": "husky install" + "prepare": "chmod +x ./prepare.sh && ./prepare.sh" }, "main": "./src/App", "dependencies": { diff --git a/prepare.sh b/prepare.sh new file mode 100755 index 0000000..742256c --- /dev/null +++ b/prepare.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Install pre-commit hooks +if ! husky install; then + echo "Failed to install husky hooks" + exit 0 +fi + +# Setup .git-blame-ignore-revs +if ! git config blame.ignoreRevsFile .git-blame-ignore-revs; then + echo "Failed to set up .git-blame-ignore-revs" + exit 0 +fi