* Checks files for formatting (and optionally fixes them) with Eslint. * Explicitly makes sure the API doesn't check files in `.eslintignore`. * When local changes are linted (e.g. during CI), we also check if the list of * forbidden terms needs to be updated. * @return {Promise }
()
| 122 | * @return {Promise<void>} |
| 123 | */ |
| 124 | async function lint() { |
| 125 | const filesToCheck = getFilesToCheck(lintGlobs, {}, '.eslintignore'); |
| 126 | if (filesToCheck.length == 0) { |
| 127 | return; |
| 128 | } |
| 129 | const forbiddenTerms = 'build-system/test-configs/forbidden-terms.js'; |
| 130 | if (argv.local_changes && !filesToCheck.includes(forbiddenTerms)) { |
| 131 | filesToCheck.push(forbiddenTerms); |
| 132 | } |
| 133 | await runLinter(filesToCheck); |
| 134 | } |
| 135 | |
| 136 | module.exports = { |
| 137 | lint, |
nothing calls this directly
no test coverage detected