mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix linting errors
This commit is contained in:
parent
ca5f194ee6
commit
4cd83e6f73
5 changed files with 20 additions and 19 deletions
|
@ -40,12 +40,12 @@ module.exports = {
|
||||||
'no-multi-spaces': ['error'],
|
'no-multi-spaces': ['error'],
|
||||||
'no-multiple-empty-lines': ['error', { 'max': 1 }],
|
'no-multiple-empty-lines': ['error', { 'max': 1 }],
|
||||||
'no-trailing-spaces': ['error'],
|
'no-trailing-spaces': ['error'],
|
||||||
'no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
'@babel/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
||||||
'no-unused-vars': ['error', { 'vars': 'all', 'args': 'none', 'ignoreRestSiblings': true }],
|
//'no-unused-vars': ['error', { 'vars': 'all', 'args': 'none', 'ignoreRestSiblings': true }],
|
||||||
'one-var': ['error', 'never'],
|
'one-var': ['error', 'never'],
|
||||||
'padded-blocks': ['error', 'never'],
|
'padded-blocks': ['error', 'never'],
|
||||||
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
|
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
|
||||||
'semi': ['error'],
|
'@babel/semi': ['error'],
|
||||||
'space-before-blocks': ['error'],
|
'space-before-blocks': ['error'],
|
||||||
'space-infix-ops': 'error',
|
'space-infix-ops': 'error',
|
||||||
'yoda': 'error'
|
'yoda': 'error'
|
||||||
|
@ -105,6 +105,7 @@ module.exports = {
|
||||||
// TODO: Fix warnings and remove these rules
|
// TODO: Fix warnings and remove these rules
|
||||||
'no-redeclare': ['off'],
|
'no-redeclare': ['off'],
|
||||||
'no-useless-escape': ['off'],
|
'no-useless-escape': ['off'],
|
||||||
|
'no-unused-vars': ['off'],
|
||||||
// TODO: Remove after ES6 migration is complete
|
// TODO: Remove after ES6 migration is complete
|
||||||
'import/no-unresolved': ['off']
|
'import/no-unresolved': ['off']
|
||||||
},
|
},
|
||||||
|
|
|
@ -1117,7 +1117,7 @@ import 'programStyles';
|
||||||
function importRefreshIndicator() {
|
function importRefreshIndicator() {
|
||||||
if (!refreshIndicatorLoaded) {
|
if (!refreshIndicatorLoaded) {
|
||||||
refreshIndicatorLoaded = true;
|
refreshIndicatorLoaded = true;
|
||||||
/* eslint-disable-next-line no-unused-expressions */
|
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||||
import('emby-itemrefreshindicator');
|
import('emby-itemrefreshindicator');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1449,7 +1449,7 @@ import 'programStyles';
|
||||||
const userData = item.UserData || {};
|
const userData = item.UserData || {};
|
||||||
|
|
||||||
if (itemHelper.canMarkPlayed(item)) {
|
if (itemHelper.canMarkPlayed(item)) {
|
||||||
/* eslint-disable-next-line no-unused-expressions */
|
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||||
import('emby-playstatebutton');
|
import('emby-playstatebutton');
|
||||||
html += '<button is="emby-playstatebutton" type="button" data-action="none" class="' + btnCssClass + '" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-itemtype="' + item.Type + '" data-played="' + (userData.Played) + '"><span class="material-icons cardOverlayButtonIcon cardOverlayButtonIcon-hover check"></span></button>';
|
html += '<button is="emby-playstatebutton" type="button" data-action="none" class="' + btnCssClass + '" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-itemtype="' + item.Type + '" data-played="' + (userData.Played) + '"><span class="material-icons cardOverlayButtonIcon cardOverlayButtonIcon-hover check"></span></button>';
|
||||||
}
|
}
|
||||||
|
@ -1457,7 +1457,7 @@ import 'programStyles';
|
||||||
if (itemHelper.canRate(item)) {
|
if (itemHelper.canRate(item)) {
|
||||||
const likes = userData.Likes == null ? '' : userData.Likes;
|
const likes = userData.Likes == null ? '' : userData.Likes;
|
||||||
|
|
||||||
/* eslint-disable-next-line no-unused-expressions */
|
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||||
import('emby-ratingbutton');
|
import('emby-ratingbutton');
|
||||||
html += '<button is="emby-ratingbutton" type="button" data-action="none" class="' + btnCssClass + '" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-itemtype="' + item.Type + '" data-likes="' + likes + '" data-isfavorite="' + (userData.IsFavorite) + '"><span class="material-icons cardOverlayButtonIcon cardOverlayButtonIcon-hover favorite"></span></button>';
|
html += '<button is="emby-ratingbutton" type="button" data-action="none" class="' + btnCssClass + '" data-id="' + item.Id + '" data-serverid="' + item.ServerId + '" data-itemtype="' + item.Type + '" data-likes="' + likes + '" data-isfavorite="' + (userData.IsFavorite) + '"><span class="material-icons cardOverlayButtonIcon cardOverlayButtonIcon-hover favorite"></span></button>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ function tryRemoveElement(elem) {
|
||||||
/**
|
/**
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
name
|
name;
|
||||||
/**
|
/**
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
@ -730,7 +730,7 @@ function tryRemoveElement(elem) {
|
||||||
const elem = e.target;
|
const elem = e.target;
|
||||||
this.destroyCustomTrack(elem);
|
this.destroyCustomTrack(elem);
|
||||||
onEndedInternal(this, elem, this.onError);
|
onEndedInternal(this, elem, this.onError);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
@ -760,7 +760,7 @@ function tryRemoveElement(elem) {
|
||||||
}
|
}
|
||||||
|
|
||||||
events.trigger(this, 'timeupdate');
|
events.trigger(this, 'timeupdate');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
@ -773,7 +773,7 @@ function tryRemoveElement(elem) {
|
||||||
const elem = e.target;
|
const elem = e.target;
|
||||||
saveVolume(elem.volume);
|
saveVolume(elem.volume);
|
||||||
events.trigger(this, 'volumechange');
|
events.trigger(this, 'volumechange');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
@ -785,7 +785,7 @@ function tryRemoveElement(elem) {
|
||||||
|
|
||||||
this.onStartedAndNavigatedToOsd();
|
this.onStartedAndNavigatedToOsd();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
@ -832,14 +832,14 @@ function tryRemoveElement(elem) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
events.trigger(this, 'playing');
|
events.trigger(this, 'playing');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onPlay = () => {
|
onPlay = () => {
|
||||||
events.trigger(this, 'unpause');
|
events.trigger(this, 'unpause');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
@ -865,21 +865,21 @@ function tryRemoveElement(elem) {
|
||||||
*/
|
*/
|
||||||
onClick = () => {
|
onClick = () => {
|
||||||
events.trigger(this, 'click');
|
events.trigger(this, 'click');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onDblClick = () => {
|
onDblClick = () => {
|
||||||
events.trigger(this, 'dblclick');
|
events.trigger(this, 'dblclick');
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onPause = () => {
|
onPause = () => {
|
||||||
events.trigger(this, 'pause');
|
events.trigger(this, 'pause');
|
||||||
}
|
};
|
||||||
|
|
||||||
onWaiting() {
|
onWaiting() {
|
||||||
events.trigger(this, 'waiting');
|
events.trigger(this, 'waiting');
|
||||||
|
@ -929,7 +929,7 @@ function tryRemoveElement(elem) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onErrorInternal(this, type);
|
onErrorInternal(this, type);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
|
|
@ -302,7 +302,7 @@ import 'material-icons';
|
||||||
$(document).on('itemsaved', '.metadataEditorPage', function (e, item) {
|
$(document).on('itemsaved', '.metadataEditorPage', function (e, item) {
|
||||||
updateEditorNode(this, item);
|
updateEditorNode(this, item);
|
||||||
}).on('pagebeforeshow', '.metadataEditorPage', function () {
|
}).on('pagebeforeshow', '.metadataEditorPage', function () {
|
||||||
/* eslint-disable-next-line no-unused-expressions */
|
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||||
import('css!assets/css/metadataeditor.css');
|
import('css!assets/css/metadataeditor.css');
|
||||||
}).on('pagebeforeshow', '.metadataEditorPage', function () {
|
}).on('pagebeforeshow', '.metadataEditorPage', function () {
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
|
@ -155,7 +155,7 @@ export function enable() {
|
||||||
function attachGamepadScript(e) {
|
function attachGamepadScript(e) {
|
||||||
console.log('Gamepad connected! Attaching gamepadtokey.js script');
|
console.log('Gamepad connected! Attaching gamepadtokey.js script');
|
||||||
window.removeEventListener('gamepadconnected', attachGamepadScript);
|
window.removeEventListener('gamepadconnected', attachGamepadScript);
|
||||||
/* eslint-disable-next-line no-unused-expressions */
|
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||||
import('scripts/gamepadtokey');
|
import('scripts/gamepadtokey');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue