Skip to content

Instantly share code, notes, and snippets.

@hetmann
Last active February 27, 2020 08:57
Show Gist options
  • Save hetmann/70757f8e1508f8de00539fa6bd2e3314 to your computer and use it in GitHub Desktop.
Save hetmann/70757f8e1508f8de00539fa6bd2e3314 to your computer and use it in GitHub Desktop.
React-Native & ESLint in 2 steps

React-Native & ESLint in 2 steps

Step 1.

Install (npm or yarn) the following packages to your project

yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-universe eslint-plugin-react-redux prettier typescript --dev

Step 2.

Add the following eslint configuration to your package.json

"eslintConfig": {
  "settings": {
    "react": {
      "version": "detect"
    }
  },
  "extends": [
    "plugin:react-redux/recommended",
    "universe/native"
  ],
  "plugins": [
    "react-redux"
  ],
  "rules": {
    "react-redux/connect-prefer-named-arguments": 0,
    "react-redux/prefer-separate-component-file": 0
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment