Created
August 1, 2020 16:05
-
-
Save aamnah/e80c49c01af22fbeb2b3189b11c4695c to your computer and use it in GitHub Desktop.
ESLint for React Native (sans Typescript support)
This file contains 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
# .eslintrc.yaml | |
# Configuration: https://eslint.org/docs/user-guide/configuring | |
# Using with Prettier: https://prettier.io/docs/en/integrating-with-linters.html#recommended-configuration | |
root: true | |
extends: | |
- '@react-native-community' | |
- plugin:import/errors | |
- plugin:import/warnings | |
- plugin:import/typescript | |
- prettier # needs to be LAST, so it gets the chance to override other configs. | |
- prettier/react | |
plugins: | |
- import | |
settings: | |
import/resolver: | |
node: | |
extensions: ['.js', '.jsx', '.ts', '.tsx'] | |
moduleDirectory: ['node_modules', 'src/'] | |
rules: | |
import/order: | |
- error | |
- groups: | |
- builtin | |
- external | |
- internal | |
- - parent | |
- sibling | |
pathGroups: | |
- pattern: react | |
group: external | |
position: before | |
pathGroupsExcludedImportTypes: | |
- react | |
newlines-between: always | |
alphabetize: | |
order: asc | |
caseInsensitive: true |
This file contains 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
npm i -D eslint prettier eslint-plugin-import eslint-config-prettier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment