-
Notifications
You must be signed in to change notification settings - Fork 528
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
mixins-before-declarations Errors #230
Comments
I'm gonna label this is as a bug but I think it needs further discussion too. Is there any reason you are declaring variables in each block like that? There's not really any benefit to using them in that code. Technically a variable declaration is classed as a declaration and so should come after a mixin, now obviously in the case you have this wouldn't be practical. Is there a lot more going on that Is using those variables within that block? So my basic question to @bgriffith and @Snugug and anyone else with an opinion is should the above case flag as an error or not. |
No. Should only cause an error if it's a propert being set in my opinion. |
Variables defined within a block are useful as they are scoped to that block. I agree with @bgriffith: this should only be an error when a mixin appears before a property or a nested selector by default. Potentially in the future we could have a rule to define the expected order of: {variable declarations, extends, mixins, properties, nested selectors} (and anything else I've missed) to superseed and unify the mixins-before-declarations, extends-before-declarations and extends-before-mixins rules but that might end up being that little bit too complicated. |
Add check for declaration node content type Fixes sasstools#227 Fixes sasstools#230
Hello,
When i used you sass lint, i found this error which i found little bit confused, normally it's shouldn't cause this error.
Could you please explain to me the problem ?
Thanks
The text was updated successfully, but these errors were encountered: