-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
63 lines (63 loc) · 1.8 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
module.exports = {
root: true,
extends: '@react-native-community',
plugins: ['import', 'sort-destructure-keys'],
parser: '@typescript-eslint/parser',
rules: {
'no-console': 'warn',
'import/no-default-export': ['off'],
'comma-dangle': ['error', 'never'],
'react/jsx-indent-props': [2, 2],
'import/order': [
2,
{
alphabetize: {
order: 'asc',
caseInsensitive: true
},
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
'newlines-between': 'always',
pathGroups: [
{ pattern: 'api/**', group: 'internal' },
{ pattern: 'assets/**', group: 'internal', position: 'after' },
{ pattern: 'components/**', group: 'internal' },
{ pattern: 'constants/**', group: 'internal' },
{ pattern: 'contexts/**', group: 'internal' },
{ pattern: 'layouts/**', group: 'internal' },
{ pattern: 'navigation', group: 'internal' },
{ pattern: 'screens/**', group: 'internal' },
{ pattern: 'themes/**', group: 'internal' },
{ pattern: 'types/**', group: 'internal' },
{ pattern: 'utils/**', group: 'internal' }
],
pathGroupsExcludedImportTypes: ['react']
}
],
'sort-imports': [
'warn',
{
ignoreCase: true,
ignoreDeclarationSort: true,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
}
],
'sort-destructure-keys/sort-destructure-keys': [
'warn',
{ caseSensitive: false }
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error']
},
settings: {
'import/resolve': {
moduleDirectory: ['node_modules', 'src']
}
}
};