-
-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy patheslint.config.mjs
122 lines (121 loc) · 3.81 KB
/
eslint.config.mjs
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginJsdoc from "eslint-plugin-jsdoc";
export default [
pluginJs.configs.recommended,
pluginJsdoc.configs['flat/recommended-typescript-flavor'],
{
files: [
"htdocs/sw.js",
"release/htdocs/js/mympd.js"
],
plugins: {
jsdoc: pluginJsdoc
},
linterOptions: {
reportUnusedDisableDirectives: "off"
},
languageOptions: {
sourceType: "script",
globals: {
...globals.browser,
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"BSN": true,
"i18n": true,
"MediaMetadata": true
}
},
rules: {
"block-scoped-var": "error",
"camelcase": "error",
"default-case": "error",
"default-case-last": "error",
"eqeqeq": [ "error", "always", {
"null": "ignore"
}],
"semi": [ 2, "always"],
"no-alert": "error",
"no-caller": "error",
"no-console": "off",
"no-eq-null": "error",
"no-eval": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-restricted-globals": "error",
"no-restricted-properties": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-useless-concat": "error",
"no-var": "error",
"prefer-const": "error",
"jsdoc/check-syntax": 1,
"jsdoc/newline-after-description": "off",
"jsdoc/no-blank-block-descriptions": 1,
"jsdoc/no-defaults": 1,
"jsdoc/no-undefined-types": [ "warn", {
"definedTypes": [
"ChildNode",
"ParentNode"
]
}],
"jsdoc/require-returns": [ "error", {
"forceRequireReturn": true
}]
}
},
{
files: [
"release/htdocs/sw.min.js",
"release/htdocs/js/mympd.min.js",
"release/htdocs/js/i18n.min.js"
],
linterOptions: {
reportUnusedDisableDirectives: "off"
},
languageOptions: {
sourceType: "script",
globals: {
...globals.browser,
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"BSN": true,
"i18n": true,
"MediaMetadata": true
},
},
rules: {
"block-scoped-var": "error",
"camelcase": "error",
"default-case-last": "error",
"eqeqeq": [ "error", "always", {
"null": "ignore"
}],
"no-alert": "error",
"no-caller": "error",
"no-console": "off",
"no-empty": "off",
"no-eq-null": "error",
"no-eval": "error",
"no-fallthrough": "off",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-redeclare": [ "error", {
"builtinGlobals": false
}],
"no-restricted-globals": "error",
"no-restricted-properties": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-unused-vars": "off",
"no-useless-concat": "off",
"no-var": "error",
"prefer-const": "error",
"jsdoc/require-jsdoc": "off"
}
}
];