-
Notifications
You must be signed in to change notification settings - Fork 9k
/
Copy path.eslintrc.js
78 lines (77 loc) · 1.52 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
/**
* @prettier
*/
const path = require("node:path")
module.exports = {
parser: "@babel/eslint-parser",
env: {
browser: true,
node: true,
es6: true,
jest: true,
"jest/globals": true,
},
parserOptions: {
ecmaFeatures: { jsx: true },
babelOptions: { configFile: path.join(__dirname, "babel.config.js") },
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
],
plugins: ["react", "import", "jest", "prettier"],
settings: {
react: {
pragma: "React",
version: "15.0",
},
},
rules: {
semi: [2, "never"],
strict: 0,
quotes: [
2,
"double",
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
"no-unused-vars": 2,
"no-multi-spaces": 1,
camelcase: [
"error",
{
allow: [
"^UNSAFE_",
"^requestSnippetGenerator_",
"^JsonSchema_",
"^curl_",
"^dom_",
"^api_",
"^client_",
"^grant_",
"^code_",
"^redirect_",
"^spec",
],
},
],
"no-use-before-define": [2, "nofunc"],
"no-underscore-dangle": 0,
"no-unused-expressions": 1,
"comma-dangle": 0,
"no-console": [
2,
{
allow: ["warn", "error"],
},
],
"react/jsx-no-bind": 1,
"react/jsx-no-target-blank": 2,
"react/display-name": 0,
"import/no-extraneous-dependencies": 2,
"react/jsx-filename-extension": 2,
},
}