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

Empty lines and missing issue description #222

Closed
alansouzati opened this issue Sep 25, 2015 · 8 comments
Closed

Empty lines and missing issue description #222

alansouzati opened this issue Sep 25, 2015 · 8 comments

Comments

@alansouzati
Copy link
Contributor

Hey guys,

Awesome job here, node-only Sass linting is something I've been looking for months. Glad you guys are putting effort on this.

I've tried to integrate this tool inside Grommet and I'm facing some challenges. It seems there is something I'm doing wrong, but I can't seem to find what. There is a bunch of empty lines created by the sass linter and a message Please check validity of the block starting from line #5.

[09:58:24] Starting 'scsslint'...






















/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/sass-lint/lib/groot.js:21
    throw new Error('Parsing error' + fileInfo + ': ' + e.message);
          ^
Error: Parsing error at src/scss/grommet-core/_objects.color-index.scss: Please check validity of the block starting from line #5
    at module.exports (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/sass-lint/lib/groot.js:21:11)
    at Function.sassLint.lintText (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/sass-lint/index.js:36:13)
    at DestroyableTransform._transform (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/index.js:32:27)
    at DestroyableTransform.Transform._read (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:10)
    at DestroyableTransform.Transform._write (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:160:12)
    at doWrite (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:326:12)
    at writeOrBuffer (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:312:5)
    at DestroyableTransform.Writable.write (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp-sass-lint/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:239:11)
    at write (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/Users/alansouza/grommet-workspace/grommet/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)

Here is the content for this given file:

@for $i from 1 through length($brand-neutral-colors) {

  .background-color-index-neutral-#{$i},
  .background-color-index-neutral-#{$i + length($brand-neutral-colors)} {
    background-color: nth($brand-neutral-colors, $i);
  }

  .background-color-index-neutral-#{$i}-a,
  .background-color-index-neutral-#{$i + length($brand-neutral-colors)}-a {
    background-color: rgba(nth($brand-neutral-colors, $i), 0.8);
  }
}

I've faced this issue elsewhere, is that related to the for loop? Any recommendation on how to fix that?

@DanPurdy
Copy link
Member

Hey @alansouzati I'm afraid it's a parsing error/problem with the AST we are using, it looks to be fixed in the latest dev branch but we are just waiting for a release now, but it's definitely coming. Looks like around a week or so now 😄

see here tonyganch/gonzales-pe#94
and here tonyganch/gonzales-pe#68
related to this #44

The lines causing you issue are

#{$i + length($brand-neutral-colors)} and #{$i + length($brand-neutral-colors)}-a

Thanks for the report though, we'll get there soon enough and all of your wildest node only linting dreams will be realised! 😄

@alansouzati
Copy link
Contributor Author

Cool, looking forward to the release!

On Fri, Sep 25, 2015 at 2:05 PM, Dan Purdy notifications@github.com wrote:

Hey @alansouzati https://github.com/alansouzati I'm afraid it's a
parsing error/problem with the AST we are using, it looks to be fixed in
the latest dev branch but we are just waiting for a release now, but it's
definitely coming. Looks like under a week or now [image: 😄]

see here tonyganch/gonzales-pe#94
tonyganch/gonzales-pe#94
and here tonyganch/gonzales-pe#68
tonyganch/gonzales-pe#68
related to this #44 #44

The lines causing you issue are

#{$i + length($brand-neutral-colors)} and #{$i +
length($brand-neutral-colors)}-a


Reply to this email directly or view it on GitHub
#222 (comment)
.

Alan Souza
Software Engineer
Contact: +1 (408) 421 - 6341

@DanPurdy
Copy link
Member

This is unfortunately still causing a parse issue in the latest build of gonzales-pe (3.2.1) I've filed an issue here

@DanPurdy
Copy link
Member

DanPurdy commented Apr 22, 2016

@alansouzati this is fixed / no longer causing a parse error in sass-lint 1.6.0

@alansouzati
Copy link
Contributor Author

This is great news, just in time! I'm soon going to re-evaluate the use of sass-lint for Grommet :)

We are looking forward to removing the ruby dependency and be a 100% node-only project.

I will keep you posted @DanPurdy, and thanks for the follow up

@DanPurdy
Copy link
Member

If you have any issues just let us know, we're trying to iron out as many of the edge cases as we can while also getting some fixes into the parser.

@alansouzati
Copy link
Contributor Author

Thanks a lot @DanPurdy the latest version of grommet-toolbox now uses sass-lint. I'm proud to say that now we are a node-only project.

@DanPurdy
Copy link
Member

@alansouzati Awesome! 🎉

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

No branches or pull requests

3 participants