-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy patheslint.config.mjs
More file actions
61 lines (54 loc) · 1.7 KB
/
eslint.config.mjs
File metadata and controls
61 lines (54 loc) · 1.7 KB
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
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
const compat = new FlatCompat({
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default defineConfig([{
extends: compat.extends(
"wikimedia/mediawiki",
"wikimedia/client/common",
"wikimedia/language/es2020",
"wikimedia/jquery",
),
files: ["javascript/**/*.js"],
languageOptions: {
globals: {
...globals.jquery,
liquipedia: "readonly",
echarts: "readonly",
_paq: "readonly",
gtag: "readonly",
Share: "readonly",
},
},
rules: {
"space-before-function-paren": "off",
"no-jquery/no-global-selector": "off",
"vars-on-top": "off",
"one-var": "off",
"es/no-array-from": "off",
"mediawiki/class-doc": "off",
"mediawiki/no-nodelist-unsupported-methods": "off",
"mediawiki/no-unlabeled-buttonwidget": "off",
"es-x/no-block-scoped-variables": "off",
"es-x/no-string-prototype-startswith": "off",
"es-x/no-string-prototype-includes": "off",
"es-x/no-array-prototype-includes": "off",
"es-x/no-array-prototype-findindex": "off",
"es-x/no-spread-elements": "off",
"es-x/no-property-shorthands": "off",
"compat/compat": [
"error",
"> 0.5% and baseline widely available"
],
"jsdoc/check-tag-names": ["error", {
definedTags: ["jest-environment"],
}],
"max-len": ["warn", {
code: 120,
}],
},
}]);