-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy path.eslintrc.js
More file actions
80 lines (80 loc) · 2.71 KB
/
Copy path.eslintrc.js
File metadata and controls
80 lines (80 loc) · 2.71 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = {
extends: [
'expo',
'plugin:@typescript-eslint/recommended',
'plugin:react-native/all',
],
plugins: ['@typescript-eslint', 'react-native', 'unused-imports', 'import'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
'import/resolver': {
typescript: {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
ignorePatterns: [
'/dist/*',
'*.config.js',
'.eslintrc.js',
'babel.config.js',
'metro.config.js',
],
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-vars': ['off', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/consistent-type-exports': [
'error',
{ fixMixedExportsWithInlineTypeSpecifier: false },
],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'unused-imports/no-unused-vars': ['off', { argsIgnorePattern: '^_' }],
'react/display-name': 'off',
'react-native/no-unused-styles': 'error',
'react-native/split-platform-components': 'off',
'react-native/no-inline-styles': 'off',
'react-native/no-color-literals': 'off',
'react-native/no-raw-text': 'off',
'react-native/no-single-element-style-arrays': 'warn',
'react-native/sort-styles': 'error',
'object-shorthand': 'error',
'no-case-declarations': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
curly: ['error', 'all'],
'import/no-unresolved': 'off',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'error',
'no-use-before-define': 'off',
eqeqeq: 'error',
'no-unreachable': 'error',
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': 'warn',
},
};