-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
57 lines (57 loc) · 1.43 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
module.exports = {
root: true,
extends: ['@react-native-community', 'plugin:react-hooks/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'detox'],
overrides: [
{
files: ['*.e2e.js'],
env: {
'detox/detox': true,
jest: true,
'jest/globals': true,
},
},
],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'react-native',
importNames: ['SafeAreaView'],
message:
'Import SafeAreaView from react-native-safe-area-context instead',
},
{
name: 'react-navigation',
importNames: ['SafeAreaView'],
message:
'Import SafeAreaView from react-native-safe-area-context instead',
},
{
name: '@react-navigation/core',
importNames: ['useNavigation'],
message: 'Import useNavigation from @react-navigation/native',
},
],
},
],
'spaced-comment': ['warn', 'always'],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', next: '*', prev: 'multiline-const' },
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
},
settings: {
'import/resolver': {
node: {
paths: ['src'],
},
},
},
};