fix: crash in no-important on non-standard important values - #541
Conversation
|
Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update. |
|
Can you please rebase on main as there was a |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe ChangesNo-important rule handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The rule now ignores non-standard priority annotations while continuing to report actual !important declarations, preventing the prior crash without introducing an identified merge risk. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Prerequisites checklist
AI acknowledgment
What did you do?
What did you expect to happen?
No error.
!ieis a non-standard hack, not an!importantflag.What actually happened?
What is the purpose of this pull request?
This PR fixes the crash above.
importantholds the raw identifier for hacks like!ie, which is truthy, so the rule went on to locate the flag in the source text, found no match, and dereferencednull.What changes did you make? (Give an overview)
Narrowed the check to
important === true, so only real!importantflags are reported.Depends on eslint/csstree#152, which makes
!IMPORTANTparse astrue.Related Issues
Is there anything you'd like reviewers to focus on?
Summary by CodeRabbit
Bug Fixes
Tests
!ie,!IE7, and!important\9annotations.