-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.eslintrc.js
67 lines (65 loc) · 1.72 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
const jsxA11y = require('eslint-plugin-jsx-a11y')
const a11yRules = Object.keys(jsxA11y.rules).reduce((result, rule) => {
result[`jsx-a11y/${rule}`] = 'off'
return result
}, {})
module.exports = {
extends: 'airbnb',
parser: 'babel-eslint',
env: {
'browser': true,
'webextensions': true
},
settings: {
'import/resolver': 'webpack'
},
rules: {
'arrow-parens': ['error', 'always'],
'comma-dangle': ['error', 'never'],
'consistent-return': 'off',
'implicit-arrow-linebreak': 'off',
'max-len': ['error', 120],
'no-mixed-operators': [
'error',
{
groups: [
['&', '|', '^', '~', '<<', '>>', '>>>'],
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||'],
['in', 'instanceof']
],
allowSamePrecedence: true
}
],
'no-param-reassign': ['error', { props: false }],
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'all',
ignoreRestSiblings: false,
varsIgnorePattern: '^h$',
argsIgnorePattern: '^_+$'
}
],
'object-curly-newline': 'off',
'object-shorthand': ['error', 'always'],
'operator-linebreak': ['error', 'after'],
'semi': ['error', 'never'],
'react/destructuring-assignment': 'off',
'react/jsx-closing-bracket-location': [
'error',
{
selfClosing: 'tag-aligned',
nonEmpty: 'after-props'
}
],
'react/jsx-one-expression-per-line': 'off',
'react/jsx-tag-spacing': ['error', { beforeSelfClosing: 'never' }],
'react/no-unused-state': 'off',
'react/prefer-stateless-function': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
...a11yRules
}
}