Skip to content

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

Merged
nzakas merged 2 commits into
mainfrom
issue91
Mar 19, 2025
Merged

fix: Don't check class names in require-baseline#93
nzakas merged 2 commits into
mainfrom
issue91

Conversation

@nzakas

@nzakas nzakas commented Mar 18, 2025

Copy link
Copy Markdown
Member

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

@rviscomi rviscomi left a comment

Copy link
Copy Markdown
Contributor

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

nzakas commented Mar 18, 2025

Copy link
Copy Markdown
Member Author

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

@rviscomi rviscomi left a comment

Copy link
Copy Markdown
Contributor

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
@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