-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
80 lines (80 loc) · 2.15 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
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
},
env: {
es6: true,
browser: true,
},
globals: {},
extends: ['prettier'],
plugins: ['react', 'react-hooks', 'prettier'],
rules: {
'prettier/prettier': 2,
semi: 2,
'comma-dangle': 0,
'react/jsx-uses-vars': 1,
'no-unused-vars': 1,
'no-undef': 0,
'no-unexpected-multiline': 1,
'no-debugger': 2,
'no-alert': 1,
'no-console': 1,
'no-await-in-loop': 1,
'no-return-assign': ['error', 'except-parens'],
'no-unused-expressions': [2, { allowTaggedTemplates: true }],
'import/prefer-default-export': 0,
import: 0,
'react/require-default-props': 0,
quotes: [
2,
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
eqeqeq: 1,
'array-bracket-spacing': 1,
'object-curly-spacing': [1, 'always'],
'object-curly-newline': [
1,
{
ObjectExpression: {
multiline: true,
minProperties: 3,
consistent: false,
},
},
],
camelcase: 1,
'template-curly-spacing': 'off',
indent: ['error', 4, { ignoredNodes: ['TemplateLiteral'] }],
'max-len': [
2,
{
code: 120,
tabWidth: 4,
ignoreTemplateLiterals: true,
},
],
},
settings: {
'import/resolver': 'webpack',
react: {
createClass: 'createReactClass',
pragma: 'React',
fragment: 'Fragment',
version: 'detect',
flowVersion: '0.53',
},
propWrapperFunctions: [
'forbidExtraProps',
{ property: 'freeze', object: 'Object' },
{ property: 'myFavoriteWrapper' },
],
linkComponents: ['Hyperlink', { name: 'Link', linkAttribute: 'to' }],
},
};