Skip to content

Commit

Permalink
ci: fix icon-name pre-commit checks (#11287)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfranco authored Jan 14, 2025
1 parent fc9ced0 commit f6d76ff
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 @@ -6,10 +6,10 @@ check_ui_icon_name_consistency() {
valid_pattern="^[a-z0-9-]+-(16|24|32)(-f)?\\.svg$"

# this pattern will check for invalid use of "-f-" anywhere except right before the size
invalid_pattern="-[a-z0-9]+-f-"
invalid_pattern="\-[a-z0-9]+-f-"

staged_files="$(
git diff --cached --name-only --diff-filter=ACM -- packages/calcite-ui-icons/icons/*.svg
git diff --cached --name-only --diff-filter=ACM | grep -E "packages/calcite-ui-icons/icons/.*\.svg" || true
)"

if [ -n "$staged_files" ]; then
Expand Down

0 comments on commit f6d76ff

Please sign in to comment.