-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
45 lines (41 loc) · 1.25 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
// eslint-disable-next-line no-undef
module.exports = {
extends: [
'plugin:react/recommended',
'@skan-io/eslint-config-base'
],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
impliedStrict: true
}
},
plugins: ['babel', 'react'],
rules: {
/* annoying to have to escape */
'react/no-unescaped-entities': 'off',
'react/jsx-indent': ['error', 2],
'react/jsx-indent-props': ['error', 2],
'react/jsx-wrap-multilines': ['error'],
'react/jsx-tag-spacing': ['error', {beforeSelfClosing: 'always'}],
'react/jsx-pascal-case': ['error'],
'react/jsx-no-target-blank': ['error'],
'react/jsx-no-comment-textnodes': ['error'],
'react/jsx-no-duplicate-props': ['error', {ignoreCase: true}],
// not sure about using <p>{'spam'}</p>
// 'react/jsx-no-literals': ['error'],
'react/jsx-no-bind': ['error', {
ignoreRefs: false,
allowArrowFunctions: true,
allowBind: false
}],
// 'react/jsx-key': ['error'],
'react/jsx-handler-names': ['error'],
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-equals-spacing': ['error', 'never'],
'react/jsx-curly-spacing': [2, 'never']
}
};