Xo: global variables undefined

Created on 26 Apr 2017  路  2Comments  路  Source: xojs/xo

Hello
I have a silly problem with XO-linter on Atom
I use it for lint react-redux app and I have a warning
window is not defined.... while in my package.json

I add

"env": { 
  "browser": true, 
  "node": true
}

but still... any idea ?
same problem (same cause) with document

"devDependencies": {
    "eslint": "^3.19.0",
    "eslint-config-xo-react": "^0.11.1",
    "eslint-plugin-react": "^6.10.3",
    "xo": "^0.18.1"
  },
  "xo": {
    "extends": "xo-react",
    "space": 2,
    "env": {
      "browser": true,
      "node": true
    }
  }

Most helpful comment

env should be an array, not an object.

All 2 comments

env should be an array, not an object.

"env" : [
  "browser",
  "node"
]

Sorry for this ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sindresorhus picture sindresorhus  路  8Comments

sindresorhus picture sindresorhus  路  6Comments

sindresorhus picture sindresorhus  路  5Comments

sindresorhus picture sindresorhus  路  6Comments

pizzafox picture pizzafox  路  7Comments