forked from jenkinsci/jenkins
-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.cjs
104 lines (100 loc) · 2.68 KB
/
eslint.config.cjs
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
const eslintConfigPrettier = require("eslint-config-prettier");
const globals = require("globals");
const js = require("@eslint/js");
module.exports = [
// Global ignores
{
ignores: [
"**/target/",
"**/work/",
// Node
"**/node/",
// Generated JavaScript Bundles
"**/jsbundles/",
// External scripts
".pnp.cjs",
".pnp.loader.mjs",
"war/src/main/js/plugin-setup-wizard/bootstrap-detached.js",
"war/src/main/webapp/scripts/yui/*",
],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
applyTooltip: "readonly",
AutoScroller: "readonly",
Behaviour: "readonly",
breadcrumbs: "readonly",
buildFormTree: "readonly",
CodeMirror: "readonly",
ComboBox: "readonly",
COMBOBOX_VERSION: "writeable",
createSearchBox: "readonly",
crumb: "readonly",
dialog: "readonly",
ensureVisible: "readonly",
escapeHTML: "readonly",
findAncestor: "readonly",
findAncestorClass: "readonly",
findElementsBySelector: "readonly",
findFormParent: "readonly",
fireEvent: "readonly",
Form: "readonly",
FormChecker: "readonly",
getElementOverflowParams: "readonly",
hoverNotification: "readonly",
iota: "writeable",
isInsideRemovable: "readonly",
isPageVisible: "readonly",
isRunAsTest: "readonly",
layoutUpdateCallback: "readonly",
loadScript: "readonly",
makeButton: "readonly",
notificationBar: "readonly",
object: "readonly",
objectToUrlFormEncoded: "readonly",
onSetupWizardInitialized: "readonly",
refillOnChange: "readonly",
refreshPart: "readonly",
registerSortableDragDrop: "readonly",
renderOnDemand: "readonly",
rootURL: "readonly",
safeValidateButton: "readonly",
setupWizardExtensions: "readonly",
SharedArrayBuffer: "readonly",
shortenName: "readonly",
Sortable: "readonly",
toQueryString: "readonly",
ts_refresh: "readonly",
updateOptionalBlock: "readonly",
Utilities: "readonly",
UTILITIES_VERSION: "writeable",
YAHOO: "readonly",
},
},
},
// Uses eslint default ruleset
js.configs.recommended,
eslintConfigPrettier,
{
rules: {
curly: "error",
},
},
{
files: [
"eslint.config.cjs",
"war/postcss.config.js",
"war/webpack.config.js",
".stylelintrc.js",
],
languageOptions: {
globals: {
...globals.node,
},
},
},
];