-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
105 lines (105 loc) · 2.57 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
module.exports = {
env: {
es2021: true,
jest: true,
},
parserOptions: {
ecmaVersion: 2021,
},
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: [
'android/*',
'ios/*',
'src/assets/icons/icons.ts',
'react-native.config.js',
'metro.config.js',
],
rules: {
'dot-notation': ['error', { allowKeywords: true }],
'no-implied-eval': 'error',
'no-throw-literal': 'error',
'no-return-await': 'error',
'no-underscore-dangle': 0,
'@typescript-eslint/dot-notation': 0,
'@typescript-eslint/no-implied-eval': 0,
'@typescript-eslint/no-throw-literal': 0,
'@typescript-eslint/return-await': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-implicit-any-catch': 0,
'@typescript-eslint/no-explicit-any': 0,
'no-nested-ternary': 0,
'global-require': 0,
'class-methods-use-this': 0,
'no-plusplus': 0,
'prettier/prettier': [
'error',
{
singleQuote: true,
jsxSingleQuote: true,
endOfLine: 'auto',
},
],
'no-restricted-exports': 0,
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'func-style': ['error', 'expression'],
'react/jsx-filename-extension': 0,
'@typescript-eslint/no-use-before-define': 0,
'react/prop-types': 0,
'react/destructuring-assignment': ['error', 'always'],
'react-hooks/exhaustive-deps': [
'error',
{
additionalHooks:
'(useRecoilCallback|useCode|useDerivedValue|useAnimatedStyle)',
},
],
'import/prefer-default-export': 0,
'import/no-anonymous-default-export': 'error',
'react/jsx-props-no-spreading': 0,
'react/require-default-props': 0,
'react/function-component-definition': [
'error',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'no-void': [
'error',
{
allowAsStatement: true,
},
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase', 'snake_case'],
leadingUnderscore: 'allow',
},
{
selector: 'function',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
},
globals: {
__DEV__: true,
fetch: false,
},
};