From 1385ba7815ca2825d26e818fca88ca26c478c063 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 9 Nov 2022 10:04:05 +0000 Subject: [PATCH] refactor: easier commitlint command --- package.json | 1 + pull_request_template.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c5f4a6bd8..4f73bbbab 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "scripts": { "docs": "typedoc", "lint": "eslint src test --ext .js,.ts && tsc", + "lint:commit": "commitlint --from origin/master --to HEAD", "test": "mocha test/unit test/unit/token test/unit/tracking-buffer", "test-integration": "mocha test/integration/", "test-all": "mocha test/unit/ test/unit/token/ test/unit/tracking-buffer test/integration/", diff --git a/pull_request_template.md b/pull_request_template.md index 938fc6834..6f1d8abe4 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -4,6 +4,6 @@ 3. After bug fix/code change, ensure all the existing tests and new tests (if any) pass (`npm run-script test-all`). During development, to run individual test use `node_modules/nodeunit test/ -t `. 4. Build the driver (`npm run build`). 5. Run eslint and flow typechecker (`npm run lint`). -6. Run commitlint (`node_modules/.bin/commitlint --from origin/master --to HEAD`). Refer [commit conventions](https://commitlint.js.org/#/concepts-commit-conventions) and [commit rules](https://commitlint.js.org/#/reference-rules). +6. Run commitlint (`npm run lint:commit`). Refer [commit conventions](https://commitlint.js.org/#/concepts-commit-conventions) and [commit rules](https://commitlint.js.org/#/reference-rules). **Thank you for Contributing!**