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

single-line-per-selector is seeing inline comments as selectors #789

Closed
IrrationalShadow opened this issue Jul 14, 2016 · 0 comments · Fixed by #817
Closed

single-line-per-selector is seeing inline comments as selectors #789

IrrationalShadow opened this issue Jul 14, 2016 · 0 comments · Fixed by #817
Labels

Comments

@IrrationalShadow
Copy link

What version of Sass Lint are you using?
gulp-sass-lint 1.2.0, which I believe is using sass-lint 1.8.0

Please include any relevant parts of your configuration:
single-line-per-selector is enabled.

What did you do? Please include the actual source code causing the issue.
I'm adding inline comments to the end of selectors/properties. See issue below:

button,
html input[type='button'], // 6
input[type='reset'],
input[type='submit'] {
    -webkit-appearance: button; // 7
    cursor: pointer; // 8
}

What did you expect to happen?
I expect the linter to run over this block of code and conclude that there is only one CSS selector per line (because there is).

What actually happened? Please include any error messages given to you by Sass Lint.
It's hating on one particular inline comment, this line:

html input[type='button'], // 6

Here's the error message:
42:27 warning Selectors must be placed on new lines single-line-per-selector

What I would like to see changed:
Comments, whether css comments /* */ or sass comments // shouldn't be noticed by the linter at all, or at the very least not in the way its currently believing that the comment is a second selector.

@DanPurdy DanPurdy added the bug label Jul 20, 2016
DanPurdy added a commit to DanPurdy/sass-lint that referenced this issue Aug 8, 2016
DanPurdy added a commit to DanPurdy/sass-lint that referenced this issue Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants