forked from adammcarth/react-native-segmented-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (59 loc) · 1.36 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
module.exports = {
root: true,
extends: [
'airbnb-typescript',
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'jest',
],
globals: {
__DEV__: false,
},
rules: {
'no-console': 'error',
'max-len': [
'error',
{
code: 100,
tabWidth: 2,
ignorePattern: 'Navigation\.registerComponent.+',
ignoreUrls: true,
},
],
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true,
typedefs: true,
},
],
'@typescript-eslint/no-misused-promises': 'off',
'react/destructuring-assignment': 'off',
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'lines-between-class-members': 'off',
'class-methods-use-this': [
'error',
{
'exceptMethods': [
// React Methods
'render',
'componentDidMount',
'shouldComponentUpdate',
'getSnapshotBeforeUpdate',
'componentDidUpdate',
'componentWillUnmount',
'componentDidCatch',
],
},
],
'jest/consistent-test-it': 'error',
'react/static-property-placement': 0,
'no-async-promise-executor': 0,
},
};