forked from Aerobotics/react-native-dji-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
53 lines (45 loc) · 1.28 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
module.exports = {
env: {
browser: true,
es6: true,
'react-native/react-native': true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-native/all',
'plugin:flowtype/recommended',
],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
'react-native',
'flowtype',
],
rules: {
'flowtype/require-valid-file-annotation': ['error', 'always'],
'flowtype/newline-after-flow-annotation': ['error', 'always'],
'flowtype/no-types-missing-file-annotation': ['off'],
'flowtype/no-weak-types': ['error'],
'semi': ['error', 'always'],
'no-multi-spaces': ['error'],
'no-trailing-spaces': ['error'],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'quotes': ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error'],
'object-curly-newline': ['error', { 'minProperties': 1 }],
'object-property-newline': ['error'],
'no-unused-vars': ['warn'],
'no-underscore-dangle': ['error', { 'allowAfterThis': true, 'allowAfterSuper': true }],
'react-native/no-inline-styles': ['off'],
'react-native/no-color-literals': ['off'],
},
};