sass-lint: Errors on files with tabs
I get this error when running the tool:
C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:51
'line': node.content[i + 1].start.line,
^
TypeError: Cannot read property 'start' of undefined
at processNode (C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:51:46)
at processNode (C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:76:9)
at processNode (C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:76:9)
at processNode (C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:76:9)
at processNode (C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:76:9)
at Object.module.exports.detect (C:\www\mysite\node_modules\sass-lint\lib\rules\indentation.js:80:5)
at C:\www\mysite\node_modules\sass-lint\index.js:30:25
at Array.forEach (native)
at Function.sassLint.lintText (C:\www\mysite\node_modules\sass-lint\index.js:29:9)
at C:\www\mysite\node_modules\sass-lint\index.js:73:21
I have narrowed it down to a file that has tabs in it, if I replace the tabs with spaces (which I want to do anyway) there is no error.
sass-lint version: 1.1.0 OS: windows 10
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 37 (15 by maintainers)
Commits related to this issue
- Add example. Currently failing due to https://github.com/sasstools/sass-lint/issues/62 — committed to alleyinteractive/sasslint-loader by deleted user 9 years ago
- Installing Grunt for compiling Sass. Based on my Blank Slate project. https://github.com/trey/blank Converting all existing *.scss to use spaces instead of tabs because of this issue. https://github... — committed to trey/artisanalvarmint by trey 9 years ago
@jjalonso @chielkunkels @zenatreat @davidgilbertson @wouterkroes @kimblim I believe the error that was being thrown was ‘fixed’ previously but with the release of sass-lint 1.6.0 we have tested all of your examples above and each of them is parsing correctly. Tabs on both LF and CRLF and spaces on LF and CRLF are all working. We recently fixed the CRLF issue ourselves in a temporary fork of the AST so if we find any extra issues there we can hopefully look to fix them.
As a warning though, the indentation rule itself may still be throwing some inconsistent lint warnings but we’ll be looking to improve that now that 1.6.0 is FINALLY out of the door! If you spot any further issues here please let us know.
Thanks for your patience!