Skip to content
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

fix(lint): fix single char selectors being ignored #27576

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

marvinhagemeister
Copy link
Contributor

The selector splitting code that's used for JS linting plugins didn't properly account for selectors being a single character. This can happen in the case of *.

Instead of comparing against the length, we'll now check if the remaining string portion is not empty, which is more robust. It also allows us to detect trailing whitespace, which we didn't before.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM

@marvinhagemeister marvinhagemeister merged commit cabdfa8 into main Jan 7, 2025
17 checks passed
@marvinhagemeister marvinhagemeister deleted the lint-selector-char branch January 7, 2025 23:21
dsherret pushed a commit that referenced this pull request Jan 9, 2025
The selector splitting code that's used for JS linting plugins didn't
properly account for selectors being a single character. This can happen
in the case of `*`.

Instead of comparing against the length, we'll now check if the
remaining string portion is not empty, which is more robust. It also
allows us to detect trailing whitespace, which we didn't before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants