diff --git a/bin/log-conventions.js b/bin/log-conventions.js index a08cacaba9..33efd2ab1d 100644 --- a/bin/log-conventions.js +++ b/bin/log-conventions.js @@ -33,7 +33,14 @@ const files = await walk({ let found = 0 for (const file of files) { - if (!file.endsWith('.ts')) { + if ( + !file.endsWith('.ts') && + !file.endsWith('.js') && + !file.endsWith('.mjs') && + !file.endsWith('.mts') && + !file.endsWith('.tsx') && + !file.endsWith('.jsx') + ) { continue } @@ -47,7 +54,7 @@ for (const file of files) { const lineContainsConsoleLog = line.indexOf('console.') !== -1 && - /console.(debug|log|info|error)\(/.test(line) === true + /console.(debug|log|info|warn|error)\(/.test(line) === true if (!lineContainsConsoleLog) continue