forked from EdgeApp/edge-react-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
89 lines (89 loc) · 2.54 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
module.exports = {
'env': {
'es6': true,
'node': true
},
'parser': 'babel-eslint',
'extends': [
'eslint:recommended',
'plugin:flowtype/recommended',
'plugin:react/recommended',
'plugin:react-native/all'
],
'parserOptions': {
'ecmaFeatures': {
'experimentalObjectRestSpread': true,
'jsx': true
},
'sourceType': 'module'
},
'plugins': [
'react',
'react-native',
'flowtype'
],
'rules': {
'max-len': ['error', {
'code': 200,
'ignoreComments': true,
'ignoreTrailingComments': true,
'ignoreUrls': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
'ignoreRegExpLiterals': true
}],
'arrow-parens': ['error', 'always'],
'operator-linebreak': ['error', 'before'],
'react/jsx-curly-spacing': ['error', {
'when': 'never',
'attributes': {'allowMultiline': false},
'children': true
}],
'react/jsx-no-duplicate-props': ['error', { 'ignoreCase': true }],
'react/jsx-indent-props': ['error', 2],
'react/self-closing-comp': ['error', {'component': true}],
'react/no-typos': 'error',
'react/no-array-index-key': 'error',
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
'jsx-quotes': ['error', 'prefer-single'],
'newline-per-chained-call': ['error', { 'ignoreChainWithDepth': 2 }],
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
// "object-curly-spacing": ["error", "never", { "objectsInObjects": true }],
'operator-assignment': ['error', 'never'],
'keyword-spacing': ['error', {
'before': true,
'after': true
}],
'arrow-spacing': ['error', {
'before': true,
'after': true
}],
'space-before-blocks': ['error', {
'functions': 'always',
'keywords': 'always',
'classes': 'always'
}],
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'always',
'asyncArrow': 'always'
}],
'space-in-parens': ['error', 'never'],
'no-duplicate-imports': 2,
'array-callback-return': 2,
'no-floating-decimal': 2,
'no-var': 2,
'no-trailing-spaces': 2,
'no-console': 0,
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'react/prop-types': 0,
'react/no-string-refs': 0,
'react-native/no-unused-styles': 0,
'react-native/split-platform-components': 2,
'react-native/no-inline-styles': 0,
}
}