-
-
Notifications
You must be signed in to change notification settings - Fork 938
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 false positives for at-charset and single quotes in string-quotes #2788 #2902
Changes from 4 commits
45993d0
fc067ff
aa5c639
4d7d050
28d46a6
6d89566
a8388ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,10 @@ testRule(rule, { | |
{ | ||
code: 'a { /* "horse" */ }', | ||
description: "ignores comment" | ||
}, | ||
{ | ||
code: '@charset "utf-8"', | ||
description: "ignore @charset rules" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add this same test to the "double quotes" test around line #119 as a safe guard of sorts please There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added below ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, though you added it to the SCSS tests at lines 160-163, which won't hurt either, can you add it after line 118 please :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoops. Yes added there. |
||
], | ||
|
||
|
@@ -67,6 +71,12 @@ testRule(rule, { | |
message: messages.expected("single"), | ||
line: 2, | ||
column: 19 | ||
}, | ||
{ | ||
code: '@import "base.css"', | ||
message: messages.expected("single"), | ||
line: 1, | ||
column: 9 | ||
} | ||
] | ||
}); | ||
|
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.
Let's move this line to below the quotes in comments code underneath this sentence
Update the verbiage to
Single quotes in a charset @-rule are ignored as using single quotes in this context is incorrect according the CSS specification.
Maybe see what adding a code example for this also looks like, it might look weird or add confusion 🤔