Closed Emrio closed 5 years ago
Looking at your installed packages, you don’t seem to have linter installed which is required for linter-js-standard to work. Do you get a prompt which asks you to install this dependency?
Oh, I deactivated it because I thought it was a standalone package I installed from when I was looking for a linting tool.
I have just reenabled linter; it prompted me a message telling me linter
and atom-ide-diagnostics
were conflicting because they both show linting errors, so I think this is why it still worked.
You’re right, I missed atom-ide-ui in the list. This could certainly contribute to the error, however, since Facebook retired the Atom IDE, I don’t think adding support for it is warranted.
You'll need to add a check that textEditor.getPath()
actually returned a path before this line:
https://github.com/ricardofbarros/linter-js-standard/blob/c672ab904fcb9b1a6ba6512a109a8138a64b3ffd/lib/linter-js-standard.js#L52
The linter
API currently requires a path in the messages to associate them with the editor, so although several linters can run on raw text with no actual file associated with it, you can't report the messages back.
_Back in Node.js v6 path.dirname was changed to require a value for the path to check, before that it would happily accept an undefined value._
Would linter call this specific linter if there’s no path? Looking at linter’s isPathIgnored()
, I was under the impression that it would always ignore “files” without a path.
It shouldn't, but it's a common problem in many providers that they get called on ones that don't return a path. I think it's an issue during session restores were part of the system thinks the editor has a path and another part doesn't? I haven't tracked down the issue myself, but it happens with both linter
and atom-ide-ui
.
I close this issue because a warning message didn't pop up again and it might have been thrown by atom-ide-ui
.
Thank you for the explanation, @Arcanemagus. I’ve now added a check in https://github.com/ricardofbarros/linter-js-standard/commit/7780e7cede7a277bbe3c886b51477bd022a86b9a.
Hello, I just got this weird warning from "Deprecation Cop" on Atom. I don't know how to replicate, and I don't know either why it poped :/ My Atom installation :
My (enabled) packages :
The error + stacktrace : Argument to
path.dirname
must be a string