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

Parent slectors #295

Closed
isGabe opened this issue Oct 12, 2015 · 14 comments
Closed

Parent slectors #295

isGabe opened this issue Oct 12, 2015 · 14 comments

Comments

@isGabe
Copy link

isGabe commented Oct 12, 2015

sass-lint v1.0.0

For the following .scss file (test file with just this in it):

.thing {
    color: red;
    &.other-thing {
        color: blue;
    }
}

I get this error:

Warning: Parsing error at assets/css/scss/test.scss: Please check validity of the block starting from line #3 Use --force to continue.

This happens anywhere a & parent selector is used, and it appears to be a problem with Gonzales PE: tonyganch/gonzales-pe#96

@DanPurdy
Copy link
Member

That's an issue in gonzales-pe 3.0.0 beta which we haven't upgraded to yet, we've left sass-lint on a previous version of gonzales which doesn't have that issue.

The block you posted is parsing fine when I test it see my screenshot below. Is there any reason why you're using sass-lint v1.0.0 rather than the latest v1.2.3?

There must be something else wrong with your file. Is the file using tabs?

screen shot 2015-10-12 at 23 13 25

@isGabe
Copy link
Author

isGabe commented Oct 13, 2015

Is there any reason why you're using sass-lint v1.0.0 rather than the latest v1.2.3?

I guess 1.0.0 is what I got when I installed grunt-sass-lint:
screenshot 2015-10-13 08 47 40

Is the file using tabs?

Yes.

@isGabe
Copy link
Author

isGabe commented Oct 13, 2015

we've left sass-lint on a previous version of gonzales which doesn't have that issue.

I looks like gonzales-pe is set to 3.0.0-31 in current releases?

1.2.0:

"gonzales-pe": "^3.0.0-31",

1.1.0:

"gonzales-pe": "^3.0.0-31",

@DanPurdy
Copy link
Member

Strangely enough 3.0.0-31 is earlier than 3.0.0-beta so we aren't quite there yet and it is an earlier version, trust me, we've been testing it a lot!

Also I think you need to update your grunt-sass-lint plugin It's definitely using old dependencies. The latest version of grunt-sass-lint will install the latest version of sass-lint starting at 1.2.0 see here

@DanPurdy
Copy link
Member

Also we just released 1.3.0 so if you reinstall or update your dependencies for grunt-sass-lint you should get the latest and greatest.

@isGabe
Copy link
Author

isGabe commented Oct 13, 2015

It's weird, I've tried uninstalling/reinstalling grunt-sass-lint (npm uninstall grunt-sass-lint --save-dev , npm install grunt-sass-lint --save-dev), but I always get grunt-sass-lint 0.1.0-beta.3 with sass-lint 1.0.0 as a dependency.

screenshot 2015-10-13 10 21 09

@isGabe
Copy link
Author

isGabe commented Oct 13, 2015

I just tried npm install grunt-sass-lint in a bare directory to make sure, and same thing happened.

@DanPurdy
Copy link
Member

Yeah, you're right, it looks like even though the grunt package was updated it hasn't been published to NPM or something... I'll file this as an issue over there.

@DanPurdy
Copy link
Member

in the mean time if you manually edit the package.json within grunt-sass-lint to 1.3.0 and updates it's modules manually.. And also files that use tabs rather than spaces currently don't work correctly so that will be your main issue.. We're just waiting for gonzales to update properly and fix all of it's bugs.

see here #62
not much we can do I'm afraid until Gonzales is stable.

@isGabe
Copy link
Author

isGabe commented Oct 13, 2015

in the mean time if you manually edit the package.json within grunt-sass-lint to 1.3.0 and updates it's modules manually

That was my next thought, force it into submission. I did that and ran npm update within the grunt-sass-lint directory and scss-lint finally got updated properly

files that use tabs rather than spaces currently don't work correctly

Heresy! 😉

I changed the test file to spaces and it all looks to be working OK now. The project I wanted to try this on uses tabs though, so we'll just have to stick with scss-lint for the time being. It's our only remaining Ruby dependency, so I'm looking forward to sass-lint.

Thanks for the help!

@DanPurdy
Copy link
Member

I know ha! It's not our fault! ;) as soon as the AST is stable and released we'll be looking to update and get all that tabby goodness out!

Yeah removing the last remaining ruby dependency was the motivation for me to work on this too!

@DanPurdy
Copy link
Member

@fStop grunt-sass-lint has been updated on npm now so if you do choose to move over it should pull in the latest 1.* version now.

I'll close this issue if you don't mind as it's tab related, hopefully you'll be using sass-lint soon!

@isGabe
Copy link
Author

isGabe commented Oct 13, 2015

Nice! Thanks for the update.

@tonyganch
Copy link
Contributor

@DanPurdy, hi! Could you please-please test the latest gonzales with tabs? I added tab support a day ago and though a few tests are green, I would love someone to try it with real examples.

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