remove parse-json?
jimmywarting opened this issue · comments
Is it worth depending on a external dependency rather than using core JSON.parse?
https://github.com/davidtheclark/cosmiconfig/blob/18346056c9a7fdf8d7531ea5a998edfb255fc140/src/loaders.ts#L22
if you do want to lazy load it then you can use the async import()
syntax instead of using require?
We're using parse-json because it provides significantly nicer error messages for invalid JSON.
Have you encountered any problem with it, or have another suggestion? I don't want to degrade the quality of the parsing error messages.
Closing for housekeeping reasons - if there is a problem with the package used, feel free to comment and I'll reopen.