MCPcopy Create free account
hub / github.com/conventional-changelog/commitlint / scopeEmpty

Function scopeEmpty

@commitlint/rules/src/scope-empty.ts:5–12  ·  view source on GitHub ↗
(parsed, when = "never")

Source from the content-addressed store, hash-verified

3import { SyncRule } from "@commitlint/types";
4
5export const scopeEmpty: SyncRule = (parsed, when = "never") => {
6 const negated = when === "always";
7 const notEmpty = ensure.notEmpty(parsed.scope || "");
8 return [
9 negated ? !notEmpty : notEmpty,
10 message(["scope", negated ? "must" : "may not", "be empty"]),
11 ];
12};

Callers 1

Calls 1

messageFunction · 0.85

Tested by

no test coverage detected