-
Notifications
You must be signed in to change notification settings - Fork 72
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
Allow comments in chromatic.config.json
#1114
Labels
CLI
Empathy
enhancement
Classification: New feature or request
released
Verdict: This issue/pull request has been released
Comments
jwir3
added a commit
that referenced
this issue
Nov 5, 2024
This adds support for JSON5 as a configuration file language, allowing for an extension to JSON that supports comments and other features. Fixes CAP-2357. Fixes #1114.
jwir3
added
enhancement
Classification: New feature or request
Empathy
and removed
needs triage
Tracking: Issue needs confirmation
labels
Nov 5, 2024
jwir3
added a commit
that referenced
this issue
Nov 6, 2024
This adds support for JSON5 as a configuration file language, allowing for an extension to JSON that supports comments and other features. Fixes CAP-2357. Fixes #1114.
jwir3
added a commit
that referenced
this issue
Nov 7, 2024
This adds support for JSON5 as a configuration file language, allowing for an extension to JSON that supports comments and other features. Fixes CAP-2357. Fixes #1114.
jwir3
added a commit
that referenced
this issue
Nov 7, 2024
This adds support for JSON5 as a configuration file language, allowing for an extension to JSON that supports comments and other features. Fixes CAP-2357. Fixes #1114.
jwir3
added a commit
that referenced
this issue
Nov 7, 2024
This adds support for JSON5 as a configuration file language, allowing for an extension to JSON that supports comments and other features. Fixes CAP-2357. Fixes #1114.
🚀 Issue was released in |
chromatic-ci-bot
added
the
released
Verdict: This issue/pull request has been released
label
Nov 7, 2024
🚀 Issue was released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLI
Empathy
enhancement
Classification: New feature or request
released
Verdict: This issue/pull request has been released
Feature request
I'd like to be able to write comments in my Chromatic configuration file so that other developers on my team can understand why I configured it the way I did.
Proposed solution
Parse the configuration file with something like JSON5.
Consider supporting both
chromatic.config.json
andchromatic.config.jsonc
(the file extension is important for editor support).Alternative solutions
I considered using a non-standard config file path with a
.jsonc
extension, which would at least make my editor allow comments in the file, but the Chromatic CLI would still crash.I guess I could strip comments from the file in CI, then pass the processed file to Chromatic... but that means I can't easily run the Chromatic CLI locally.
Additional context
chromatic.config.json
is parsed withJSON.parse
, which will throw an error if there are comments in the JSON.The text was updated successfully, but these errors were encountered: