1

Eslint says that eventbus is not defined. I agree with him, it's not imported. But I had defined it in main.js (the root of my app). The app works fine but I see the error all the time. Is there any way to make Eslint ignore it

I've tried to put // eslint-disable-next-line before every line where I use eventbus, but it is not very good, you know.

There are screenshots:

using the eventbus https://i.stack.imgur.com/eR7Fm.png

defining the eventbus https://i.stack.imgur.com/AS9jN.png

  • 1
    Possible duplicate of [Global variables in Javascript and ESLint](https://stackoverflow.com/questions/41552041/global-variables-in-javascript-and-eslint) – Sergeon Jan 23 '19 at 09:57
  • I think that other answer is all that you need. Good luck! – Sergeon Jan 23 '19 at 09:58
  • 1
    And the docs: https://eslint.org/docs/user-guide/configuring#specifying-globals – Bergur Jan 23 '19 at 09:58

0 Answers0