1

I have a class that I am using as my video player. On my main page, I have a script tag to include Amazon's IVS video player external script. That has a lot of methods in it, including registerIVSTech which I am calling in this class :

class myClass {
     constructor(myData) {
          this.data = myData;
     }
     init() {
        registerIVSTech();
     }
}

export default myClass;

However, when I run ESLint, it says:

 error  'registerIVSTech' is not defined           no-undef

but it is defined. I used a debugger and the value of it is there since the IVS scripts loads on the page, the class has access to it. Is there a way around this without using npm modules?

1 Answers1

1

You can disable eslint rules. In this case add // eslint-disable-next-line no-undef the line before you call registerIVSTech.

CascadiaJS
  • 2,320
  • 2
  • 26
  • 46