-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.yaml
114 lines (106 loc) · 2.63 KB
/
.eslintrc.yaml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
parser: babel-eslint
parserOptions:
sourceType: module
plugins:
- babel
- react
- react-native
- flowtype
extends:
- eslint:recommended
- plugin:flowtype/recommended
- plugin:react/recommended
- prettier
- prettier/flowtype
- prettier/react
env:
es6: true
react-native/react-native: true
globals:
fetch: true
Headers: true
FormData: true
fetchJson: true
fetchXml: true
rawFetch: true
rules:
array-callback-return: error
camelcase: warn
consistent-this: [error, self]
curly: [warn, multi-line]
default-case: error
guard-for-in: error
eqeqeq: [error, always, {'null': ignore}]
linebreak-style: [error, unix]
new-cap: off
no-await-in-loop: warn
no-case-declarations: error
no-confusing-arrow: off
no-console: off
no-div-regex: error
no-eq-null: warn
no-extra-label: error
no-implicit-coercion:
- error
- boolean: true
number: true
string: true
no-implicit-globals: error
no-multi-assign: error
no-new-symbol: error
no-restricted-syntax: [error, WithStatement]
no-return-await: error
no-throw-literal: error
no-undef-init: off
no-underscore-dangle: off
no-unmodified-loop-condition: error
no-unused-vars:
- warn
- args: 'after-used'
argsIgnorePattern: '^_'
no-useless-constructor: error
no-var: error
prefer-promise-reject-errors: error
prefer-spread: error
quotes: [warn, single, avoid-escape]
require-await: warn
semi: off
# react rules – https://github.com/yannickcr/eslint-plugin-react
react/display-name: off
react/jsx-curly-brace-presence: [warn, never]
react/jsx-key: warn
react/jsx-no-bind:
- warn
- ignoreRefs: true
allowArrowFunctions: true
react/jsx-sort-props:
- warn
- reservedFirst: true
ignoreCase: false
callbacksLast: true
react/no-access-state-in-setstate: error
react/no-did-mount-set-state: error
react/no-did-update-set-state: error
react/no-multi-comp: off # prevent multiple component definition per file
react/no-redundant-should-component-update: warn
react/no-typos: error
react/prop-types: off
react/self-closing-comp: warn # prevent extra closing tags for components without children
react/sort-comp:
- warn
- order:
- static-methods
- type-annotations
- lifecycle
- everything-else
- render
react/sort-prop-types: warn
react/wrap-multilines: off
react/jsx-boolean-value: [error, always]
# flow rules
flowtype/no-dupe-keys: error
flowtype/use-flow-type: error
# react-native rules
react-native/no-unused-styles: warn
react-native/no-inline-styles: warn
react-native/no-color-literals: warn