-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
79 lines (79 loc) · 2.46 KB
/
index.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
module.exports = {
extends: require.resolve('eslint-config-airbnb'),
env: { browser: true, node: true, es6: true, mocha: true, jest: true },
parser: require.resolve('babel-eslint'),
plugins: [
'react',
'import',
],
settings: {
'import/extensions': ['.js'],
'import/ignore': ['node_modules', '.json$', '.sss$']
},
globals: {},
rules: {
complexity: ['error', 4],
semi: ['error', 'never'],
'global-require': 'error',
'no-unused-vars': 'error',
'no-case-declarations': 0,
'no-param-reassign': ['error', { props: false }],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: false }],
'no-underscore-dangle':
['error', { allowAfterThis: false, allow: ['__', '__data', '__html'] }],
'max-len': ['error', 250],
'react/prefer-stateless-function': 'off',
'react/no-multi-comp': 'off',
'react/display-name': ['off', { ignoreTranspilerName: false }],
'react/jsx-no-bind':
[
'error',
{
ignoreRefs: true,
allowArrowFunctions: false,
allowBind: false
}
],
'react/jsx-filename-extension': 'off',
'react/jsx-no-duplicate-props': 'error',
'react/require-default-props': 'off',
'react/no-unused-prop-types': 'off',
'react/no-string-refs': 'error',
'react/prefer-es6-class': ['error', 'always'],
'react/jsx-pascal-case': 'error',
'react/jsx-handler-names':
['error', { eventHandlerPrefix: 'handle', eventHandlerPropPrefix: 'on' }],
'jsx-quotes': ['error', 'prefer-single'],
'import/no-unresolved': ['error', { commonjs: true, amd: false }],
'import/no-duplicates': 'error',
'import/no-named-as-default': 'error',
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/imports-first': 'error',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
indent: ['error', 2, { SwitchCase: 1 }],
'react/sort-comp':
[
'error',
{
order: [
'static-methods',
'lifecycle',
'/^handle.+$/',
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
'everything-else',
'/^render.+$/',
'render'
]
}
],
'no-console': 'error',
'no-confusing-arrow': 'off',
'no-alert': 'off',
'no-debugger': 'off',
}
}