Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commitlint/rules

Package Overview
Dependencies
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/rules - npm Package Compare versions

Comparing version 17.4.4 to 17.6.0

18

lib/index.d.ts
declare const _default: {
'body-case': import("@commitlint/types").SyncRule<import("@commitlint/types").TargetCaseType | import("@commitlint/types").TargetCaseType[]>;
'body-empty': import("@commitlint/types").SyncRule<never>;
'body-empty': import("@commitlint/types").SyncRule;
'body-full-stop': import("@commitlint/types").SyncRule<string>;
'body-leading-blank': import("@commitlint/types").SyncRule<never>;
'body-leading-blank': import("@commitlint/types").SyncRule;
'body-max-length': import("@commitlint/types").SyncRule<number>;
'body-max-line-length': import("@commitlint/types").SyncRule<number>;
'body-min-length': import("@commitlint/types").SyncRule<number>;
'footer-empty': import("@commitlint/types").SyncRule<never>;
'footer-leading-blank': import("@commitlint/types").SyncRule<never>;
'footer-empty': import("@commitlint/types").SyncRule;
'footer-leading-blank': import("@commitlint/types").SyncRule;
'footer-max-length': import("@commitlint/types").SyncRule<number>;

@@ -18,5 +18,5 @@ 'footer-max-line-length': import("@commitlint/types").SyncRule<number>;

'header-min-length': import("@commitlint/types").SyncRule<number>;
'references-empty': import("@commitlint/types").SyncRule<never>;
'references-empty': import("@commitlint/types").SyncRule;
'scope-case': import("@commitlint/types").SyncRule<import("@commitlint/types").TargetCaseType | import("@commitlint/types").TargetCaseType[]>;
'scope-empty': import("@commitlint/types").SyncRule<never>;
'scope-empty': import("@commitlint/types").SyncRule;
'scope-enum': import("@commitlint/types").SyncRule<string[]>;

@@ -27,10 +27,10 @@ 'scope-max-length': import("@commitlint/types").SyncRule<number>;

'subject-case': import("@commitlint/types").SyncRule<import("@commitlint/types").TargetCaseType | import("@commitlint/types").TargetCaseType[]>;
'subject-empty': import("@commitlint/types").SyncRule<never>;
'subject-empty': import("@commitlint/types").SyncRule;
'subject-full-stop': import("@commitlint/types").SyncRule<string>;
'subject-max-length': import("@commitlint/types").SyncRule<number>;
'subject-min-length': import("@commitlint/types").SyncRule<number>;
'subject-exclamation-mark': import("@commitlint/types").SyncRule<never>;
'subject-exclamation-mark': import("@commitlint/types").SyncRule;
'trailer-exists': import("@commitlint/types").SyncRule<string>;
'type-case': import("@commitlint/types").SyncRule<import("@commitlint/types").TargetCaseType | import("@commitlint/types").TargetCaseType[]>;
'type-empty': import("@commitlint/types").SyncRule<never>;
'type-empty': import("@commitlint/types").SyncRule;
'type-enum': import("@commitlint/types").SyncRule<string[]>;

@@ -37,0 +37,0 @@ 'type-max-length': import("@commitlint/types").SyncRule<number>;

@@ -9,6 +9,22 @@ "use strict";

const message_1 = __importDefault(require("@commitlint/message"));
/**
* Since the rule requires first symbol of a subject to be a letter, use
* combination of Unicode `Cased_Letter` and `Other_Letter` categories now to
* allow non-Latin alphabets as well.
*
* Do not use `Letter` category directly to avoid capturing `Modifier_Letter`
* (which just modifiers letters, so we probably shouldn't anyway) and to stay
* close to previous implementation.
*
* Also, typescript does not seem to support almost any longhand category name
* (and even short for `Cased_Letter` too) so list all required letter
* categories manually just to prevent it from complaining about unknown stuff.
*
* @see [Unicode Categories]{@link https://www.regular-expressions.info/unicode.html}
*/
const startsWithLetterRegex = /^[\p{Ll}\p{Lu}\p{Lt}\p{Lo}]/iu;
const negated = (when) => when === 'never';
const subjectCase = (parsed, when = 'always', value = []) => {
const { subject } = parsed;
if (typeof subject !== 'string' || !subject.match(/^[a-z]/i)) {
if (typeof subject !== 'string' || !subject.match(startsWithLetterRegex)) {
return [true];

@@ -15,0 +31,0 @@ }

{
"name": "@commitlint/rules",
"version": "17.4.4",
"version": "17.6.0",
"description": "Lint your commit messages",

@@ -51,3 +51,3 @@ "main": "lib/index.js",

},
"gitHead": "1aeec3c9b2c21cb8f0386398c24d8e7ed6eafbf0"
"gitHead": "28bc4c77072cea7e97187cb8cf7e138428ece6b6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc