- Notifications
You must be signed in to change notification settings - Fork 949
Open
Labels
Description
Steps to Reproduce
1. Install commitlint and @commitlint/config-nx-scopes 2. Create TS commitlint custom config: import { utils } from '@commitlint/config-nx-scopes'; import type { UserConfig } from '@commitlint/types'; import { RuleConfigSeverity } from '@commitlint/types'; const Configuration: UserConfig = { extends: ['@commitlint/config-conventional', '@commitlint/config-nx-scopes'], // parserPreset: "conventional-changelog-atom", // formatter: "@commitlint/format", rules: { 'scope-enum': async (ctx) => [ RuleConfigSeverity.Error, 'always', ['repo', 'deps', 'release', ...(await utils.getProjects(ctx))], ], }, }; export default Configuration;Current Behavior
TS fails because Rule definition not accept functions with arguments...
Expected Behavior
Types should accept function with arguments to pass the context...
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
Update QualifiedRuleConfig type to include ctx parameter
Context
No response
commitlint --version
19.8.0
git --version
2.49.0
node --version
22.14.0
maxdzin