Merge pull request #3244 from thornbill/eslint-empty-functions

Add eslint rule for empty functions
This commit is contained in:
Bill Thornton 2022-03-02 09:32:33 -05:00 committed by GitHub
commit 682295bde0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 30 additions and 48 deletions

View file

@ -166,7 +166,6 @@ function Guide(options) {
stopAutoRefresh();
Events.off(serverNotifications, 'TimerCreated', onTimerCreated);
Events.off(serverNotifications, 'SeriesTimerCreated', onSeriesTimerCreated);
Events.off(serverNotifications, 'TimerCancelled', onTimerCancelled);
Events.off(serverNotifications, 'SeriesTimerCancelled', onSeriesTimerCancelled);
@ -1057,9 +1056,6 @@ function Guide(options) {
}
}
function onSeriesTimerCreated() {
}
function onTimerCancelled(e, apiClient, data) {
const id = data.Id;
// find guide cells by timer id, remove timer icon
@ -1186,7 +1182,6 @@ function Guide(options) {
Events.trigger(self, 'load');
Events.on(serverNotifications, 'TimerCreated', onTimerCreated);
Events.on(serverNotifications, 'SeriesTimerCreated', onSeriesTimerCreated);
Events.on(serverNotifications, 'TimerCancelled', onTimerCancelled);
Events.on(serverNotifications, 'SeriesTimerCancelled', onSeriesTimerCancelled);

View file

@ -3322,6 +3322,7 @@ class PlaybackManager {
mediaSource.MediaStreams = info.MediaStreams;
Events.trigger(player, 'mediastreamschange');
}, function () {
// Swallow errors
});
}

View file

@ -183,14 +183,14 @@ class GenericPlayer {
* Unpauses the player.
*/
localUnpause() {
// Override
}
/**
* Pauses the player.
*/
localPause() {
// Override
}
/**
@ -199,14 +199,14 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localSeek(positionTicks) {
// Override
}
/**
* Stops the player.
*/
localStop() {
// Override
}
/**
@ -215,7 +215,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localSendCommand(command) {
// Override
}
/**
@ -224,7 +224,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localPlay(options) {
// Override
}
/**
@ -233,7 +233,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localSetCurrentPlaylistItem(playlistItemId) {
// Override
}
/**
@ -242,7 +242,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localRemoveFromPlaylist(playlistItemIds) {
// Override
}
/**
@ -252,7 +252,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localMovePlaylistItem(playlistItemId, newIndex) {
// Override
}
/**
@ -261,7 +261,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localQueue(options) {
// Override
}
/**
@ -270,21 +270,21 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localQueueNext(options) {
// Override
}
/**
* Picks next item in playlist.
*/
localNextItem() {
// Override
}
/**
* Picks previous item in playlist.
*/
localPreviousItem() {
// Override
}
/**
@ -293,7 +293,7 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localSetRepeatMode(value) {
// Override
}
/**
@ -302,14 +302,14 @@ class GenericPlayer {
*/
// eslint-disable-next-line no-unused-vars
localSetQueueShuffleMode(value) {
// Override
}
/**
* Toggles shuffle mode.
*/
localToggleQueueShuffleMode() {
// Override
}
}

View file

@ -23,10 +23,6 @@ function onViewDestroy() {
this.initialTabIndex = null;
}
function onBeforeTabChange() {
}
class TabbedView {
constructor(view, params) {
this.tabControllers = [];
@ -79,7 +75,7 @@ class TabbedView {
view.addEventListener('viewbeforehide', this.onPause.bind(this));
view.addEventListener('viewbeforeshow', function () {
mainTabsManager.setTabs(view, currentTabIndex, self.getTabs, getTabContainers, onBeforeTabChange, onTabChange, false);
mainTabsManager.setTabs(view, currentTabIndex, self.getTabs, getTabContainers, null, onTabChange, false);
});
view.addEventListener('viewshow', function (e) {

View file

@ -56,8 +56,6 @@ function showIfAllowed(context, selector, visible) {
}
class ViewSettings {
constructor() {
}
show(options) {
return new Promise(function (resolve, reject) {
const dialogOptions = {