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 end positions for at-rule-*-list #6032

Merged
merged 2 commits into from Apr 24, 2022
Merged

Conversation

mattxwang
Copy link
Member

@mattxwang mattxwang commented Apr 23, 2022

Which issue, if any, is this issue related to?

Part of the umbrella issue #5694.

Is there anything in the PR that needs further explanation?

I modelled my approach off of #6026 - though, I did note that for the rule in that PR (at-rule-no-unknown), the message includes the @, while for the rules in this PR, the message does not. I've still included the @ in the word itself; let me know if I should instead be consistent with the message.

(also not sure about the add/fix terminology for the PR title, feel free to change if needed)

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@mattxwang Thanks, LGTM 👍🏼

IMO, it's easier to understand if each rule message includes @, e.g.

- Unexpected at-rule "foo"
+ Unexpected at-rule "@foo"

lib/rules/at-rule-allowed-list/index.js Outdated Show resolved Hide resolved
uses `name` instead of `atRule.name`

Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
@@ -47,6 +47,7 @@ const rule = (primary) => {
node: atRule,
result,
ruleName,
word: `@${atRule.name}`,
Copy link
Member

Choose a reason for hiding this comment

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

Ah, this also can be simplified: 😅

Suggested change
word: `@${atRule.name}`,
word: `@${name}`,

@jeddy3 jeddy3 changed the title Fix end positions for at-rule-allowed-list, at-rule-disallowed-list Fix end positions for at-rule-*-list Apr 24, 2022
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@jeddy3 jeddy3 merged commit 2962bd7 into main Apr 24, 2022
@jeddy3 jeddy3 deleted the end-positions-at-rule-list branch April 24, 2022 13:44
@jeddy3
Copy link
Member

jeddy3 commented Apr 24, 2022

  • Fixed: at-rule-*-list end positions (#6032).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants