This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
88 lines (69 loc) · 2.65 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
{
parserOptions: {
ecmaVersion: 5,
sourceType: "script"
},
// To minimize dependencies on Node- or browser-specific features, leave the
// env empty, and instead define globals as needed.
"env": {},
"extends": "google",
// Project-wide globals. If other globals are necessary, prefer putting them
// in a comment at the top of the file rather than adding them here.
"globals": {
"console": true,
"exports": true,
"module": true,
"require": true,
},
"plugins": [
"camelcase-ohm",
"no-extension-in-require",
"tape"
],
rules: {
arrow-parens: "off",
// Enforce "one true brace style", allowing start and end braces to be on the same line.
brace-style: ["error", "1tbs", {allowSingleLine: true}],
// Turn off the regular camelcase rule, and use a custom rule which
// allows semantic actions to be named like `RuleName_caseName`.
camelcase: 0,
camelcase-ohm/camelcase-ohm: 2,
comma-dangle: ["error", "never"], // Disallow trailing commas.
consistent-this: 0,
default-case: 0,
// Allow use of `==` and `!=` only with null.
eqeqeq: ["error", "allow-null"],
guard-for-in: 0,
max-len: ["error", {code: 100, ignoreUrls: true}],
max-statements-per-line: ["error", {max: 2}],
// Don't require `new` when calling functions whose name starts with a capital letter.
new-cap: ["error", {capIsNew: false}],
no-console: 2,
no-constant-condition: 0, // Allow things like `while(true)`.
no-else-return: 0, // Allow `else` after a return statement.
no-eq-null: 0,
no-invalid-this: 0, // Allow `this` outside of classes.
// Don't allow require() statements to include the '.js' extension.
no-extension-in-require/main: 2,
no-implicit-coercion: 0,
no-negated-condition: 0,
no-nested-ternary: 0,
// Allow unused parameters, but not unused variables.
no-unused-vars: ["error", {vars: "all", args: "none"}],
no-warning-comments: ["error", {terms: ["xxx", "fixme"]}],
operator-linebreak: ["error", "after", {overrides: { ":": "ignore", "?": "ignore"}}],
padded-blocks: 0,
quotes: ["error", "single", "avoid-escape"],
radix: 0,
require-jsdoc: 0,
"strict": ["error", "global"],
tape/no-only-test: 2, // Don't allow `test.only`
// We would use `["error", "never", {exceptRange: true}]` here, but it doesn't seem to work.
yoda: 0,
// The following rules suggest replacing certain patterns with ES6 features.
// They are disabled for now, but we should consider enabling them if/when we move to ES6.
no-var: 0, // Allow the `var` keyword.
prefer-rest-params: 0,
prefer-spread: 0
}
}