eslint ignores files included via `importScripts`

47 Views Asked by At

I'm working on webextension and have service_worker.js with the following code:

importScripts("debug.js")
debug.log("blah");

The debug.js contains:

const debug = console.bind(console);

eslint gives error:

'debug' is not defined. eslint(no-undef)`

Pointing at the second line of service_worker.js

In .eslintrc.json I have this:

  "env": {
      "es6": true,
      "serviceworker": true,
      "webextensions": true
  },

So it understands that it's a service worker and what importScripts() is, but it ignores data from included files... Any ideas how to fix this issue?

0

There are 0 best solutions below