forked from brettz9/eslint-config-ash-nazg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsauron.js
69 lines (65 loc) · 2.21 KB
/
sauron.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
module.exports = {
extends: ["./"],
settings: {
jsdoc: {
preferredTypes: {
"*": {
message: "Use a more precise type or if necessary use `any` or `ArbitraryCallbackResult`",
replacement: "any"
},
Any: {
message: "Use a more precise type or if necessary use `any` or `ArbitraryCallbackResult`",
replacement: "any"
},
Function: {
message: "Point to a `@callback` namepath or `GenericCallback` if truly arbitrary in form",
replacement: "GenericCallback"
},
Promise: {
message: "Specify the specific Promise type, including, if necessary, the type `Any`",
},
".<>": {
message: "Prefer type form without dot",
replacement: "<>"
},
object: {
message: "Use the specific object type or `PlainObject` if truly arbitrary",
replacement: "PlainObject"
},
Array: {
message: "Use `GenericArray` if it is truly arbitrary.",
replacement: "GenericArray"
}
}
}
},
rules: {
"class-methods-use-this": ["warn"],
"consistent-this": ["warn"],
"default-case": ["warn"],
"max-len": ["warn", {
"ignoreUrls": true,
"ignoreRegExpLiterals": true
}],
"no-alert": ["warn"],
"no-console": ["warn"],
"no-empty-function": ["warn"],
"no-shadow": ["warn", {"builtinGlobals": true, "hoist": "functions", "allow": ["parent", "top", "open", "close", "stop", "blur", "status", "name", "closed", "start"]}],
"prefer-named-capture-group": ["warn"],
"prefer-numeric-literals": ["warn"],
"require-unicode-regexp": ["warn"],
"vars-on-top": ["warn"],
"import/unambiguous": "warn",
"import/no-commonjs": "warn",
"jsdoc/require-jsdoc": ["warn"],
"jsdoc/require-returns": ["warn", {forceRequireReturn: true}],
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/avoid-new": "warn",
"promise/no-return-in-finally": "warn",
"promise/valid-params": "warn",
"promise/prefer-await-to-callbacks": "warn",
"unicorn/no-fn-reference-in-iterator": "warn"
}
};