Skip to content

Commit

Permalink
chore(repo): Include mjs in precommit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilewski committed Oct 31, 2023
1 parent 8019462 commit 3c5c5d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ for file in $staged_files; do
# Extract the first two folders from the file path
folder=$(echo $file | awk -F'/' '{print $1 "/" $2}')

# Filter files which end with .js, .jsx, .ts, or .tsx [NOTE: Should match ./.lintstagedrc.json]
if [[ $file =~ \.(js|jsx|ts|tsx)$ ]]; then
# Filter files which end with .mjs, .js, .jsx, .ts, or .tsx [NOTE: Should match ./.lintstagedrc.json]
if [[ $file =~ \.(mjs|js|jsx|ts|tsx)$ ]]; then
# Check if this folder is already in the list of unique folders
if [[ $folder == packages/* ]] && [[ ! " $unique_folders " =~ "$folder" ]]; then
# Append the folder to the list of unique folders
Expand Down

0 comments on commit 3c5c5d7

Please sign in to comment.