fluid-project / fluid-lint-all

Consolidated linting logic free from any particular build technology
BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

fluid-lint-all does not report position of parse errors in its own JSON config file in a helpful way #27

Closed amb26 closed 1 year ago

amb26 commented 3 years ago

fluid-lint-all just uses the standard node "require" to load its own config and so reports the position of any parse errors in the standard unhelpful way as if the file had consisted of a single long line:

15:07:06.102: FATAL ERROR: Uncaught exception: E:\Source\gits\covid-data-monitor.fluidlintallrc.json: Unexpected string in JSON at position 128 SyntaxError: E:\Source\gits\covid-data-monitor.fluidlintallrc.json: Unexpected string in JSON at position 128 at parse () at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object.fluid.lintAll.runAllChecks (E:\Source\gits\covid-data-monitor\node_modules\fluid-lint-all\src\js\lint-all.js:38:29) at Object. (E:\Source\gits\covid-data-monitor\node_modules\fluid-lint-all\src\js\launcher.js:73:46) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! covid-data-monitor@0.0.4 lint: fluid-lint-all

duhrer commented 1 year ago

I was thinking of addressing this with the new parsing we picked up in #60.