-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
52 lines (52 loc) · 1.7 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
plugins: ['unused-imports'],
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'prettier',
'prettier/react',
'eslint:recommended',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array
'@react-native-community',
],
parserOptions: {
ecmaVersion: 2016, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
rules: {
'@typescript-eslint/no-use-before-define': 0,
'prefer-template': 0,
'react-hooks/exhaustive-deps': 0,
'react/prop-types': 0,
'react/state-in-constructor': [2, 'never'],
'react/no-array-index-key': 0,
'react/no-did-update-set-state': 0,
'import/prefer-default-export': 0,
'react/destructuring-assignment': 0,
'react/jsx-curly-brace-presence': 0,
'import/no-unresolved': 0,
'import/no-cycle': 0,
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
root: true,
};