expo / eslint-config-universe

Moved to https://github.com/expo/expo/tree/master/packages/eslint-config-universe
MIT License
110 stars 7 forks source link

'define' is not defined no-undef #20

Open theZulqarnain opened 5 years ago

theZulqarnain commented 5 years ago

after the following Installation steps, my current code looks package.json

  {
    "main": "node_modules/expo/AppEntry.js",
    "scripts": {
      "start": "expo start",
      "android": "expo start --android",
      "ios": "expo start --ios",
      "web": "expo start --web",
      "eject": "expo eject"
    },
    "dependencies": {
      "expo": "^33.0.0",
      "react": "16.8.3",
      "react-dom": "^16.8.6",
      "react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
      "react-native-web": "^0.11.4"
    },
    "devDependencies": {
      "babel-preset-expo": "^5.1.1",
      "eslint": "^6.1.0",
      "eslint-config-universe": "^1.0.7",
      "prettier": "^1.18.2"
    },
    "private": true,
    "eslintConfig": {
      "extends": ["universe","universe/node", "universe/web","universe/native"]
    }
  }

.eslintrc.js

module.exports = {
    extends: ["universe","universe/node", "universe/web","universe/native"],
};

so I'm getting error

Failed to compile. /usr/local/lib/node_modules/expo-cli/node_modules/react-error-overlay/lib/index.js Line 1: 'define' is not defined no-undef Line 1: 'define' is not defined no-undef Line 1: 'regeneratorRuntime' is not defined no-undef Line 1: 'h' is a function no-func-assign Line 1: 'm' is a function no-func-assign Line 1: 'R' is a function no-func-assign Line 1: 'q' is a function no-func-assign Line 1: 'W' is a function no-func-assign

Search for the keywords to learn more about each error.

ide commented 5 years ago

This could have to do with the ESLint version -- try v5. I'd recommend investigating further, though.