Last active
June 26, 2020 11:23
-
-
Save jqn/784264ec70eb62b8f605ba50d80ad93e to your computer and use it in GitHub Desktop.
React Native Eslint config
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 = { | |
| root: true, | |
| extends: '@react-native-community', | |
| rules: { | |
| 'prettier/prettier': 0, // Disables prettier | |
| 'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks | |
| 'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies | |
| 'react/no-unused-state': 'error', // Checks for unused state properties | |
| 'react/no-did-mount-set-state': 'off', | |
| 'react-native/no-unused-styles': 2, | |
| 'implicit-arrow-linebreak': 'off', | |
| 'comma-dangle': 'off', | |
| 'no-trailing-spaces': 'off', | |
| indent: 'off', | |
| 'no-duplicate-imports': 1, | |
| 'no-console': 'error', | |
| '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/no-unused-prop-types': 'error', | |
| 'react-native/sort-styles': [ | |
| 'error', | |
| 'asc', | |
| { | |
| ignoreClassNames: false, | |
| ignoreStyleProperties: false, | |
| }, | |
| ], | |
| 'react/prop-types': [ | |
| 'error', | |
| { | |
| ignore: ['navigation'], | |
| }, | |
| ], | |
| }, | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment