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

Space after colon error #468

Closed
mi2oon opened this issue Jan 6, 2016 · 4 comments
Closed

Space after colon error #468

mi2oon opened this issue Jan 6, 2016 · 4 comments

Comments

@mi2oon
Copy link
Contributor

mi2oon commented Jan 6, 2016

Hi there,

I get the following error in with my sass lint. I am using gulp-sass-lint which hasn't updated the sass-lint package with all the latest fixes. However, I tried with the latest release and had the same problem.

node_modules\gulp-sass-lint\node_modules\sass-lint\lib\rules\space-after-colon.js:17
        if (next.is('space')) {
                ^
TypeError: Cannot read property 'is' of undefined 

This sort of is similar to the following error. #89. Anyway, let me know if you need more info. :)

@DanPurdy
Copy link
Member

DanPurdy commented Jan 6, 2016

Hi @mi2oon thanks for the report, would you mind narrowing down and posting a sample of the code that this fails on and also let us know whether this is with .sass or .scss.

Thanks

@mi2oon
Copy link
Contributor Author

mi2oon commented Jan 6, 2016

@DanPurdy Sure :)

The code is quite simple. It's actually a mistype. Lets say we have the code below.

.fail{ color: red: }

Notice that instead of semi colon at the end there is a colon which clearly is wrong. However, instead of giving an error it just breaks my watch process. The file type is .scss. I can make the a PR fixing it just like in #89, like so.

if (next.is('space')) ----->  if (next && next.is('space')) 

@DanPurdy
Copy link
Member

DanPurdy commented Jan 6, 2016

Yeah, guessing theres a few others like this that we've not caught yet.

A PR would be appreciated if you want to.

Thanks!

@mi2oon
Copy link
Contributor Author

mi2oon commented Jan 6, 2016

@DanPurdy hehe.. no problem. PR has been made ;)

@mi2oon mi2oon changed the title Space after colon error… Space after colon error Jan 6, 2016
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

2 participants