Commit 26a92e2
fix(rules): make ds-fixed-width rule fire on absolute paths + clarify hex warn
Greptile review on PR #14 caught three real issues:
1. ds-arbitrary-fixed-width-in-ds-component used a ^-anchored file_path
pattern that never matched at runtime — Claude Code passes absolute
paths like /home/user/repo/src/components/ui/foo.tsx, but ^src/ only
anchors to start-of-string. All 56 tests passed because fixtures used
relative paths; the rule was silently inert in production. Switch to
(^|/)src/components/ui/ so both relative and absolute paths trigger
it. Add a regression test covering an absolute fixture path.
2. ds-raw-hex-color-in-source description started with "Block" while
action is warn — confused both maintainers reading the manifest and
end-users seeing the runtime stderr. Description now says "Warn".
3. The design-system/ and design-tokens not_pattern exemptions had no
test coverage. Added two fixtures so a future regex narrow-down that
broke them would fail CI.
Tests: 59/59 passing (was 56/56; added 3 regression cases).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6ac32ee commit 26a92e2
2 files changed
Lines changed: 62 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
704 | | - | |
| 704 | + | |
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
736 | 746 | | |
737 | 747 | | |
738 | 748 | | |
| |||
767 | 777 | | |
768 | 778 | | |
769 | 779 | | |
770 | | - | |
| 780 | + | |
771 | 781 | | |
772 | 782 | | |
773 | 783 | | |
| |||
841 | 851 | | |
842 | 852 | | |
843 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
844 | 874 | | |
845 | 875 | | |
846 | 876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
537 | 541 | | |
538 | | - | |
| 542 | + | |
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
| |||
567 | 571 | | |
568 | 572 | | |
569 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
570 | 583 | | |
571 | 584 | | |
572 | 585 | | |
| |||
587 | 600 | | |
588 | 601 | | |
589 | 602 | | |
590 | | - | |
| 603 | + | |
591 | 604 | | |
592 | 605 | | |
593 | 606 | | |
| |||
641 | 654 | | |
642 | 655 | | |
643 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
644 | 672 | | |
645 | 673 | | |
646 | 674 | | |
| |||
0 commit comments