(relPath, content)
| 143 | } |
| 144 | |
| 145 | function checkJavaScriptSyntax(relPath, content) { |
| 146 | if (esbuild) { |
| 147 | esbuild.transformSync(content, { |
| 148 | loader: 'js', |
| 149 | sourcefile: relPath, |
| 150 | charset: 'utf8' |
| 151 | }); |
| 152 | return; |
| 153 | } |
| 154 | |
| 155 | fallbackNodeSyntaxCheck(relPath, content); |
| 156 | } |
| 157 | |
| 158 | function runChecks(stagedFiles) { |
| 159 | const failures = []; |
no test coverage detected