Skip to content
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

feat: jsonc support #514

Closed
wants to merge 1 commit into from
Closed

feat: jsonc support #514

wants to merge 1 commit into from

Conversation

stevenh
Copy link

@stevenh stevenh commented Mar 15, 2025

Add support for identifying jsonc files by extension.

Add support for identifying jsonc files by extension.
@asottile
Copy link
Member

afaik this isn't a standardized format or extension (does it include commas? does it include single quotes?) so we can't accept an extension for it

@asottile asottile closed this Mar 15, 2025
@stevenh
Copy link
Author

stevenh commented Mar 15, 2025

JSONC is a superset of JSON which supports comments, it's commonly used by tools like Visual Studio Code.

You can some more details here:

It's also supported by prettier, and I noticed the lack of support while doing a PR for schemastore you can see the comment here which currently prevents it from using prettier to check jsonc files as far as I can tell.

Hope this helps, do you need any more information?

@asottile
Copy link
Member

the usage of the extension predates that "standard"

@stevenh
Copy link
Author

stevenh commented Mar 15, 2025

Is there a way to implement it such that we can get it added?

@asottile
Copy link
Member

you don't need identify support to use things in pre-commit -- you can always use files

@stevenh
Copy link
Author

stevenh commented Mar 15, 2025

Thanks for the info, I'll take a look.

@stevenh stevenh deleted the feat/jsonc branch March 15, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants