-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
90 lines (88 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
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true,
},
"extends": "eslint:recommended",
"globals": {
"$": "readonly",
"CONFIG_FILE_NAME": "readonly",
"IS_DEV": "readonly",
"IS_TEST": "readonly",
"IS_SINGLE": "readonly",
"LANG_CODE": "readonly",
"OO": "readonly",
"convenientDiscussions": "readonly",
"jest": "readonly",
"expect": "readonly",
"mw": "readonly",
"require": "readonly",
"getUrlFromInterwikiLink": "readonly", // en:User:Jack who built the house/getUrlFromInterwikiLink.js
"getInterwikiPrefixForHostname": "readonly", // en:User:Jack who built the house/getUrlFromInterwikiLink.js
"getInterwikiPrefixForHostnameSync": "readonly", // en:User:Jack who built the house/getUrlFromInterwikiLink.js
},
"ignorePatterns": ["dist/**", "misc/**", "*.json5", "w-he.js"],
"overrides": [
{
"files": ["./*", "src/tribute/**", "jsdoc/**", "*.test.js"],
"rules": {
"jsdoc/require-jsdoc": "off",
"import/order": "off",
},
},
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"requireConfigFile": false,
},
"plugins": [
"jsdoc",
"import",
],
"rules": {
"jsdoc/check-alignment": "warn",
"jsdoc/check-param-names": "warn",
"jsdoc/check-tag-names": "warn",
"jsdoc/check-types": "warn",
"jsdoc/implements-on-classes": "warn",
"jsdoc/require-jsdoc": ["warn", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ClassExpression": true,
},
}],
"jsdoc/require-param": "warn",
// "jsdoc/require-param-description": "warn",
"jsdoc/require-param-name": "warn",
"jsdoc/require-param-type": "warn",
"jsdoc/require-returns": "warn",
"jsdoc/require-returns-check": "warn",
// "jsdoc/require-returns-description": "warn",
"jsdoc/require-returns-type": "warn",
"jsdoc/tag-lines": [
"warn",
"any",
{
startLines: 1,
},
],
// Produces a lot of strange errors, doesn't support `external:`
"jsdoc/valid-types": "off",
"jsdoc/no-undefined-types": "off",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-control-regex": "off",
"import/order": ["warn", {
"alphabetize": {
caseInsensitive: false,
order: "asc",
},
"newlines-between": "always",
}],
},
};