Skip to content

fix: Don't check class names in require-baseline #93

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

Merged
merged 2 commits into from
Mar 19, 2025
Merged

fix: Don't check class names in require-baseline #93

merged 2 commits into from
Mar 19, 2025

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Mar 18, 2025

Prerequisites checklist

What is the purpose of this pull request?

Fixes incorrect flagging of highlight class name in require-basline

What changes did you make? (Give an overview)

  • Updated require-baseline to skip class, type, ID, and attribute selectors
  • Added test to verify the change

Related Issues

fixes #91

Is there anything you'd like reviewers to focus on?

Ping @rviscomi can you take a look at this to make sure I fixed it correctly?

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Mar 18, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Mar 18, 2025
@nzakas nzakas moved this from Needs Triage to Implementing in Triage Mar 18, 2025
Copy link
Contributor

@rviscomi rviscomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Another approach could be to target the PseudoClassSelector and PseudoElementSelector types specifically, as more of an allowlist approach. It'd be nice if there was a way to OR them together so you can easily reuse the same function handler, eg:

'PseudoClassSelector,PseudoElementSelector'(node) {}

@nzakas
Copy link
Member Author

nzakas commented Mar 18, 2025

@rviscomi good point, and that actually does work. :)

Copy link
Contributor

@rviscomi rviscomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! Ok great. I briefly tested it locally and gave up as soon as I saw test failures, but happy to see that it actually works.

@nzakas nzakas merged commit b8d6356 into main Mar 19, 2025
22 checks passed
@nzakas nzakas deleted the issue91 branch March 19, 2025 14:16
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Bug: leading dots in selectors being ignored in @supports blocks since last update
2 participants