dm295 dm295 - 19 days ago 12
Javascript Question

JSHint with Atom editor - ignore warnings

I am using the

linter-jshint
plugin for
Atom
editor.

I want to disable showing a couple of specific errors/warnings. For example:
W003 - 'functionName' was used before it was defined.
.

Is it possible to specify an array of ignored errors/warnings somewhere in Atom's
config.cson
?


Basically I am asking if it's possible to do the same thing like in
PyDev
(
Eclipse
), where you can specify a list of errors/warnings to be ignored by
pep8
.

NOTE: I read the
linter-jshint
documentation but still don't know how to do this.

Answer

It can be done with .jshintrc.

You need to prefix the warning code with -, e.g. -W003, and use true/false to turn it off/on.

At the very bottom of my .jshintrc:

  ...

  // Ignored Warnings
  "-W003": true
}

Source: https://gist.github.com/amatiasq/db597053f0f891ff7abc