forked from tipsi/eslint-config-tipsi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
64 lines (64 loc) · 1.9 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
module.exports = {
parser: 'babel-eslint',
extends: 'airbnb',
env: {
browser: true,
node: true,
es6: true,
},
globals: {
__DEV__: true,
},
rules: {
'react/no-multi-comp': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-filename-extension': 'off',
'react/prefer-stateless-function': 'off',
'react/jsx-closing-bracket-location': [
'error', {
selfClosing: 'line-aligned',
nonEmpty: 'after-props',
},
],
'react/destructuring-assignment': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/forbid-foreign-prop-types': 'off',
'react/jsx-wrap-multilines': 'off',
'react/sort-comp': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'jsx-a11y/label-has-for': 'off',
'arrow-parens': ['error', 'as-needed'],
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
// Trailing commas in functions are allowed only in ES8
// https://github.com/eslint/eslint/issues/7809
functions: 'never',
}],
'eol-last': 'off',
'function-paren-newline': ['off'],
'global-require': 'off',
'implicit-arrow-linebreak': 'off',
indent: ['error', 2, { SwitchCase: 1 }],
'max-len': [2, 100],
'no-await-in-loop': 'off',
'no-confusing-arrow': 'off',
'no-console': 'error',
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
'no-return-assign': 'off',
'no-unused-expressions': ['error', { allowTernary: true }],
'no-use-before-define': 'off',
'object-curly-newline': 'off',
'operator-linebreak': 'off',
'prefer-promise-reject-errors': 'off',
'quote-props': ['error', 'as-needed'],
semi: ['error', 'never'],
},
plugins: [
'react',
],
}