Skip to content

Instantly share code, notes, and snippets.

@ltsharma
Created June 12, 2020 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltsharma/cc88c8f96536f656570b23586b4e3098 to your computer and use it in GitHub Desktop.
Save ltsharma/cc88c8f96536f656570b23586b4e3098 to your computer and use it in GitHub Desktop.
module.exports = {
env: {
browser: true,
es6: true,
'react-native/react-native': true,
},
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', 'prettier', 'react-hooks', 'react-native'],
rules: {
'prettier/prettier': 'error',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/forbid-prop-types': [0, { forbid: ['any'] }],
'react/prop-types': 0,
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'react/jsx-props-no-spreading': [0],
'no-use-before-define': [0],
'global-require': [0],
'id-blacklist': ['error', 'err', 'cb', 'callback', 'val'],
'react-native/no-unused-styles': 2,
'react-native/split-platform-components': 2,
'react-native/no-inline-styles': 2,
'react-native/no-color-literals': 2,
'react-native/no-raw-text': 2,
'react-native/no-single-element-style-arrays': 2,
},
env: {
jest: true,
browser: true,
node: true,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment