Skip to content

Use optional jsonc on schema tags #815

Open
@eloyesp

Description

Shopify added support for comments and trailing commas for the theme files. Prettier have support for those using JSON5 JSONC parser and prettier can use that format on the *.json files (with some config), but the liquid plugin does not permit using that format on the json embedded on liquid files (on the schema tag).

As far as I could test, shopify accepts the prettier output for jsonc format, so it would make the prettier plugin output easier to review, so adding support there would match the principles.

That said, this feature cannot be implemented directly, because it would introduce an unexpected failure, as it would make code that was correct, now be incorrect. So we would need to add a setting (false by default until the next mayor version) to use jsonc format for the json embedded on the liquid files. With the setting, developers could choose when to migrate to JSONC format on the files.

Checklist

  • I have checked and made sure that the proposal adheres to this plugin's principles

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions