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

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

Closed
Bigdragon13th opened this issue Jun 26, 2017 · 2 comments
Labels
status: wip is being worked on by someone

Comments

@Bigdragon13th
Copy link

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
Copy link
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 no-extra-semicolons not error if followed by 2 or more lines of comment False negative for semicolons followed by two comments in no-extra-semicolons Jun 26, 2017
@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: bug labels Jun 26, 2017
@jeddy3 jeddy3 changed the title False negative for semicolons followed by two comments in no-extra-semicolons False negatives for semicolons followed by two comments in no-extra-semicolons Jul 14, 2017
@alexander-akait alexander-akait added status: wip is being worked on by someone and removed status: ready to implement is ready to be worked on by someone labels Aug 14, 2017
@ntwb
Copy link
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
Labels
status: wip is being worked on by someone
Development

No branches or pull requests

4 participants