-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathjavascript.js
70 lines (62 loc) · 2.18 KB
/
javascript.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
module.exports = {
plugins: ["import", "unicorn"],
extends: [
"eslint:recommended",
"google",
"prettier",
],
rules: {
// Additional rules we adhere to
// handled by prettier
"indent": "off",
"space-before-function-paren": "off",
"brace-style": "off",
"max-len": "off",
"curly": ["error", "multi-line"],
"prefer-const": ["error"],
"comma-dangle": ["error", {
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "always-multiline",
}],
"arrow-spacing": ["error"],
"space-in-parens": ["error"],
// Loosen JSDoc requirements a little
"require-jsdoc": ["error", {
require: {
FunctionDeclaration: false,
}
}],
"valid-jsdoc": ["error", {
requireParamDescription: false,
requireReturn: false,
requireReturnDescription: false,
}],
// Rules we do not want from ESLint's recommended set
"no-console": ["off"],
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-useless-catch": ["off"],
"no-prototype-builtins": ["off"],
// Rules we do not want from the Google style guide
"spaced-comment": ["off"],
"guard-for-in": ["off"],
"block-spacing": ["off"],
"operator-linebreak": ["off"],
// We don't mind strange alignments in EOL comments
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"import/order": [
"error", {
"groups": [["builtin", "external"], ["internal", "parent", "sibling", "index", "object", "type"]],
"newlines-between": "always",
},
],
"import/first": "error",
"unicorn/no-instanceof-array": "error",
"quotes": ["error", "double", { avoidEscape: true }],
"object-curly-spacing": ["error", "always"],
"arrow-parens": ["error", "always"],
},
}