Open ffxsam opened 1 year ago
Some presets are not supported, see duplicate issue: https://github.com/conventional-changelog/commitlint/issues/298#issuecomment-368292737
Just so I understand correctly, instead of:
pnpm i -D @commitlint/config-conventional conventional-changelog-atom @commitlint/format @commitlint/cli
The workaround to this bug is to not install conventional-changelog-atom
? So, like this:
pnpm i -D @commitlint/config-conventional @commitlint/format @commitlint/cli
Right?
I believe it's less about installing the dep but trying to use this in the commitlint-config as parserPreset: 'conventional-changelog-atom',
see provided commitlint.config.js
above.
@escapedcat What config file were you referring to? The OP's one? I understand that the OP's config is the "wrong" one. But it is the one that the tool recommends.
@lsalazarm99 please read the comment from Mario I referred to:
Some presets are not supported, see duplicate issue: #298 (comment)
Commitlint doesn't support certain presets. At least currently.
Expected Behavior
I've set up the CLI for local use, according to the instructions.
commitlint.config.js
```js /* eslint-disable no-undef */ // import type { UserConfig } from '@commitlint/types'; // import { RuleConfigSeverity } from '@commitlint/types'; const Configuration = { /* * Resolve and load @commitlint/config-conventional from node_modules. * Referenced packages must be installed */ extends: ['@commitlint/config-conventional'], /* * Resolve and load conventional-changelog-atom from node_modules. * Referenced packages must be installed */ parserPreset: 'conventional-changelog-atom', /* * Resolve and load @commitlint/format from node_modules. * Referenced package must be installed */ formatter: '@commitlint/format', /* * Any rules defined here will override rules from @commitlint/config-conventional */ rules: { 'type-enum': [2, 'always', ['feat', 'fix', 'chore', 'docs']], 'scope-enum': [2, 'always', ['core', 'cli', 'docs', 'test']], }, /* * Functions that return true if commitlint should ignore the given message. */ ignores: [(commit) => commit === ''], /* * Whether commitlint uses the default ignore rules. */ defaultIgnores: true, /* * Custom URL to show upon failure */ helpUrl: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint', /* * Custom prompt configs */ prompt: { messages: {}, questions: { type: { description: 'please input type:', }, }, }, }; module.exports = Configuration; ```When I commit with a message like
"chore(test): Perfectly valid commit message"
, I should at least see an error telling me the possible enums.Current Behavior
It complains about type & subject being empty.
Affected packages
Possible Solution
No response
Steps to Reproduce
Context
No response
commitlint --version
@commitlint/cli@17.4.4
git --version
git version 2.39.1
node --version
v18.12.1