-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
55 lines (55 loc) · 1.25 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
module.exports = {
ignorePatterns: ["node_modules/*", "dist/*"],
env: {
browser: true,
es2021: true,
jest: true,
},
globals: {
Peer: true,
page: true,
browser: true,
},
extends: [
"airbnb-base",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react/jsx-runtime",
],
parserOptions: {
ecmaVersion: 13,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
rules: {
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
},
],
"prettier/prettier": ["error", {}, { usePrettierrc: true }],
"import/prefer-default-export": 0,
"no-use-before-define": 0,
// ignore 'React' is defined but never used
"react/jsx-uses-react": 1,
"no-restricted-syntax": 0,
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx"],
},
},
react: {
// to avoid "Warning: React version not specified in eslint-plugin-react settings." - https://github.com/yannickcr/eslint-plugin-react/issues/1955
version: "latest",
},
},
};