-
Notifications
You must be signed in to change notification settings - Fork 527
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
CLI: TypeError: Cannot read property 'type' of undefined #437
Comments
This looks like an error in our Could you post the version of sass-lint you're using and the command you were running. Also I imagine from the line numbers that you're using |
|
Ok great, Could you try disabling the final newline rule please and see if you still get an error? Could you also try linting against only one of your source files (specify the file with the CLI) and if if it produces the error, provide the last few lines of your source file. Thanks |
If I set
|
Would you be able to send us a sample of the offending code? |
@DanPurdy As in the |
No, if you could possibly narrow down on your |
The test body
background: pink |
And that alone causes all of the errors to happen? |
When directly running
|
There must be something else going on here.. The CLI is working as expected it seems but there's an issue with the rules. If these rules are working through Gulp then there must be some slight subtle difference happening. I notice you aren't specifying a target when using the CLI, if you don't then it automatically defaults to whatever is in your config file under the files include/exclude if you aren't specifying those and dont have Is there a chance it's actually another file causing your issue. Could you run the CLI specifically against this file explicitly to make sure as I can't recreate the issue at all at the moment..
|
Okay, running the following did indeed work:
So do I have to run with all the arguments specified, or do I just need to change the |
it's up to you, you can change it in your .sass-lint.yml file. if you don't specify a file or a glob pattern with the CLI it will fall back to the other methods. The order of preference being a file/glob pattern passed into the CLI, the result of the include/exclude files or glob patterns in your .sass-lint.yml and if you dont have one of those it will fall back to our included config file which will be a glob of As you say though if you change the include option in your config file and then run sass-lint from the directory that includes this config file you could just get away with running You can find some useful information to explain this a bit better than I just have in our docs It's also important to remember that if you do use glob patterns directly with the CLI you need to wrap them in quote or escape each e.g. Will close this issue but it still does mean there's an error in some our rules for sass. Will look into those though. Thanks! |
When running the
sass-lint
CLI on Node v5.0.0 (also tried v4.2.2), I get the following error:The text was updated successfully, but these errors were encountered: