-
Notifications
You must be signed in to change notification settings - Fork 90
/
.eslintrc.js
70 lines (63 loc) · 1.6 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
module.exports = {
env: {
es6: true,
browser: true,
node: true,
jest: true,
},
settings: {
react: {
version: 'detect',
},
'import/core-modules': ['react-native-otp-inputs'],
},
plugins: ['simple-import-sort'],
extends: ['satya164', 'plugin:react-native/all'],
rules: {
'babel/no-unused-expressions': 'off',
'import/extensions': 'off',
'import/named': 'off',
'import/no-unresolved': 'error',
'jest/consistent-test-it': ['error', { fn: 'test' }],
'jest/no-truthy-falsy': 'off',
'jest/expect-expect': ['error', { assertFunctionNames: ['expect', 'element'] }],
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': [
'error',
{
groups: [
// Side effect imports.
['^\\u0000'],
// Packages.
['^@?\\w'],
['^../'],
['^./'],
],
},
],
'prettier/prettier': [
'error',
{
bracketSpacing: true,
bracketSameLine: false,
printWidth: 100,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
},
],
'react/jsx-sort-props': ['error', { shorthandFirst: true }],
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-native/no-raw-text': 'off',
'react-native/no-color-literals': 'off',
'react/no-unused-prop-types': 'off',
'@typescript-eslint/array-type': ['error', { default: 'generic', readonly: 'generic' }],
},
globals: {
__DEV__: true,
jasmine: true,
},
};