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 selector-pseudo-class-no-unknown
false positive for :modal
#6811
Conversation
🦋 Changeset detectedLatest commit: 3e601d8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Hi @Yasir761, thanks for submitting a change! Two quick asks:
- could you add a test case that validates your fix?
- could you add a changeset using
npx changeset
?
(I've renamed the PR to match our stylistic rules; you can use the title for the changeset; just change the tense)
selector-pseudo-class-no-unknown
false positive for :modal
off course I'll add these, can you tell me where I should add test case? |
@Yasir761 each rule has a |
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.
Thanks for submitting some changes @Yasir761; I've added some comments, could you take a look at them and let me know what you think!
(as a suggestion: make sure that npm test
passes locally!)
.changeset/many-mugs-camp.md
Outdated
"stylelint": minor | ||
--- | ||
|
||
Fixed selector-pseudo-class-no-unknown false positive for :modal |
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.
Changeset nit:
Fixed selector-pseudo-class-no-unknown false positive for :modal | |
Fixed: `selector-pseudo-class-no-unknown` false positive for `:modal` |
{ | ||
code: 'a:modal { }', | ||
message: messages.rejected(':modal'), | ||
line: 1, | ||
column: 2, | ||
endLine: 1, | ||
endColumn: 10, | ||
}, |
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.
Hm, it's unclear to me why this test case is here; we don't want to reject :modal
since it is a known pseudo-class. Could you remove this test case?
{ | |
code: 'a:modal { }', | |
message: messages.rejected(':modal'), | |
line: 1, | |
column: 2, | |
endLine: 1, | |
endColumn: 10, | |
}, |
@@ -28,6 +28,9 @@ testRule({ | |||
{ | |||
code: 'a::before { }', | |||
}, | |||
{ | |||
code: 'a:modal { }', |
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.
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.
Thanks - LGTM!
Closes #6809.
e.g. "No, it's self-explanatory."