flarum / docs

Flarum documentation.
https://docs.flarum.org
MIT License
65 stars 131 forks source link

Update composer.md #385

Closed datlechin closed 2 years ago

clarkwinkelmann commented 2 years ago

What's the reason for the change? I assume jsonc was used specifically to support JSON with comments. It seems like GitHub preview doesn't support it though.

davwheat commented 2 years ago

It seems like GitHub preview doesn't support it though.

Neither does Docusaurus (Prism.js). Instead we have to use JSON, it seems, rather than JSONC.

https://prismjs.com/examples.html#per-language-examples

tankerkiller125 commented 2 years ago

We could use json5 (supports comments)

datlechin commented 2 years ago

jsonc is not supported.

Screenshot_20211016-093930_Chrome

askvortsov1 commented 2 years ago

jsonc is not supported.

Screenshot_20211016-093930_Chrome

As Matt suggested, let's use json5 instead of json. Also, are there other parts of the code that need to be changed?

davwheat commented 2 years ago

Using json5 would be incorrect, as it allows trailing commas while very few of our json or jsonc files actually support this. The notable exception is tsconfig.json which is a JSON5 file.

davwheat commented 2 years ago

This PR was superseded by #388, but as you brought the issue to our attention, I've made sure to mark this as accepted.

Thank you for you contribution!