Created
January 29, 2019 09:28
-
-
Save mustafamagdy/53346144cf921c61fb60cbec3916bd94 to your computer and use it in GitHub Desktop.
ESLint for react native
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| parser: "babel-eslint", | |
| env: { | |
| browser: true, | |
| commonjs: true, | |
| es6: true, | |
| node: true | |
| }, | |
| extends: ["eslint:recommended", "plugin:react/recommended"], | |
| parserOptions: { | |
| ecmaFeatures: { | |
| jsx: true, | |
| modules: true, | |
| experimentalObjectRestSpread: true | |
| }, | |
| ecmaVersion: 6, | |
| sourceType: "module" | |
| }, | |
| plugins: ["react"], | |
| rules: { | |
| indent: ["error", 2], | |
| "linebreak-style": ["error", "windows"], | |
| quotes: ["error", "double"], | |
| semi: ["error", "always"], | |
| "react/jsx-uses-react": 2, | |
| "react/react-in-jsx-scope": 2, | |
| "react/jsx-first-prop-new-line": [1, "multiline"], | |
| "react/jsx-max-props-per-line": [1, { maximum: 1, when: "always" }], | |
| "react/prop-types": [0, { ignore: "ignore", customValidators: "customValidator" }] | |
| }, | |
| settings: { | |
| react: { | |
| pragma: "React", | |
| version: "16.6.3" | |
| } | |
| } | |
| }; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to install these dev deps:
yarn add --dev babel-eslint eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react prettier-eslint-cli