A
A
Alex2015-12-09 11:57:57
JavaScript
Alex, 2015-12-09 11:57:57

How to use JSHint in strict mode?

I use Atom editor and plugins: linter and linter-jshint .
When I enable strict mode, I get a lot of warnings about missing variables. The problem is that many of these variables are defined either in another file or in the browser itself.
9d30d4c2c0ab4f73915f1c23a1895608.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-12-09
@Kozack

The problem is that many of these variables are defined either in another file or in the browser itself.

The console object is not available in every browser.
For everything else, try: https://discuss.atom.io/t/feature-request-global-v...
Or specify in a comment like this:/* globals <varname> */

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question