-
Notifications
You must be signed in to change notification settings - Fork 193
/
.eslintrc.js
90 lines (90 loc) · 2.74 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
module.exports = {
root: true,
extends: ['@react-native-community', 'prettier'],
plugins: ['import'],
rules: {
'@typescript-eslint/consistent-type-imports': [
'error',
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'arrow-parens': [ 'error', 'always' ],
'comma-dangle': [ 'error', 'always-multiline' ],
'import/order': [
'error',
{
'groups': [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'always',
'alphabetize': { order: 'asc' },
},
],
'lines-between-class-members': 'error',
'no-alert': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-debugger': 'error',
'no-multiple-empty-lines': 'error',
'no-underscore-dangle': 'error',
'no-unused-vars': 'off',
'no-var': 'error',
'newline-before-return': 'error',
'quote-props': [ 'error', 'consistent-as-needed' ],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
{ blankLine: 'always', prev: 'class', next: '*' },
{ blankLine: 'always', prev: '*', next: 'class' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
'prefer-const': 'error',
'prettier/prettier': [
'error',
{
printWidth: 100,
quoteProps: 'consistent',
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
},
],
'react/display-name': 'off',
'react/prop-types': 'off',
'react-hooks/exhaustive-deps': [
'error',
{
additionalHooks: '(useAnimatedStyle|useDerivedValue|useAnimatedProps)',
},
],
'react-native/no-color-literals': 'warn',
'react-native/no-inline-styles': 'warn',
'react-native/no-unused-styles': 'warn',
'react-native/split-platform-components': 2,
'semi': [ 'error', 'always' ],
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: [ 'none', 'all', 'multiple', 'single' ],
},
],
},
};