forked from mateusz1913/react-native-avoid-softinput
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
99 lines (99 loc) · 2.79 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: [
'import',
'react',
'react-hooks',
'react-native',
'@typescript-eslint',
],
ignorePatterns: [
'node_modules/',
'*/node_modules/',
'lib/',
'*/build/',
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'import/order': [
'error',
{
'groups': [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'always',
'alphabetize': { order: 'asc' },
},
],
'max-len': [
'error',
{
code: 120,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreTrailingComments: true,
tabWidth: 2,
},
],
'no-underscore-dangle': 'error',
'no-unused-vars': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react/display-name': 'off',
'react/prop-types': 'off',
'react-native/no-inline-styles': 'warn',
'react-native/no-unused-styles': 'warn',
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: [ 'none', 'all', 'multiple', 'single' ],
},
],
'object-curly-spacing': [ 'error', 'always', { arraysInObjects: false, objectsInObjects: false }],
'array-bracket-spacing': [ 'error', 'always', { objectsInArrays: false, arraysInArrays: false }],
'no-extra-parens': [ 'error', 'all' ],
'arrow-parens': [ 'error', 'always' ],
'semi': [ 'error', 'always' ],
'comma-dangle': [ 'error', 'always-multiline' ],
'quotes': [ 'error', 'single' ],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'const', next: '*' },
{ blankLine: 'any', prev: 'const', next: 'const' },
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'quote-props': [ 'error', 'consistent-as-needed' ],
},
settings: {
react: {
version: 'detect',
},
},
};