@commitlint/rules
Advanced tools
Comparing version 13.1.0 to 13.2.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [13.2.0](https://github.com/conventional-changelog/commitlint/compare/v13.1.0...v13.2.0) (2021-09-28) | ||
**Note:** Version bump only for package @commitlint/rules | ||
# [13.1.0](https://github.com/conventional-changelog/commitlint/compare/v13.0.0...v13.1.0) (2021-07-24) | ||
@@ -8,0 +16,0 @@ |
@@ -25,3 +25,3 @@ "use strict"; | ||
const result = checks.some((check) => { | ||
const r = ensure_1.case(body, check.case); | ||
const r = (0, ensure_1.case)(body, check.case); | ||
return negated(check.when) ? !r : r; | ||
@@ -32,3 +32,3 @@ }); | ||
negated(when) ? !result : result, | ||
message_1.default([`body must`, negated(when) ? `not` : null, `be ${list}`]), | ||
(0, message_1.default)([`body must`, negated(when) ? `not` : null, `be ${list}`]), | ||
]; | ||
@@ -35,0 +35,0 @@ }; |
@@ -33,3 +33,3 @@ "use strict"; | ||
negated ? notEmpty : !notEmpty, | ||
message_1.default(['body', negated ? 'may not' : 'must', 'be empty']), | ||
(0, message_1.default)(['body', negated ? 'may not' : 'must', 'be empty']), | ||
]; | ||
@@ -36,0 +36,0 @@ }; |
@@ -17,3 +17,3 @@ "use strict"; | ||
negated ? !hasStop : hasStop, | ||
message_1.default(['body', negated ? 'may not' : 'must', 'end with full stop']), | ||
(0, message_1.default)(['body', negated ? 'may not' : 'must', 'end with full stop']), | ||
]; | ||
@@ -20,0 +20,0 @@ }; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const negated = when === 'never'; | ||
const [leading] = to_lines_1.default(parsed.raw).slice(1); | ||
const [leading] = (0, to_lines_1.default)(parsed.raw).slice(1); | ||
// Check if the first line of body is empty | ||
@@ -21,3 +21,3 @@ const succeeds = leading === ''; | ||
negated ? !succeeds : succeeds, | ||
message_1.default(['body', negated ? 'may not' : 'must', 'have leading blank line']), | ||
(0, message_1.default)(['body', negated ? 'may not' : 'must', 'have leading blank line']), | ||
]; | ||
@@ -24,0 +24,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLength(input, value), | ||
(0, ensure_1.maxLength)(input, value), | ||
`body must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLineLength(input, value), | ||
(0, ensure_1.maxLineLength)(input, value), | ||
`body's lines must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -10,3 +10,3 @@ "use strict"; | ||
return [ | ||
ensure_1.minLength(parsed.body, value), | ||
(0, ensure_1.minLength)(parsed.body, value), | ||
`body must not be shorter than ${value} characters`, | ||
@@ -13,0 +13,0 @@ ]; |
@@ -33,3 +33,3 @@ "use strict"; | ||
negated ? notEmpty : !notEmpty, | ||
message_1.default(['footer', negated ? 'may not' : 'must', 'be empty']), | ||
(0, message_1.default)(['footer', negated ? 'may not' : 'must', 'be empty']), | ||
]; | ||
@@ -36,0 +36,0 @@ }; |
@@ -15,4 +15,4 @@ "use strict"; | ||
const negated = when === 'never'; | ||
const rawLines = to_lines_1.default(parsed.raw); | ||
const bodyLines = parsed.body ? to_lines_1.default(parsed.body) : []; | ||
const rawLines = (0, to_lines_1.default)(parsed.raw); | ||
const bodyLines = parsed.body ? (0, to_lines_1.default)(parsed.body) : []; | ||
const bodyOffset = bodyLines.length > 0 ? rawLines.indexOf(bodyLines[0]) : 1; | ||
@@ -24,3 +24,3 @@ const [leading] = rawLines.slice(bodyLines.length + bodyOffset); | ||
negated ? !succeeds : succeeds, | ||
message_1.default([ | ||
(0, message_1.default)([ | ||
'footer', | ||
@@ -27,0 +27,0 @@ negated ? 'may not' : 'must', |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLength(input, value), | ||
(0, ensure_1.maxLength)(input, value), | ||
`footer must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLineLength(input, value), | ||
(0, ensure_1.maxLineLength)(input, value), | ||
`footer's lines must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -10,3 +10,3 @@ "use strict"; | ||
return [ | ||
ensure_1.minLength(parsed.footer, value), | ||
(0, ensure_1.minLength)(parsed.footer, value), | ||
`footer must not be shorter than ${value} characters`, | ||
@@ -13,0 +13,0 @@ ]; |
@@ -25,3 +25,3 @@ "use strict"; | ||
const result = checks.some((check) => { | ||
const r = ensure_1.case(header, check.case); | ||
const r = (0, ensure_1.case)(header, check.case); | ||
return negated(check.when) ? !r : r; | ||
@@ -32,3 +32,3 @@ }); | ||
negated(when) ? !result : result, | ||
message_1.default([`header must`, negated(when) ? `not` : null, `be ${list}`]), | ||
(0, message_1.default)([`header must`, negated(when) ? `not` : null, `be ${list}`]), | ||
]; | ||
@@ -35,0 +35,0 @@ }; |
@@ -14,3 +14,3 @@ "use strict"; | ||
negated ? !hasStop : hasStop, | ||
message_1.default(['header', negated ? 'may not' : 'must', 'end with full stop']), | ||
(0, message_1.default)(['header', negated ? 'may not' : 'must', 'end with full stop']), | ||
]; | ||
@@ -17,0 +17,0 @@ }; |
@@ -7,3 +7,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLength(parsed.header, value), | ||
(0, ensure_1.maxLength)(parsed.header, value), | ||
`header must not be longer than ${value} characters, current length is ${parsed.header.length}`, | ||
@@ -10,0 +10,0 @@ ]; |
@@ -7,3 +7,3 @@ "use strict"; | ||
return [ | ||
ensure_1.minLength(parsed.header, value), | ||
(0, ensure_1.minLength)(parsed.header, value), | ||
`header must not be shorter than ${value} characters, current length is ${parsed.header.length}`, | ||
@@ -10,0 +10,0 @@ ]; |
@@ -13,3 +13,3 @@ "use strict"; | ||
negated ? !notEmpty : notEmpty, | ||
message_1.default(['references', negated ? 'must' : 'may not', 'be empty']), | ||
(0, message_1.default)(['references', negated ? 'must' : 'may not', 'be empty']), | ||
]; | ||
@@ -16,0 +16,0 @@ }; |
@@ -29,3 +29,3 @@ "use strict"; | ||
const result = checks.some((check) => { | ||
const r = scopeSegments.every((segment) => delimiters.test(segment) || ensure_1.case(segment, check.case)); | ||
const r = scopeSegments.every((segment) => delimiters.test(segment) || (0, ensure_1.case)(segment, check.case)); | ||
return negated(check.when) ? !r : r; | ||
@@ -36,3 +36,3 @@ }); | ||
negated(when) ? !result : result, | ||
message_1.default([`scope must`, negated(when) ? `not` : null, `be ${list}`]), | ||
(0, message_1.default)([`scope must`, negated(when) ? `not` : null, `be ${list}`]), | ||
]; | ||
@@ -39,0 +39,0 @@ }; |
@@ -33,3 +33,3 @@ "use strict"; | ||
negated ? !notEmpty : notEmpty, | ||
message_1.default(['scope', negated ? 'must' : 'may not', 'be empty']), | ||
(0, message_1.default)(['scope', negated ? 'must' : 'may not', 'be empty']), | ||
]; | ||
@@ -36,0 +36,0 @@ }; |
@@ -41,3 +41,3 @@ "use strict"; | ||
negated ? !result : result, | ||
message_1.default([ | ||
(0, message_1.default)([ | ||
`scope must`, | ||
@@ -44,0 +44,0 @@ negated ? `not` : null, |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLength(input, value), | ||
(0, ensure_1.maxLength)(input, value), | ||
`scope must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.minLength(input, value), | ||
(0, ensure_1.minLength)(input, value), | ||
`scope must not be shorter than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -10,3 +10,3 @@ "use strict"; | ||
const signedOffBy = (parsed, when = 'always', value = '') => { | ||
const lines = to_lines_1.default(parsed.raw).filter((ln) => | ||
const lines = (0, to_lines_1.default)(parsed.raw).filter((ln) => | ||
// skip comments | ||
@@ -21,3 +21,3 @@ !ln.startsWith('#') && | ||
negated ? !hasSignedOffBy : hasSignedOffBy, | ||
message_1.default(['message', negated ? 'must not' : 'must', 'be signed off']), | ||
(0, message_1.default)(['message', negated ? 'must not' : 'must', 'be signed off']), | ||
]; | ||
@@ -24,0 +24,0 @@ }; |
@@ -25,3 +25,3 @@ "use strict"; | ||
const result = checks.some((check) => { | ||
const r = ensure_1.case(subject, check.case); | ||
const r = (0, ensure_1.case)(subject, check.case); | ||
return negated(check.when) ? !r : r; | ||
@@ -32,3 +32,3 @@ }); | ||
negated(when) ? !result : result, | ||
message_1.default([`subject must`, negated(when) ? `not` : null, `be ${list}`]), | ||
(0, message_1.default)([`subject must`, negated(when) ? `not` : null, `be ${list}`]), | ||
]; | ||
@@ -35,0 +35,0 @@ }; |
@@ -33,3 +33,3 @@ "use strict"; | ||
negated ? notEmpty : !notEmpty, | ||
message_1.default(['subject', negated ? 'may not' : 'must', 'be empty']), | ||
(0, message_1.default)(['subject', negated ? 'may not' : 'must', 'be empty']), | ||
]; | ||
@@ -36,0 +36,0 @@ }; |
@@ -17,3 +17,3 @@ "use strict"; | ||
negated ? !hasExclamationMark : hasExclamationMark, | ||
message_1.default([ | ||
(0, message_1.default)([ | ||
'subject', | ||
@@ -20,0 +20,0 @@ negated ? 'must not' : 'must', |
@@ -17,3 +17,3 @@ "use strict"; | ||
negated ? !hasStop : hasStop, | ||
message_1.default(['subject', negated ? 'may not' : 'must', 'end with full stop']), | ||
(0, message_1.default)(['subject', negated ? 'may not' : 'must', 'end with full stop']), | ||
]; | ||
@@ -20,0 +20,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLength(input, value), | ||
(0, ensure_1.maxLength)(input, value), | ||
`subject must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.minLength(input, value), | ||
(0, ensure_1.minLength)(input, value), | ||
`subject must not be shorter than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -14,3 +14,3 @@ "use strict"; | ||
}).stdout; | ||
const matches = to_lines_1.default(trailers).filter((ln) => ln.startsWith(value)).length; | ||
const matches = (0, to_lines_1.default)(trailers).filter((ln) => ln.startsWith(value)).length; | ||
const negated = when === 'never'; | ||
@@ -20,3 +20,3 @@ const hasTrailer = matches > 0; | ||
negated ? !hasTrailer : hasTrailer, | ||
message_1.default([ | ||
(0, message_1.default)([ | ||
'message', | ||
@@ -23,0 +23,0 @@ negated ? 'must not' : 'must', |
@@ -25,3 +25,3 @@ "use strict"; | ||
const result = checks.some((check) => { | ||
const r = ensure_1.case(type, check.case); | ||
const r = (0, ensure_1.case)(type, check.case); | ||
return negated(check.when) ? !r : r; | ||
@@ -32,3 +32,3 @@ }); | ||
negated(when) ? !result : result, | ||
message_1.default([`type must`, negated(when) ? `not` : null, `be ${list}`]), | ||
(0, message_1.default)([`type must`, negated(when) ? `not` : null, `be ${list}`]), | ||
]; | ||
@@ -35,0 +35,0 @@ }; |
@@ -33,3 +33,3 @@ "use strict"; | ||
negated ? notEmpty : !notEmpty, | ||
message_1.default(['type', negated ? 'may not' : 'must', 'be empty']), | ||
(0, message_1.default)(['type', negated ? 'may not' : 'must', 'be empty']), | ||
]; | ||
@@ -36,0 +36,0 @@ }; |
@@ -37,3 +37,3 @@ "use strict"; | ||
negated ? !result : result, | ||
message_1.default([ | ||
(0, message_1.default)([ | ||
`type must`, | ||
@@ -40,0 +40,0 @@ negated ? `not` : null, |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.maxLength(input, value), | ||
(0, ensure_1.maxLength)(input, value), | ||
`type must not be longer than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
@@ -11,3 +11,3 @@ "use strict"; | ||
return [ | ||
ensure_1.minLength(input, value), | ||
(0, ensure_1.minLength)(input, value), | ||
`type must not be shorter than ${value} characters`, | ||
@@ -14,0 +14,0 @@ ]; |
{ | ||
"name": "@commitlint/rules", | ||
"version": "13.1.0", | ||
"version": "13.2.0", | ||
"description": "Lint your commit messages", | ||
@@ -37,16 +37,16 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@commitlint/parse": "^13.1.0", | ||
"@commitlint/test": "^13.0.0", | ||
"@commitlint/utils": "^13.0.0", | ||
"conventional-changelog-angular": "5.0.12", | ||
"@commitlint/parse": "^13.2.0", | ||
"@commitlint/test": "^13.2.0", | ||
"@commitlint/utils": "^13.2.0", | ||
"conventional-changelog-angular": "5.0.13", | ||
"globby": "^11.0.0" | ||
}, | ||
"dependencies": { | ||
"@commitlint/ensure": "^13.1.0", | ||
"@commitlint/message": "^13.0.0", | ||
"@commitlint/to-lines": "^13.0.0", | ||
"@commitlint/types": "^13.1.0", | ||
"@commitlint/ensure": "^13.2.0", | ||
"@commitlint/message": "^13.2.0", | ||
"@commitlint/to-lines": "^13.2.0", | ||
"@commitlint/types": "^13.2.0", | ||
"execa": "^5.0.0" | ||
}, | ||
"gitHead": "dfbb8c5e9481a5075458acad2e4666fd6b98f9a7" | ||
"gitHead": "65e45339c79e46d01e35ec067edf14d225a3528a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92138
Updated@commitlint/ensure@^13.2.0
Updated@commitlint/message@^13.2.0
Updated@commitlint/to-lines@^13.2.0
Updated@commitlint/types@^13.2.0