forked from sdawood/json-tots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
99 lines (99 loc) · 3.92 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
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
92
93
94
95
96
97
98
99
// Available settings at http://eslint.org/docs/user-guide/configuring
module.exports = {
"ecmaVersion": "6",
"parser": "babel-eslint",
"ecmaFeatures": {
"impliedStrict": true
},
"env": {
"es6": true,
"node": true,
"jest": true
},
"extends": [
"eslint:all"
],
"rules": {
// Rules definitions at http://eslint.org/docs/rules/
// Overrides for "all" profile
"arrow-body-style": "warn",
"arrow-parens": ["off", "as-needed", { "requireForBlockBody": true }],
"complexity": ["warn", 5], // Valid use cases exist
"consistent-return" : "off",
"curly": "warn",
"dot-location": ["error", "property"],
"dot-notation" : "off",
"func-names" : "off",
"func-style" : "off",
"global-require": "warn",
"generator-star-spacing": ["error", "both"],
"guard-for-in": "warn",
"id-length" : "off",
"init-declarations" : "off",
"line-comment-position" : "off",
"max-len" : ["warn", {"code": 160, "ignoreComments": true}],
"max-lines" : "warn",
"max-params" : ["warn", 5],
"max-statements" : "warn",
"multiline-ternary" : "off",
"newline-after-var" : "off",
"newline-before-return" : "off",
"newline-per-chained-call" : ["error", { ignoreChainWithDepth: 3 }],
"no-console": "warn",
"no-else-return" : "off",
"no-extra-parens": ["error", "functions"],
"no-inline-comments" : "off", // Valid use cases exist, e.g. <-- this
"no-magic-numbers": "warn",
"no-process-env" : "off",
"no-prototype-builtins" : "off",
"no-return-assign": "warn",
"no-shadow": "warn",
"no-sync": "warn",
"no-ternary" : "off",
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"no-undefined": "warn", // Keep? undefined triggers default function arguments, null doesn't
"no-unused-vars": "warn",
"no-use-before-define" : "off",
"no-warning-comments": "warn",
"object-curly-newline" : ["off", { "multiline": true, "minProperties": 2 }],
"object-curly-spacing" : "off",
"object-property-newline" : "off",
"object-shorthand": "warn",
"one-var" : ["error", "never"],
"operator-linebreak" : ["error", "after"],
"prefer-promise-reject-errors": "warn",
"quote-props" : ["warn", "as-needed"],
"quotes" : ["warn", "single"],
"padded-blocks" : "off",
"require-await": "off", // Async function is a contract for returning a promise, and a clean way to create one.
"require-jsdoc" : "off",
"sort-keys" : "off", // No value
"space-before-function-paren" : "off",
"strict" : "off",
/* Quiet down rules temporarily */
"no-underscore-dangle": "warn", // Builtin streams use that
"valid-jsdoc": "warn", // Not currently used in Siren
"no-empty-function": "warn", // Valid use cases exist
"no-invalid-this": "warn", // Under evaluation
"consistent-this": "warn",
"capitalized-comments": "off",
"comma-dangle": "warn", // Was recently supported in arrays and object literals to minimize merge-lines
"prefer-destructuring": "warn",
"no-plusplus": "off",
"callback-return": "warn",
"spaced-comment": "warn",
"lines-around-comment": "warn",
"no-await-in-loop": "warn",
"no-param-reassign": "warn",
"no-negated-condition": "off",
"no-nested-ternary": "off",
"no-confusing-arrow": ["warn", {"allowParens": true}],
"no-continue": "off",
"no-return-await": "off",
"no-extend-native": "warn",
"no-constant-condition": "warn",
"no-useless-escape": "warn", //complains about escape inside regex
"no-implicit-coercion": "warn",
"wrap-regex" : "warn"
},
};