jeemok / better-npm-audit

The goal of this project is to provide additional features on top of the existing npm audit options
https://www.npmjs.com/package/better-npm-audit
MIT License
118 stars 26 forks source link

Report when the .nsprc file is present but not (valid) JSON #50

Closed alert-debug closed 3 years ago

alert-debug commented 3 years ago

While testing the latest version, I made a small mistake when updating the .nsprc file which meant the file was no longer valid JSON. It only took me a moment to realise why none of the exclusions were being applied, but a beginner might be more confused (especially if they are using an editor which doesn't warn them about JSON validity issues in their files).

Hopefully it's a small change to catch the specific case of an invalid JSON file, and output a specific human-readable error message to the user.