-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
55 lines (54 loc) · 1.31 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
// These settings are used by a git pre-commit hook
module.exports = {
env: {
browser: true,
node: true,
es6: true
},
extends: [
`plugin:react/recommended`,
`eslint:recommended`
],
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2020,
sourceType: `module`
},
plugins: [`react`, `react-hooks`, `markdown`],
settings: {
react: {
version: `detect`,
},
},
rules: {
indent: [`error`, 2, { SwitchCase: 1 }],
quotes: [`error`, `backtick`, { avoidEscape: true }],
semi: [`error`, `never`],
'linebreak-style': [`error`, `unix`],
'react/prop-types': `off`,
'react/display-name': `off`,
'no-console': [`error`, { allow: [`warn`, `error`] }],
'react-hooks/rules-of-hooks': `error`,
'react-hooks/exhaustive-deps': `warn`,
'no-var': `error`,
'spaced-comment': [`error`, `always`],
'space-in-parens': [`error`, `always`],
'object-curly-spacing': [2, `always`],
'max-len': [`error`, { 'comments': 80 }],
'no-trailing-spaces': `error`,
},
overrides: [
{
files: [`*.md`],
rules: {
'no-undef': `off`,
'no-unused-vars': `off`,
'react/jsx-no-undef': `off`,
'react/react-in-jsx-scope': `off`,
'react/jsx-no-comment-textnodes': `off`,
},
},
],
}