mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-12 09:21:11 +00:00
Silence eslint compat/compat for search performance instrumentation
Eslint is throwing compat warnings on every commit in Vector. This commit silences those warnings. Change-Id: I0e914c6179745415e916fadd382d86baa72e3e63
This commit is contained in:
parent
bea00bc290
commit
8eba1da250
|
@ -15,9 +15,11 @@ var /** @type {VectorResourceLoaderVirtualConfig} */
|
|||
// mediawiki.searchSuggest performance.
|
||||
CAN_TEST_SEARCH = !!(
|
||||
window.performance &&
|
||||
/* eslint-disable compat/compat */
|
||||
performance.mark &&
|
||||
performance.measure &&
|
||||
performance.getEntriesByName ),
|
||||
/* eslint-enable compat/compat */
|
||||
LOAD_START_MARK = 'mwVectorVueSearchLoadStart',
|
||||
LOAD_END_MARK = 'mwVectorVueSearchLoadEnd',
|
||||
LOAD_MEASURE = 'mwVectorVueSearchLoadStartToLoadEnd',
|
||||
|
|
|
@ -14,10 +14,12 @@ var INPUT_LOCATION_MOVED = 'header-moved',
|
|||
// recorded on the Vector skin and only if browser supported.
|
||||
shouldTestSearchPerformance = !!( window.performance &&
|
||||
window.requestAnimationFrame &&
|
||||
/* eslint-disable compat/compat */
|
||||
performance.mark &&
|
||||
performance.measure &&
|
||||
performance.getEntriesByName &&
|
||||
performance.clearMarks ),
|
||||
/* eslint-enable compat/compat */
|
||||
loadStartMark = 'mwVectorVueSearchLoadStart',
|
||||
queryMark = 'mwVectorVueSearchQuery',
|
||||
renderMark = 'mwVectorVueSearchRender',
|
||||
|
@ -37,6 +39,7 @@ function onFetchStart() {
|
|||
performance.clearMarks( queryMark );
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
performance.mark( queryMark );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue