diff --git a/scripts/commit-lint.js b/scripts/commit-lint.js index 58ed3288e0..b7633d8283 100755 --- a/scripts/commit-lint.js +++ b/scripts/commit-lint.js @@ -6,7 +6,7 @@ const gitMessage = require('child_process') .toString() .trim(); -const matchCommit = /(chore|build|feat|fix|refactor|style|docs)\((backend|testing|web|react|angular|nx)\):\s(([a-z0-9:\-\s])+)/g.test( +const matchCommit = /(chore|feat|fix|cleanup|docs)\((angular|bazel|core|docs|nextjs|node|react|storybook|testing|repo|misc)\):\s(([a-z0-9:\-\s])+)/g.test( gitMessage ); const matchRelease = /Release/gi.test(gitMessage); @@ -17,20 +17,20 @@ if (exitCode === 0) { } else { console.log( '[Error]: Ho no! 😦 Your commit message: \n' + - '-------------------------------------------------------------------\n' + - gitMessage + - '\n-------------------------------------------------------------------' + - '\n\n 👉️ Does not follow the commit message convention specified in the CONTRIBUTING.MD file.' + '-------------------------------------------------------------------\n' + + gitMessage + + '\n-------------------------------------------------------------------' + + '\n\n 👉️ Does not follow the commit message convention specified in the CONTRIBUTING.MD file.' ); console.log('\ntype(scope): subject \n BLANK LINE \n body'); console.log('\n'); - console.log('possible types: chore|build|feat|fix|refactor|style|docs'); + console.log('possible types: chore|build|feat|fix|cleanup|docs'); console.log( - 'possible scopes: backend|testing|web|react|angular|nx (if unsure use "nx")' + 'possible scopes: angular|bazel|core|docs|nextjs|node|react|storybook|testing|repo|misc (if unsure use "core")' ); console.log( '\nEXAMPLE: \n' + - 'feat(nx): add an option to generate lazy-loadable modules\n' + 'feat(nx): add an option to generate lazy-loadable modules\n' ); } process.exit(exitCode);