Sublime Forum

Document.write error

#1

Hello, I have Sublime text 3 build 3143, i installed node.js and the pluggins JShint, Sublimetext-linter and Sublimetexlinter-JShint, but I see that it marks the instruction document.write as a syntax error, what it does not do when I write Document.write with D upper.
I hope assistance on this topic.

0 Likes

#2

You should check linetr’s settings,
it may expect you to declare globals and, maybe, also use “use strict” statement at the beginning of the script.
The fact it doesn’t throw waring/error when you write “Document” instead of “document” is because the reserved word for document is actually lowercase so it’ll be parsed as a custom class…

hope it helps :slight_smile:

0 Likes