-
Notifications
You must be signed in to change notification settings - Fork 1
Support for commitlint YAML file #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@galak75 hi! No, currently only JSON is supported, but YAML shouldn't be difficult to add. |
I will look for a reference documentation, but here is a small example: extends:
- '@commitlint/config-conventional'
rules:
header-max-length: [1, 'always', 72]
type-enum:
- 2
- always
- - ci
- feat
- fix
- docs
- style
- refactor
- perf
- test
- revert
help: |
**Possible types**:
`ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
`feat`: Adds a new feature.
`fix`: Solves a bug.
`docs`: Adds or alters documentation.
`style`: Improves formatting, white-space.
`refactor`: Rewrites code without feature, performance or bug changes.
`perf`: Improves performance.
`test`: Adds or modifies tests.
`revert`: Changes that reverting other changes |
I couldn't find any yaml-specific documentation, but I hope the official configuration reference (and the link about rules at the bottom) combined with the example above should help? |
@galak75 thanks! I cannot support |
It may be great to support all available configuration formats (javascript, json and yaml) with the current supported features. The day |
@galak75 the issue is how to read a JavaScript file. I can read YAML and JSON because the document format is fixed, but I cannot read a JavaScript file as a user could throw everything inside of it: functions, variables, imports. |
Prettier and commitlint both use cosmiconfig for loading/merging config files, so JetBrains' Prettier plugin might have some useful config-loader recipes that would (presumably) work the same for other tools using cosmiconfig. |
@ParkerM I had already explored the Prettier plugin some time ago. They interface with NodeJs directly, which means they have their own plugin and process to load the configuration file. It's not really straightforward and requires Node to be always present. |
@ParkerM A good alternative is JCEF https://plugins.jetbrains.com/docs/intellij/jcef.html?from=jetbrains.org |
@ParkerM what I could do is try to bundle cosmiconfig and execute it inside the JCEF environment. |
@lppedd Interesting, thanks for the explanation. And sure thing! 👍 |
Hi
First of all, thank you for the amazing work on this plugin.
Would it be possible to add support for yaml file format ? Or is it already supported ?
The text was updated successfully, but these errors were encountered: