-
Notifications
You must be signed in to change notification settings - Fork 29
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
toSourceCode of JSON files should support JSONC #654
Comments
6 tasks
Couple of options:
|
Notes:
|
charlespwd
added a commit
that referenced
this issue
Dec 6, 2024
- Rip out `json-to-ast` - Inline the `json-to-ast` types in `theme-check-common/src/jsonc` - Make a little `jsonc-parser#Node` -> `json-to-ast#ASTNode` adapter Fixes #654
1 task
charlespwd
added a commit
that referenced
this issue
Dec 6, 2024
- Rip out `json-to-ast` - Inline the `json-to-ast` types in `theme-check-common/src/jsonc` - Make a little `jsonc-parser#Node` -> `json-to-ast#ASTNode` adapter Fixes #654
charlespwd
added a commit
that referenced
this issue
Dec 6, 2024
- Rip out `json-to-ast` - Inline the `json-to-ast` types in `theme-check-common/src/jsonc` - Make a little `jsonc-parser#Node` -> `json-to-ast#ASTNode` adapter Fixes #654
albchu
pushed a commit
that referenced
this issue
Dec 9, 2024
- Rip out `json-to-ast` - Inline the `json-to-ast` types in `theme-check-common/src/jsonc` - Make a little `jsonc-parser#Node` -> `json-to-ast#ASTNode` adapter Fixes #654
navdeep5
pushed a commit
that referenced
this issue
Dec 16, 2024
- Rip out `json-to-ast` - Inline the `json-to-ast` types in `theme-check-common/src/jsonc` - Make a little `jsonc-parser#Node` -> `json-to-ast#ASTNode` adapter Fixes #654
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
We need a jsonc parser ->
json-to-ast
#JSONNode
adapter.Linting JSONC files doesn't do anything because
json-to-ast
throws an error when it sees a comment or a trailing comma.Tried to do #547 but couldn't because the template files in horizon have the JSONC comment at the top and the sourceCode.ast was
instanceof Error
https://github.com/Shopify/theme-tools/blob/main/packages/theme-check-common/src/to-source-code.ts#L2-L22
^
json-to-ast
doesn't support JSONC. We need something that parses JSONC into an ast and transforms it into a JSONNode.The text was updated successfully, but these errors were encountered: