-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(icons): ensure UI icons follow naming convention #10292
chore(icons): ensure UI icons follow naming convention #10292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were some quotes missing, but otherwise LGTM! I recommend shellcheck
for catching linting issues like that.
.husky/pre-commit
Outdated
|
||
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM) | ||
|
||
for file in $STAGED_FILES; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for file in $STAGED_FILES; do | |
for file in "$STAGED_FILES"; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting this one gives me the following error:
Since you double quoted this, it will not word split, and the loop will only run once.
Thanks for the rec! Could you share your config? A fresh install didn't complain about quotes, so I might be missing something. |
…estone-estimates * origin/dev: (997 commits) fix: correct non-standard filled icon names (#10309) fix(panel): initially closed panel should be hidden (#10308) chore(linting): automate tracking of custom Sass functions for stylelint (#10313) chore: tidy up demo pages (#10314) build(deps): update dependency dayjs to v1.11.13 (#10283) build(deps): update dependency jsdom to v24.1.3 (#10298) build(deps): update dependency husky to v9.1.6 (#10318) build(deps): update angular-cli monorepo to v18.2.4 (#10317) docs: update component READMEs (#10316) refactor(stylelint): change config to module format to enable more dynamic options (#10311) refactor: fixup typescript errors (#10295) build(deps): update dependency lint-staged to v15.2.10 (#10302) build(deps): update dependency focus-trap to v7.6.0 (#10281) build(deps): update dependency husky to v9.1.5 (#10297) chore: release next feat(checkbox): add component tokens (#10221) revert: "chore: set default page size for E2E tests (#10219)" (#10299) chore(icons): ensure UI icons follow naming convention (#10292) chore: release next feat: add model-history, raster-function-history, raster function-template-history, raster-tool-history, tool-history (#10305) ...
Related Issue: N/A
Summary
This updates our pre-commit hook to check SVG icons to make sure they follow the icon naming convention:
<iconName>-<size>.svg
.<iconName>-<size>-f.svg
.If an icon about to be committed does not match this format, the commit will fail and be canceled.