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 at-rule pattern warnings to range only one line #639

Merged
merged 2 commits into from Jul 20, 2022
Merged

Fix at-rule pattern warnings to range only one line #639

merged 2 commits into from Jul 20, 2022

Conversation

nlydv
Copy link
Contributor

@nlydv nlydv commented Jul 19, 2022

Hi, first contrib here.

I noticed the at-function-pattern and at-mixin-pattern rules spit out warnings with a range over the entire at-rule block as the "problem area", which of course doesn't make sense when it's just the name that's the issue.

Not at all familiar with the codebase and I just wanted to slap a quick fix on it if I could, best I was able to do was limiting it to one line only.

Before:
before

After:
after

@kristerkari
Copy link
Collaborator

@nlydv Thanks a lot! Could you please also update the unit tests to verify that the change is working?

I think that you should be able to assert the endLine and endColumn like here for example:
https://github.com/stylelint/stylelint/blob/dab8df2b3bf58e545f683a0f49d821abc089cde3/lib/rules/comment-word-disallowed-list/__tests__/index.js#L22-L25

@nlydv
Copy link
Contributor Author

nlydv commented Jul 19, 2022

Done!

@kristerkari
Copy link
Collaborator

@nlydv Thanks! Great job!

@kristerkari kristerkari merged commit f045f74 into stylelint-scss:master Jul 20, 2022
@nlydv nlydv deleted the at-pattern-end branch July 20, 2022 15:49
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

2 participants