Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ module.exports =
text = textEditor.getText()
parameters = ['--format=json', '-']
exec = path.join(__dirname, '..', 'node_modules', 'atomlinter-csslint', 'cli.js')
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) ->
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Member

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 😛.

lintResult = JSON.parse(output)
toReturn = []
if lintResult.messages.length < 1
Expand Down