commitlint-plugin-wizardoc-rules
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "commitlint-plugin-wizardoc-rules", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"main": "./dist/index.js", | ||
"license": "MIT" | ||
} |
import { BREAK_CHANGE_SYMBOL } from "./constants"; | ||
import { Commit, Rule, RuleOutcome } from "@commitlint/types"; | ||
import { Commit, RuleOutcome, RuleConfigCondition } from "@commitlint/types"; | ||
@@ -10,10 +10,14 @@ export type WithSymbol<T> = T & { | ||
export const breakChangeSymbolRule = (walkData: Commit): RuleOutcome => { | ||
export const breakChangeSymbolRule = ( | ||
walkData: Commit, | ||
_when?: RuleConfigCondition, | ||
value: string = BREAK_CHANGE_SYMBOL | ||
): RuleOutcome => { | ||
const { symbol } = walkData as CommitWithSymbol; | ||
const isRuleValid = !symbol || symbol === BREAK_CHANGE_SYMBOL; | ||
const isRuleValid = !symbol || symbol === value; | ||
return [ | ||
isRuleValid, | ||
`break change must be symbol with "${BREAK_CHANGE_SYMBOL}" e.g: ${BREAK_CHANGE_SYMBOL}[Type::scope] subject`, | ||
`break change must be symbol with "${value}" e.g: ${value}[Type::scope] subject`, | ||
]; | ||
}; |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
4817
123
1