-
Notifications
You must be signed in to change notification settings - Fork 8
Exec csslint from project root to pick up project .csslintrc #79
Exec csslint from project root to pick up project .csslintrc #79
Conversation
Needs to handle files not in a project and then it should be good 😉. |
cwd = path.dirname(textEditor.getPath()) | ||
helpers.execNode(exec, parameters, {stdin: text, cwd: cwd}).then (output) -> | ||
paths = atom.project.relativizePath(filePath) | ||
helpers.execNode(exec, parameters, {stdin: text, cwd: paths.projectPath}).then (output) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about Path.dirname(filePath)
, that way the file won't need to be in a project and csslint will also find it's config because presumably like every other linter it keeps searching for config until drive root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, just read the issue comments, csslint is weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird and broken in so many ways, but people still use it even though there are better alternatives out there 😛.
I don't know much about Atom (and even less about its internals) - I guess in the case of no project it should exec in the cwd of the file? Also, how do I run the tests in this project? |
If there is no project I would just keep the current behavior of running in the directory of the file. |
ok - cool, thanks - latest commit on this branch falls back to existing behavior. |
Looks like you indented the line too far 😛. |
Whoops, looks like it didn't notify me of your updated commit, merging and pushing out a release now, thanks again! |
Exec csslint from project root to pick up project .csslintrc
Thanks @clamey |
Published in v1.3.0. |
Sorry! Didn't know the process - thanks!
|
Not your fault, I should have been watching for the commit 😉. |
This is an attempt to fix #73