(parsed, when = "never")
| 3 | import { SyncRule } from "@commitlint/types"; |
| 4 | |
| 5 | export 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 | }; |
no test coverage detected