Skip to content

Commit

Permalink
chore: add imperative rule to commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Nov 2, 2023
1 parent d519321 commit 98fffa9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {
/** @type {import('@commitlint/types').UserConfig} */
const configuration = {
extends: ['@commitlint/config-conventional'],
plugins: ['@ngx-devs/commitlint-plugin-imperative'],
rules: {
'scope-enum': async ctx => {
const projects = await getProjects(
Expand All @@ -16,6 +17,7 @@ const configuration = {
const scopes = [...projects, 'tools', 'workflows', 'testing'].sort();
return [RuleConfigSeverity.Error, 'always', scopes];
},
'imperative-rule/en': [RuleConfigSeverity.Error, 'always'],
},
};

Expand Down
11 changes: 10 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@commitlint/config-conventional": "^17.7.0",
"@commitlint/config-nx-scopes": "^17.6.4",
"@commitlint/cz-commitlint": "^17.7.1",
"@ngx-devs/commitlint-plugin-imperative": "^1.1.4",
"@nx/devkit": "^16.8.1",
"@nx/esbuild": "16.7.4",
"@nx/eslint-plugin": "16.7.4",
Expand Down

0 comments on commit 98fffa9

Please sign in to comment.