-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
98 lines (97 loc) · 2.2 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
const prettier = require('./.prettierrc.js');
module.exports = {
root: true,
extends: ['@react-native-community', 'airbnb', 'prettier', 'prettier/react'],
parser: 'babel-eslint',
env: {
jest: true,
browser: true,
es6: true,
node: true,
},
globals: {
__DEV__: true,
},
plugins: ['react', 'react-native', 'prettier'],
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
sourceType: 'module',
},
settings: {
'import/resolver': {
'babel-module': {},
},
},
rules: {
'react/jsx-filename-extension': [
'warn',
{
extensions: ['.js', '.jsx'],
},
],
'prettier/prettier': ['error', prettier],
'no-irregular-whitespace': 'error',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'react/destructuring-assignment': 'error',
'no-continue': 'off',
camelcase: 'off',
// camelcase: 'error',
'react/state-in-constructor': 'off',
'react/jsx-props-no-spreading': [
'error',
{
html: 'enforce',
custom: 'ignore',
explicitSpread: 'enforce',
exceptions: [],
},
],
'react-native/no-unused-styles': 'error',
'react-native/split-platform-components': 'off',
'react-native/no-inline-styles': 'error',
'react-native/no-color-literals': 'error',
'react-native/no-raw-text': 'off',
'jest/valid-expect': 'error',
'jest/no-identical-title': 'error',
'no-unused-vars': [
'error',
{
args: 'after-used',
},
],
'no-tabs': 'error',
'symbol-description': 'off',
'class-methods-use-this': 'off',
'react/no-typos': 'off',
'no-underscore-dangle': 'off',
radix: 'off',
'no-restricted-globals': 'off',
'global-require': 'off',
'no-unused-expressions': [
'error',
{
allowShortCircuit: true,
},
],
'react/sort-comp': [
'error',
{
order: [
'static-methods',
'state',
'instance-variables',
'lifecycle',
'everything-else',
'rendering',
'methods',
'events',
'/^set.+Ref$/',
],
},
],
},
};