-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
49 lines (48 loc) · 1.22 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
// These settings are used by a git pre-commit hook in src/utils/gitHooks
// which ensures eslint compliance before allowing commits.
module.exports = {
env: {
browser: true,
es2020: true,
node: true,
},
extends: [`eslint:recommended`, `plugin:react/recommended`],
parser: `babel-eslint`,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
sourceType: `module`,
},
plugins: [`react`, `react-hooks`, `markdown`],
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`],
},
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`,
},
},
],
settings: {
react: {
version: `detect`,
},
},
}