Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4087245
worker.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
worker.js
View Options
/* global eslint */
const
onmessage
=
require
(
'../common.js'
);
require
(
'@bhsd/eslint-browserify/bundle/eslint-es8.min.js'
);
const
linter
=
new
eslint
.
Linter
();
const
config
=
{
parserOptions
:
{
ecmaVersion
:
15
},
env
:
{
browser
:
true
,
es2024
:
true
},
globals
:
{
mw
:
'readonly'
,
mediaWiki
:
'readonly'
,
$
:
'readonly'
,
jQuery
:
'readonly'
,
OO
:
'readonly'
,
addOnloadHook
:
'readonly'
,
importScriptURI
:
'readonly'
,
importScript
:
'readonly'
,
importStylesheet
:
'readonly'
,
importStylesheetURI
:
'readonly'
,
RLQ
:
'readonly'
,
require
:
'readonly'
,
module
:
'readonly'
},
rules
:
{}
};
for
(
const
[
name
,
{
meta
}
]
of
linter
.
getRules
()
)
{
if
(
meta
&&
meta
.
docs
&&
meta
.
docs
.
recommended
)
{
config
.
rules
[
name
]
=
1
;
}
}
let
customConfig
=
config
;
const
setConfig
=
(
newConfig
)
=>
{
customConfig
=
Object
.
assign
(
{},
newConfig
,
{
parserOptions
:
Object
.
assign
(
{},
config
.
parserOptions
,
newConfig
.
parserOptions
),
env
:
Object
.
assign
(
{},
config
.
env
,
newConfig
.
env
),
globals
:
Object
.
assign
(
{},
config
.
globals
,
newConfig
.
globals
),
rules
:
Object
.
assign
(
{},
config
.
rules
,
newConfig
.
rules
)
}
);
};
const
getConfig
=
()
=>
customConfig
;
const
lint
=
(
code
)
=>
linter
.
verify
(
code
,
customConfig
);
onmessage
(
setConfig
,
getConfig
,
lint
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 18 2026, 09:27 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6d/75/3fae004c5d338cb4c5d8a2504be2
Default Alt Text
worker.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment