Skip to content

Commit 583d5a6

Browse files
committed
use stricter regex, otherwise it matches mocha.browser.opts
1 parent 0a5be2a commit 583d5a6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tools/gitHooks/prettier.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ async function doPrettierCommit(changedFiles) {
6565
}
6666

6767
// Only run on .js or .ts files.
68-
const targetFiles = changedFiles.filter(line => {
69-
const res = line.match(/(js|ts)$/);
70-
console.log(res, line);
71-
return true;
72-
});
68+
const targetFiles = changedFiles.filter(line => line.match(/\.(js|ts)$/));
7369

7470
if (targetFiles.length === 0) {
7571
console.log('No files changed.');

0 commit comments

Comments
 (0)