-
-
Notifications
You must be signed in to change notification settings - Fork 401
feat(attr-sort): sort unknown attributes alphabetically #668
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
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.
That's a pretty good addition! Thanks @chrisguttandin!
This comment was marked as outdated.
This comment was marked as outdated.
Heya @chrisguttandin - can you please resolve the conflicts so we can get this one merged? Thanks! |
68423d7
to
1dc1b87
Compare
Hi @coliff, I've rebased the branch on top of the current master. |
@coliff Is there anything I can do about the failing CI tasks? |
Sorry for the delay - I think we need @thedaviddias for assistance on this. |
Hi @coliff, should I maybe close this PR and create a new one with the same changes on top of the latest master? |
hey @chrisguttandin - sorry for the trouble. We appreciate the PR and your patience with this - I know you opened this a long while back! :-) Yes, I think closing it and making a new PR could be a good idea. I'll be sure to review it as soon as you do. I'm hoping we'll be able to get a new release of HTMLHint out soon. thanks again! |
489e364
to
84b2ca9
Compare
Okay, I rebased the branch on top of master. Could you please take a look, @coliff? |
27489b7
to
ae2f614
Compare
I think if you run |
Previously unknown attributes were just ignored. Now they get sorted alphabetically. BREAKING CHANGE: HTMLHint will now throw an error if unkown attributes are not sorted. fix htmlhint#661
ae2f614
to
ded3d9a
Compare
Okay, I just did that. |
thanks @chrisguttandin - nearly there! There's a test failure though.....
|
I used GitHub Copilot to help find the issue and fix... > The error occurs because the test is using .to.be() and .to.contain() methods, which are not part of the Jest assertion library. These methods are typically used in Chai, another assertion library. In Jest, the equivalent methods are .toBe() and .toContain().
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #668 +/- ##
=======================================
Coverage 98.46% 98.46%
=======================================
Files 2 2
Lines 1627 1627
Branches 340 342 +2
=======================================
Hits 1602 1602
Misses 25 25
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Thanks @coliff, for taking care of the failing tests. I scratched my head wondering why I created these failing tests in the first place. It turns out I created the PR before the switch to Jest. :-) I'm happy that it's finally merged. Thanks a lot. |
Previously unknown attributes were just ignored. Now they get sorted alphabetically.
BREAKING CHANGE: HTMLHint will now throw an error if unkown attributes are not sorted.
fix #661
Short description of what this resolves:
This PR will make sure all attributes get sorted when using the attr-sorted rule. It will ensure that attributes linted with this rule will always get sorted the same way.
Please let me know if there is anything that should be changed to make this PR mergable.