forked from GrosSacASac/JavaScript-Set-Up
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
91 lines (86 loc) · 2.81 KB
/
Copy pathindex.js
File metadata and controls
91 lines (86 loc) · 2.81 KB
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
91
/* eslint config to be used with eslint:recommended
0 "off"
1 "warning"
2 "error"
*/
module.exports = {
"extends": "eslint:recommended",
"rules": {
// overwrite
"no-unused-vars": 1,
"curly": 2,
"eqeqeq": 2,
"no-caller": 2,
"no-else-return": [2, { allowElseIf: false }],
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-label": 2,
"no-implicit-coercion": 2,
"no-lone-blocks": 2,
"no-magic-numbers": [1, { "ignore": [-2, -1, 0, 1, 2] }],
"no-multi-str": 2,
"no-new-wrappers": 2,
"no-octal-escape": 2,
"no-proto": 2,
"no-return-assign": [2, "always"],
"no-return-await": 2,
"no-sequences": 2,
"no-unmodified-loop-condition": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-void": 2,
// disable builtinGlobals for now because it also protects deprecated globals
// https://github.com/eslint/eslint/issues/12167
"no-shadow": [1, { "builtinGlobals": false, hoist: "all" }],
"max-params": [1, { max: 6 }],
"max-depth": [1, { max: 10 }],
"max-statements-per-line": [2, { max: 1 }],
"new-parens": 2,
"no-array-constructor": 2,
"no-multi-assign": 2,
"no-ternary": 2,
"no-plusplus": 2,
"no-restricted-syntax": [
"error",
{
"selector": "FunctionDeclaration",
"message": `Do not use a function declaration. Use a function expression instead:
const x = function () {
};
`
},
{
"selector": "ExportDefaultDeclaration",
"message": "Do not use default export. Use named exports instead."
},
{
"selector": "YieldExpression",
"message": "Use regular functions that return a functions that closes over a variable instead of generators"
},
"WithStatement",
"BinaryExpression[operator='in']",
"ClassDeclaration",
"ClassExpression",
"SwitchStatement",
"ThisExpression",
]
,
"quotes": [2, "backtick", { "avoidEscape": false }],
"semi": [2, "always"],
"semi-style": [2, "last"],
"space-infix-ops": [2, { "int32Hint": false }],
"arrow-body-style": [2, "always"],
"no-var": 2,
"object-shorthand": [2, "properties"],
"prefer-const": [2, { "ignoreReadBeforeAssign": false }],
"prefer-destructuring": [1, {
"array": false,
"object": true
}, {
"enforceForRenamedProperties": false
}],
"prefer-rest-params": 2,
"prefer-spread": 2,
"comma-dangle": [2, "always-multiline"]
}
};