Gobliins Gobliins - 5 months ago 66
Javascript Question

Atom linter / es-lint disable some warnings

I am writing some tests with wdio and mocha framework and my linter packages https://atom.io/packages/linter and https://atom.io/packages/linter-eslint display some problems (see comments):

describe('[On Board]', () => { //describe is not defined
before(() => { // before is not defined
browser.waitUntil() //browser is not defined

The undefined stuff will be taken care of the wdio / mocha Testrunner, so i would like to tell my linter / es-lint packages to ignore this problem.

Is this possible?

Answer Source

There are two options:

  1. Either to include the namespace where describe and other variables are defined.
  2. Or you can update .jshintrc to make linter aware that you are using mocha framework and ignore the errors. Link that can be helpful: LINK
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download