Closed localjo closed 8 years ago
Do you use the lintspaces "core"-api directly or in a grunt or gulp plugin?
Can you checkout the master of node-lintspaces and run the tests using grunt test
because there are tests for newline feature and tests for editorconfig feature which currently didn't fail.
I'm using gulp-lintspaces, which uses node-lintspaces directly to parse and apply the linting settings. I'll dig into the code and see if I can pinpoint where the problem is originating.
It may belongs to your configuration in the .editorconfig
root = true
and the file isn't in your root directory / higher than the editorconfig?[*.ext]
file extension which doesn't match your linted file?Turns out the issue was that my editor appends an implicit newline to the end of all of my files, so when I was saving them with a manual newline, they ended up having two newlines. EPEBKAC!
In an
.editorconfig
file wheninsert_final_newline = true
, it means that files should end with a blank new line. The lintspaces implementation works in reverse. When I setinsert_final_newline = true
in my.editorconfig
file, lintspaces complains about all of my files ending with newlines, but that's actually what I want, and I'd like to be able to get an error/warning if a file is missing that newline. From the EditorConfig docs;