forked from flexn-io/renative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
executable file
·71 lines (67 loc) · 2.37 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
const path = require('path');
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb'],
env: {
node: true,
browser: true,
es6: true,
jest: true,
mocha: true,
},
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
plugins: ['jest', 'detox', 'mocha'],
rules: {
'arrow-body-style': ['warn', 'as-needed'],
camelcase: 'off',
'class-methods-use-this': 'off',
indent: ['error', 4],
'new-cap': ['error', { capIsNew: false }],
'no-duplicate-imports': 'off',
'no-param-reassign': ['error', { ignorePropertyModificationsFor: ['el', 'ref', 'event'] }],
'no-plusplus': 'off',
'no-shadow': ['error', { builtinGlobals: false, hoist: 'functions', allow: ['describe'] }],
'react/jsx-filename-extension': ['error', { extensions: ['.js'] }],
'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
'react/require-extension': 'off',
'react/sort-comp': [
'error',
{
order: [
'type-annotations',
'static-methods',
'lifecycle',
'/^on.+$/',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render',
],
},
],
'object-curly-newline': [
'error',
{
ObjectExpression: { minProperties: 6, multiline: true, consistent: true },
ObjectPattern: { minProperties: 6, multiline: true, consistent: true },
},
],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-duplicates': 'error',
'import/no-named-as-default': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/no-noninteractive-tabindex': 'off',
'jsx-a11y/media-has-caption': 'off',
'jsx-a11y/mouse-events-have-key-events': 'off',
'comma-dangle': ['error', 'only-multiline'],
'no-underscore-dangle': 'off',
'mocha/no-exclusive-tests': 'error',
"prefer-destructuring": ["error", {"object": true, "array": false}]
},
};