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

False negatives for semicolons followed by two comments in no-extra-semicolons #2678

Closed
Bigdragon13th opened this Issue Jun 26, 2017 · 2 comments

Comments

4 participants
@Bigdragon13th

Bigdragon13th commented Jun 26, 2017

Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?

"no-extra-semicolons": true is not error if the issue code is followed by 2 or more lines of comment. It's error if only followed by 1 comment line or none.

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

no-extra-semicolons

What CSS is needed to reproduce this issue?

This code not throw error.

.foo {
	color: red;;
	//
	//
}

This one does.

.foo {
	color: red;;
	//
}

What stylelint configuration is needed to reproduce this issue?

{
  "rules": {
    "no-extra-semicolons": true
  }
}

Which version of stylelint are you using?

7.11.1

How are you running stylelint: CLI, PostCSS plugin, Node API?

I'm using it with gulp. CLI is having the same issue.

Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?

LESS files.

What did you expect to happen?

It should throw an error.

What actually happened (e.g. what warnings or errors you are getting)?

It's not.

@jeddy3

This comment has been minimized.

Member

jeddy3 commented Jun 26, 2017

@Bigdragon13th Thanks for creating the issue and for using the template.

I can reproduce this with standard syntax too.

The following will warn:

a {
  color: #FFF;;
  /* test */
}

Whereas the following will not:

a {
  color: #FFF;;
  /* test */
  /* test */
}

Labelling as a bug and help wanted. @Bigdragon13th Feel free to contribute a fix if you want to help out.

@jeddy3 jeddy3 changed the title from no-extra-semicolons not error if followed by 2 or more lines of comment to False negative for semicolons followed by two comments in no-extra-semicolons Jun 26, 2017

@jeddy3 jeddy3 changed the title from False negative for semicolons followed by two comments in no-extra-semicolons to False negatives for semicolons followed by two comments in no-extra-semicolons Jul 14, 2017

@ntwb

This comment has been minimized.

Member

ntwb commented Aug 15, 2017

Fixed via #2814

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