forked from danielcaldas/react-d3-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (60 loc) · 1.72 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
module.exports = {
extends: ["eslint:recommended", "plugin:jest/recommended"],
globals: {
cy: true,
Cypress: true,
document: true,
module: true,
Promise: true,
Reflect: true,
window: true,
__dirname: true,
},
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
},
},
plugins: ["standard", "promise", "react", "jest", "cypress", "babel"],
env: {
browser: true,
},
rules: {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
camelcase: "error",
"keyword-spacing": "error",
"max-len": ["error", 120, 4, { ignoreComments: true }],
"max-lines": ["error", { max: 450, skipComments: true }],
"newline-after-var": ["error", "always"],
"no-nested-ternary": "error",
"no-useless-constructor": "error",
semi: "error",
"require-jsdoc": "error",
"valid-jsdoc": [
"error",
{
prefer: {
arg: "param",
argument: "param",
class: "constructor",
return: "returns",
virtual: "abstract",
},
preferType: {
Boolean: "boolean",
Number: "number",
object: "Object",
String: "string",
Function: "Function",
},
requireReturn: true,
requireReturnType: true,
},
],
quotes: ["error", "double"],
"comma-dangle": ["error", "always-multiline"],
},
};