-
Notifications
You must be signed in to change notification settings - Fork 60
/
.eslintrc
90 lines (90 loc) · 2.29 KB
/
.eslintrc
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
81
82
83
84
85
86
87
88
89
90
{
"parser": "@babel/eslint-parser",
"plugins": ["import", "prettier", "react"],
"settings": {
"import/resolver": { "webpack": { "env": { "ESLINT": true } } },
"react": { "version": "16" }
},
"parserOptions": {
"babelOptions": { "presets": ["@babel/preset-react"] },
"ecmaVersion": 9,
"requireConfigFile": false,
"sourceType": "module"
},
"extends": [
"airbnb/base",
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"react-app"
],
"globals": {
"document": true,
"window": true,
"btoa": true
},
"rules": {
"prefer-arrow-callback": [2, { "allowNamedFunctions": true }],
"class-methods-use-this": [
2,
{
"exceptMethods": [
"render",
"getInitialState",
"getDefaultProps",
"getChildContext",
"componentWillMount",
"UNSAFE_componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"UNSAFE_componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"UNSAFE_componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount",
"componentDidCatch",
"getSnapshotBeforeUpdate"
]
}
],
"curly": [1, "multi-line"],
"import/no-amd": 2,
"import/no-commonjs": 2,
"import/no-nodejs-modules": 2,
"import/prefer-default-export": 0,
"no-debugger": 1,
"no-param-reassign": [1, { "props": false }],
"no-unused-vars": [
1,
{ "args": "all", "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
],
"no-use-before-define": [2, { "functions": false, "variables": false }],
"prettier/prettier": 1,
"react/display-name": 0,
"react/jsx-no-undef": [2, { "allowGlobals": true }],
"react/prop-types": 0,
"vars-on-top": 0,
"consistent-return": 0
},
"overrides": [
{
"files": ["src/index.js"],
"rules": { "import/first": 0 }
},
{
"files": ["webpack.config.*"],
"rules": {
"import/no-commonjs": 0,
"import/no-nodejs-modules": 0
}
},
{
"files": ["src/prerender_content.js", "src/prerenderContent/*.js"],
"rules": {
"import/no-nodejs-modules": 0,
"no-console": 0
}
}
]
}