forked from webpack/webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
105 lines (105 loc) · 2.49 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
100
101
102
103
104
105
module.exports = {
root: true,
plugins: ["prettier", "node", "jest", "jsdoc"],
extends: [
"eslint:recommended",
"plugin:node/recommended",
"plugin:prettier/recommended"
],
env: {
node: true,
es6: true
},
parserOptions: {
ecmaVersion: 2018
},
rules: {
"prettier/prettier": "error",
"no-undef": "error",
"no-extra-semi": "error",
"no-template-curly-in-string": "error",
"no-caller": "error",
"no-control-regex": "off",
yoda: "error",
eqeqeq: "error",
"global-require": "off",
"brace-style": "off",
"eol-last": "error",
"no-extra-bind": "warn",
"no-process-exit": "warn",
"no-use-before-define": "off",
"no-unused-vars": ["error", { args: "none", ignoreRestSiblings: true }],
"no-unsafe-negation": "error",
"no-loop-func": "warn",
indent: "off",
"no-console": "off",
"node/no-unsupported-features": "error",
"node/no-deprecated-api": "error",
"node/no-missing-import": "error",
"node/no-missing-require": ["error", { allowModules: ["webpack"] }],
"node/no-unpublished-bin": "error",
"node/no-unpublished-require": "error",
"node/process-exit-as-throw": "error",
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
"jsdoc/check-tag-names": "error",
"jsdoc/check-param-names": "error",
"jsdoc/require-param-description": "error",
"jsdoc/require-param-name": "error",
"jsdoc/require-param-type": "error",
"jsdoc/require-param": "error",
"jsdoc/require-returns-description": "error",
"jsdoc/require-returns-type": "error",
"jsdoc/require-returns": "error"
},
settings: {
jsdoc: {
// supported tags https://github.com/microsoft/TypeScript-wiki/blob/master/JSDoc-support-in-JavaScript.md
tagNamePreference: {
...["implements", "const", "memberof", "readonly", "yields"].reduce(
(acc, tag) => {
acc[tag] = {
message: `@${tag} currently not supported in Typescript`
};
return acc;
},
{}
),
extends: "extends",
return: "returns",
constructor: "constructor",
prop: "property",
arg: "param",
augments: "extends",
description: false,
desc: false,
inheritdoc: false,
class: "constructor"
},
overrideReplacesDocs: false
}
},
overrides: [
{
files: ["lib/**/*.runtime.js", "hot/*.js"],
env: {
es6: false,
browser: true
},
globals: {
Promise: false
},
parserOptions: {
ecmaVersion: 5
}
},
{
files: ["test/**/*.js"],
env: {
"jest/globals": true
},
globals: {
nsObj: false
}
}
]
};