You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For roughly a month, it's possible to use JSON5 syntax in the config files, thanks to #73. For code editors to understand that this is possible, allowing the config files to end with .json5 as the file extension might make sense.
When now using comments in the JSON file, both VS Code and WebStorm complain that this is a forbidden syntax. Having the file renamed to default.json5 resolves the warnings.
If this is a desired feature, I will try to send a PR for it :)
The text was updated successfully, but these errors were encountered:
But I want to clarify what should happen when there is both a .json and a .json5 config file.
I see the following options:
merge both file contents (which one should take precedence?)
only parse one file and ignore the other one (which one should take precedence?)
throw an error explaining that there should be only one config file of the same type
Currently, I'm leaning toward implementing the third option, as it does not make much sense to have two separate files of the same type, but I'd love to hear your opinion!
I don't think we should throw errors. This is a fundamental problem with the current design of the library. You will face the same issue if you have a .yml file also.
Have a look at #86 with the proposed new design. I think it can make life much easier and a design which is less opinionated and more robust.
For roughly a month, it's possible to use JSON5 syntax in the config files, thanks to #73. For code editors to understand that this is possible, allowing the config files to end with
.json5
as the file extension might make sense.When now using comments in the JSON file, both VS Code and WebStorm complain that this is a forbidden syntax. Having the file renamed to
default.json5
resolves the warnings.If this is a desired feature, I will try to send a PR for it :)
The text was updated successfully, but these errors were encountered: