diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg deleted file mode 100755 index d240e0b2647..00000000000 --- a/scripts/git-hooks/commit-msg +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Validate commit log -commit_regex='^Merge.+|(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|types)(\(.+\))?: .{1,50}' - -if ! grep -iqE "$commit_regex" "$1"; then - echo - echo " Error: proper commit message format is required for automated changelog generation." - echo - echo " - Use \`npm run commit\` to interactively generate a commit message." - echo " - See .github/COMMIT_CONVENTION.md for more details." - echo - exit 1 -fi diff --git a/scripts/git-hooks/pre-commit b/scripts/git-hooks/pre-commit deleted file mode 100755 index 126d2ca400d..00000000000 --- a/scripts/git-hooks/pre-commit +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -files_to_lint=$(git diff --cached --name-only --diff-filter=ACM | grep '\.js$') - -if [ -n "$files_to_lint" ]; then - NODE_ENV=production eslint --quiet $files_to_lint -fi diff --git a/scripts/verify-commit-msg.js b/scripts/verify-commit-msg.js index a5150a5f8e6..09bb0ac6df1 100644 --- a/scripts/verify-commit-msg.js +++ b/scripts/verify-commit-msg.js @@ -1,5 +1,5 @@ const chalk = require('chalk') -const msgPath = process.env.GIT_PARAMS +const msgPath = process.env.GIT_PARAMS || ".git/COMMIT_EDITMSG" const msg = require('fs').readFileSync(msgPath, 'utf-8').trim() const commitRE =