Open rastersysteme opened 7 years ago
i'm getting similar errors
Halp. This fails too:
@mixin ui-from ($bp)
@media only screen and (min-width: $bp + 1px)
@content
@mixin ui-to ($bp)
@media only screen and (max-width: $bp)
@content
Seems like this has been fixed in https://github.com/tonyganch/gonzales-pe/commit/da531859a579ee7a56265824221c6ee7075599cb (fixes https://github.com/tonyganch/gonzales-pe/issues/193).
The gonzales-pe
playground, running from the latest in the dev
branch (https://github.com/tonyganch/gonzales-pe/commit/ab24a90faf070bc7fa0ad28b3cc63849c4d3f6bc), produces the correct tree:
@mixin foo
@media screen
@content
@mixin other
color: red
whereas v3.4.7 (latest release) produces this error.
@rastersysteme Your example also seems to have been fixed in the dev
branch. I've successfully used sass-lint@1.10.2 with it and the error for the example above is gone.
I hope a new release of gonzales-pe is done soon! I've requested a new release =)
@rastersysteme @nl0 @jakiestfu I've forked gulp-sass-lint, sass-lint, and gonzales-pe to use the latest AST to fix this. I was unable to accomplish this via npm-shrinkwrap.json
in npm 4+ :(
npm install --save-dev git://github.com/henrahmagix/gulp-sass-lint.git#85608dacf2c259eceadf15102a6fb0377937f271
The v4 updated will be landing is Sass-lint soon. Sorry for the delays here but life has got in the way for many of us.
This was indeed an issue with Gonzales where it incorrectly nested at-rules and mixins etc in the Sass format.
Thanks!
@DanPurdy It seems with the update of gonzales-pe parser to 4.1.1 in 1.11 that this bug is fixed now. Can you confirm this?
@rastersysteme So the indentation error here seems to be working. Nevertheless I think there's a big in the empty-line-between-blocks rule that will affect this if you don't have spaces in between your class declarations. I'll look into this further hopefully tomorrow. The fix that rectifies the indentation though is already released for you to try.
What version of Sass Lint are you using? 1.10.2
Please include any relevant parts of your configuration
What did you do? Please include the actual source code causing the issue.
As you see I’m using the old Sass indented syntax here.
But it doesn’t matter if I write:
or
Both give me an error.
What did you expect to happen? The linting should pass without an error.
What actually happened? Please include any error messages given to you by Sass Lint. The linter throws an indentation error.
If you're using a IDE plugin have you tried the CLI too? Yes, both the CLI and Sublime Text 3 throw an error.