-
Notifications
You must be signed in to change notification settings - Fork 171
Problem with linting indentation between v0.11.0 and v0.12.1 #504
Comments
+1 The Grunt and Gulp plugins must be specifying the dev dependency with auto upgrade. |
Hi, sorry about that. Can you paste the actual code where those errors are being generated? Or have a minimum use case that shows the problem? |
+1 For me, this error appears often around multiline strings. Here is one example
The last line .length gives a lint error that the indentation is wrong. It acts as though the indentation level is tracked through that multiline string, and it expects the chained function call to be at the same level. You can change the number of spaces preceeding the line ".looksLikeAFunc" and the error will give an different value for the incorrect indentation amount. It only gives an error if this number is odd. |
Hi @swang. Thanks for looking into this. Here is a code-fragment which you can test against. I only encounter such errors for empty catch blocks. For example, the following code gives the error Line contains inconsistent indentation Expected 2 got -4 This error goes away once I uncomment console.error
|
@akshat1 I cannot reproduce the error you are seeing. Please make sure you are updated to the latest version of coffeelint and try running it again. If you continue to see errors, please open up a new issue. |
@swang I get this with the latest version of coffeelint (1.12.1). I checkout out the source, and the changes from your PR but the error still occurs. I'll go ahead and log another bug as you advised. Thanks! |
I'm building a commercial app in coffee (using gulp, and gulp-coffeelint plugin) and during this week I've noticed that some linting problems occurred with indentation, which cause problem of building a whole project. I wish to emphasize that those lines are mark as wrong isn't changed since ;)
I mean time I've figured out that that is not a problem of gulp plugin (gulp-coffeelint) due to the fact that its version isn't changed only its dependency (version of coffeelint)
To temporary solve this problem I need to add
peerDependency
section to mypackage.json
file like this presented below:Below I paste few lines of error log section from gulp for further maintenance. The strange thing is that the indentation is negative with enormous numbers like -28,-39,-44, ...
Hope it helps.
The text was updated successfully, but these errors were encountered: