-
Notifications
You must be signed in to change notification settings - Fork 27
/
.eslintshared.js
52 lines (51 loc) · 1.57 KB
/
.eslintshared.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
// "no-restricted-properties" rules are not properly merged when just using "extends".
// Therefore we have to have this file which calls a custom merge function.
// The merge function calls Object.assign with special handling for configuration such as
// `no-restricted-properties` and `no-restricted-syntax` which are array based - ensuring the two
// values being merged are concatenated
/* eslint-disable quote-props, quotes, strict */
module.exports = {
"extends": [
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"globals": {
"$": "off",
"OO": "readonly",
"self": "off"
},
"rules": {
"no-restricted-properties": [
2,
{
"property": "done",
"message": "The method `done` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "fail",
"message": "The method `fail` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "always",
"message": "The method `always` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"object": "window",
"property": "history",
"message": "Please use mediawiki.router"
},
{
"object": "window",
"property": "location",
"message": "Please use mediawiki.router"
}
],
"object-property-newline": "error",
"computed-property-spacing": "off",
// Not using ResourceLoader modules
"mediawiki/valid-package-file-require": "off",
"no-underscore-dangle": "off",
"no-jquery/no-class-state": "off",
"no-jquery/no-global-selector": "off"
}
};