| Conditions | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /* eslint strict: ["error", "never"] */ |
||
| 7 | const execJsonLint = function execJsonLint(jsonFiles) { |
||
| 8 | let throwError = false; |
||
| 9 | for (const file of jsonFiles) { |
||
| 10 | try { |
||
| 11 | console.info(`Lint the file ${file}`); |
||
| 12 | // eslint-disable-next-line max-len |
||
| 13 | execSync(`.\\node_modules\\.bin\\jsonlint ${file} --in-place`); |
||
| 14 | } catch (error) { |
||
| 15 | throwError = true; |
||
| 16 | } |
||
| 17 | } |
||
| 18 | if (throwError) { |
||
| 19 | const exitWithError = 1; |
||
| 20 | // eslint-disable-next-line no-process-exit |
||
| 21 | process.exit(exitWithError); |
||
|
|
|||
| 22 | } |
||
| 23 | }; |
||
| 24 | |||
| 26 |