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

semicolons "always" reports on line without property #124

Closed
olegskl opened this issue Jul 6, 2015 · 13 comments
Closed

semicolons "always" reports on line without property #124

olegskl opened this issue Jul 6, 2015 · 13 comments
Labels

Comments

@olegskl
Copy link

olegskl commented Jul 6, 2015

Using Stylint version: 1.0.4.

Given:

{
  "brackets": "always",
  "colons": "always",
  "indentPref": 2,
  "semicolons": "always"
}

And:

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

Stylint reports:

Warning: missing colon between property and value
File: /Users/olegsklyanchuk/repos/test-gulp/app/bundles/logged-site/logged-site.styl
Line: 3: color: red;

Warning: missing colon between property and value
File: /Users/olegsklyanchuk/repos/test-gulp/app/bundles/logged-site/logged-site.styl
Line: 4: }

Warning: missing semicolon
File: /Users/olegsklyanchuk/repos/test-gulp/app/bundles/logged-site/logged-site.styl
Line: 4: }

@rossPatton
Copy link
Collaborator

Hmm, if you update to 1.0.5 what happens? I was dealing with a similar issue yesterday so with any luck it'll be cleared up.

@olegskl
Copy link
Author

olegskl commented Jul 6, 2015

Alright, the "Warning: missing semicolon" error is gone in 1.0.5. The other two remain however.

@rossPatton
Copy link
Collaborator

Cool, thanks. Will look at it tonight.

@rossPatton rossPatton added the bug label Jul 6, 2015
@rossPatton
Copy link
Collaborator

Alright, I just published 1.0.6 specifically to fix this. Lemme know if that works.

@olegskl
Copy link
Author

olegskl commented Jul 7, 2015

Seems to be working in 1.0.6. Thanks!

@rossPatton
Copy link
Collaborator

awesome, closing!

@olegskl
Copy link
Author

olegskl commented Jul 7, 2015

Ouch, actually this fails once again when there's a dot in a value, e.g.

.a {
  .b {
    font-size: 1.1em;
  }
}

Warning: missing semicolon
File: app/bundles/logged-site/logged-site.styl
Line: 4: }

Removing the dot, for example font-size: 11em; produces no error.

@rossPatton
Copy link
Collaborator

try again with 1.0.8, lemme know if you still have the problem

@Alxblsk
Copy link

Alxblsk commented Jul 14, 2015

I still see the similar issue in some cases with semicolon.

Code:
.test-css { input, select, textarea { border: 1px solid red; } }

Errors:

Error: missing semicolon
File: src/theme/inputs.styl
Line: 2: input,

Error: missing semicolon
File: src/theme/inputs.styl
Line: 3: select,

Code:
@media only screen and (max-width: 1024px) { .page > div.test1 { flex-grow: 2; flex-basis: 45%; } }

Error:

Error: missing semicolon
File: src/theme/slots.styl
Line: 2: .page > div.test1 {

@Alxblsk
Copy link

Alxblsk commented Jul 14, 2015

The same with @keyframes

Code:

.welcome-test {
.test:hover {
animation: spinAround 2s linear infinite;
}
@keyframes spinAround {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
}

Errors:

Error: missing semicolon
File: src/edm/interlock/welcome-interlock/theme/nextgen/welcome-interlock.styl
Line: 2: .test:hover {

Error: missing semicolon
File: src/edm/interlock/welcome-interlock/theme/nextgen/welcome-interlock.styl
Line: 12: }

Could you take a look?

@lellimecnar
Copy link
Contributor

I'm getting a lot of false positives when using parent selectors with multiple selectors, each on their own line, and using interpolation within multi-line selectors. Using version 1.2.2.

For example:

&,
&:hover,
&.hover,
{$varname},
&.{$className},
...

Each of those examples is giving me a "missing semicolon" error.

Mine is a "selector" issue rather than a "property" issue, so I'm not sure if this belongs here, but it's definitely related. Let me know if I need to open a separate issue.

@rossPatton
Copy link
Collaborator

@Alxblsk Hey, sorry about that, must have missed your comment 2 weeks ago.

@lellimecnar I will re-open this and take another look

@rossPatton rossPatton reopened this Aug 31, 2015
@lellimecnar
Copy link
Contributor

#193

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

No branches or pull requests

4 participants