@dwp/commitlint-config-base
Advanced tools
Comparing version
{ | ||
"name": "@dwp/commitlint-config-base", | ||
"version": "4.0.11", | ||
"version": "5.0.0", | ||
"author": "Adam Moss", | ||
@@ -22,3 +22,3 @@ "license": "ISC", | ||
"engines": { | ||
"node": ">=14 <23" | ||
"node": ">=16 <23" | ||
}, | ||
@@ -33,3 +33,3 @@ "files": [ | ||
"compliance:commits:edit": "commitlint --edit", | ||
"compliance:lint": "eslint --ignore-path .gitignore .", | ||
"compliance:lint": "eslint .", | ||
"lint-staged": "lint-staged", | ||
@@ -44,23 +44,21 @@ "pipeline": "npm run compliance-tests && npm run security-tests && npm run tests", | ||
"tests": "npm run tests:unit", | ||
"tests:unit": "nyc --report-dir .coverage/unit jasmine --config=tests/unit/support/jasmine.json" | ||
"tests:unit": "node --test", | ||
"tests:coverage": "node --experimental-test-coverage --test" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "17.8.1", | ||
"@commitlint/lint": "17.8.1", | ||
"@commitlint/load": "17.8.1", | ||
"@dwp/eslint-config-base": "6.1.1", | ||
"@dwp/eslint-config-jasmine": "1.1.1", | ||
"@dwp/nyc-config-base": "1.1.1", | ||
"eslint": "8.57.1", | ||
"husky": "8.0.3", | ||
"jasmine": "5.8.0", | ||
"jasmine-spec-reporter": "7.0.0", | ||
"lint-staged": "15.5.2", | ||
"nyc": "15.1.0", | ||
"@commitlint/cli": "19.8.1", | ||
"@commitlint/lint": "19.8.1", | ||
"@commitlint/load": "19.8.1", | ||
"@dwp/eslint-config-base": "9.0.2", | ||
"@dwp/nyc-config-base": "2.0.0", | ||
"eslint": "9.30.1", | ||
"globals": "16.3.0", | ||
"husky": "9.1.7", | ||
"lint-staged": "16.1.2", | ||
"snyk": "1.1297.3" | ||
}, | ||
"dependencies": { | ||
"@commitlint/config-conventional": "17.8.1", | ||
"conventional-changelog-conventionalcommits": "6.1.0" | ||
"@dwp/commitlint-config-base": "4.0.7", | ||
"conventional-changelog-conventionalcommits": "9.0.0" | ||
} | ||
} |
module.exports = { | ||
extends: [ | ||
'@commitlint/config-conventional', | ||
], | ||
extends: ["@commitlint/config-conventional"], | ||
ignores: [ | ||
(commit) => { | ||
const lines = commit.split('\n'); | ||
const signingLines = lines.filter((line) => line.startsWith('Signed-off-by:')); | ||
const serviceAccountRegex = /service_account_((group|project)_\d+_)?([a-f0-9]+)(@noreply\.(dwp\.gitlab-dedicated|gitlab)\.com)/gi; | ||
const serviceAccountCommit = signingLines.some((line) => line.match(serviceAccountRegex)); | ||
const lines = commit.split("\n"); | ||
const signingLines = lines.filter((line) => | ||
line.startsWith("Signed-off-by:"), | ||
); | ||
const serviceAccountRegex = | ||
/service_account_((group|project)_\d+_)?([a-f0-9]+)(@noreply\.(dwp\.gitlab-dedicated|gitlab)\.com)/gi; | ||
const serviceAccountCommit = signingLines.some((line) => | ||
line.match(serviceAccountRegex), | ||
); | ||
if (serviceAccountCommit) { | ||
@@ -15,3 +18,4 @@ return true; | ||
const engBotRegex = /<engineering-bot@engineering\.digital\.dwp\.gov\.uk>/gi; | ||
const engBotRegex = | ||
/<engineering-bot@engineering\.digital\.dwp\.gov\.uk>/gi; | ||
return signingLines.some((line) => line.match(engBotRegex)); | ||
@@ -22,5 +26,6 @@ }, | ||
parserOpts: { | ||
headerPattern: /^(\w*)(?:\((.*)\))?!?: ((?!\[skip ci\])(?!\[ci skip\]).)*$/, | ||
headerPattern: | ||
/^(\w*)(?:\((.*)\))?!?: ((?!\[skip ci\])(?!\[ci skip\]).)*$/, | ||
}, | ||
}, | ||
}; |
10
-23.08%28
21.74%4702
-1.84%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed