genoma / language-pug

A Pug (was Jade) syntax highlighting for Atom, derived from https://github.com/davidrios/jade-tmbundle
MIT License
26 stars 8 forks source link

linter-jshint for attempts to read pug files as full JavaScript, causing extremely annoying linting errors #17

Closed jrdbnntt closed 7 years ago

jrdbnntt commented 7 years ago

This is a problem that I did not have with language-jade before switching over.

If there is a unbuffered JavaScript inside of the pug file and it is edited, it seems to trigger linter-jshint to run the entire pug file. The only way to get the errors to go away is to reload the file. Editing code outside of the script section will not trigger this problem. Note: I am not talking about JS inside of a script block, but something like this:

- var someVar = "sds"
-
   var someOtherVar = "asdsa"

As specified in https://pugjs.org/language/code.html

Please fix this, it is really annoying. I would use language-jade but from what I understand there is no way to set it as a default loader in atom for the .pug file extension.

jrdbnntt commented 7 years ago

There is an issue for linter-jshint that seems to be related, but I believe the underlying problem is with language-pug. https://github.com/AtomLinter/linter-jshint/issues/359

craigmdennis commented 7 years ago

Also experiencing this issue