ESLint - “window” is not defined. How to allow global variables in package.json

前端 未结 6 516
天命终不由人
天命终不由人 2020-12-02 07:45

I am assigning a property to the global window object, but when I run eslint, I get this:

\"window\" is not defined

I see t

6条回答
  •  我在风中等你
    2020-12-02 08:26

    If you are using Angular you can get it off with:

    "env": {
        "browser": true,
        "node": true
    },
    "rules" : {
        "angular/window-service": 0
     }
    

提交回复
热议问题