ESLint Setup for React Native Projects
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true, | |
"react-native/react-native": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", | |
"plugin:react-hooks/recommended", | |
"plugin:jsx-a11y/recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings", | |
"airbnb", | |
"airbnb/hooks" | |
], | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly" | |
}, | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, | |
"plugins": ["react", "react-native", "jsx-a11y"], | |
"rules": { | |
"quotes": 1, | |
"no-use-before-define": 0, | |
"react/jsx-filename-extension": [ | |
2, | |
{ | |
"extensions": [".js", ".jsx"] | |
} | |
], | |
"react/prop-types": 0, | |
"react-native/no-unused-styles": 2, | |
"react-native/split-platform-components": 2, | |
"react-native/no-inline-styles": 1, | |
"react-native/no-color-literals": 0, | |
"react-native/no-raw-text": 2, | |
"react-native/no-single-element-style-arrays": 2, | |
"comma-dangle": "off" | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
devDependencies required are:
Command to install them all: OR
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment