From 98fffa94171ee5ee36256a44d9e7f28c53b8861a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Chalk?= Date: Thu, 2 Nov 2023 11:26:03 +0100 Subject: [PATCH] chore: add imperative rule to commitlint --- commitlint.config.js | 2 ++ package-lock.json | 11 ++++++++++- package.json | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/commitlint.config.js b/commitlint.config.js index 074a28866..3839e09ce 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -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( @@ -16,6 +17,7 @@ const configuration = { const scopes = [...projects, 'tools', 'workflows', 'testing'].sort(); return [RuleConfigSeverity.Error, 'always', scopes]; }, + 'imperative-rule/en': [RuleConfigSeverity.Error, 'always'], }, }; diff --git a/package-lock.json b/package-lock.json index b585767f0..cc6619e99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "license": "MIT", "dependencies": { "@code-pushup/portal-client": "^0.1.2", - "@nx/nx-darwin-x64": "^16.10.0", "@swc/helpers": "~0.5.0", "bundle-require": "^4.0.1", "chalk": "^5.3.0", @@ -25,6 +24,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", @@ -3268,6 +3268,15 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/@ngx-devs/commitlint-plugin-imperative": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@ngx-devs/commitlint-plugin-imperative/-/commitlint-plugin-imperative-1.1.4.tgz", + "integrity": "sha512-HktFA+kg0fEWc6eLhNUDgN1gZnDsKxUyiKD+tv5QQyw2LhKdIdi5RLdITdtIse9rFHhDycPff+mxAFSEHigZ6A==", + "dev": true, + "peerDependencies": { + "@commitlint/lint": ">=7.6.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "dev": true, diff --git a/package.json b/package.json index ae0e86b31..de5424c15 100644 --- a/package.json +++ b/package.json @@ -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",