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

Make scss/comment-no-empty treat multiline double-slash comments as blocks #607

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dbjorge
Copy link

@dbjorge dbjorge commented May 16, 2022

Proposed fix for #606

I've never contributed to a stylelint rule before, so apologies if I've made any structural mistakes here. In particular, I felt a bit uncertain about adding state that persists between different calls to the walkComments callback, since I didn't see other examples of rules doing that, but it seemed like the most straightforward way to solve the problem.

The logic for determining whether a given comment is double-slash vs not and standalone vs not is taken from the examples on L44-51 of src/rules/double-slash-comment-empty-line-before/index.js.

@kristerkari
Copy link
Collaborator

Thanks @dbjorge ! I'll try to get this review as soon as possible.

@AlexWayfer
Copy link

Faced such problem.

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

Successfully merging this pull request may close these issues.

None yet

4 participants