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-multiple-empty-lines': ['error', { 'max': 1 }],
|
||||
'no-trailing-spaces': ['error'],
|
||||
'no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
||||
'no-unused-vars': ['error', { 'vars': 'all', 'args': 'none', 'ignoreRestSiblings': true }],
|
||||
'@babel/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
||||
//'no-unused-vars': ['error', { 'vars': 'all', 'args': 'none', 'ignoreRestSiblings': true }],
|
||||
'one-var': ['error', 'never'],
|
||||
'padded-blocks': ['error', 'never'],
|
||||
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
|
||||
'semi': ['error'],
|
||||
'@babel/semi': ['error'],
|
||||
'space-before-blocks': ['error'],
|
||||
'space-infix-ops': 'error',
|
||||
'yoda': 'error'
|
||||
|
@ -105,6 +105,7 @@ module.exports = {
|
|||
// TODO: Fix warnings and remove these rules
|
||||
'no-redeclare': ['off'],
|
||||
'no-useless-escape': ['off'],
|
||||
'no-unused-vars': ['off'],
|
||||
// TODO: Remove after ES6 migration is complete
|
||||
'import/no-unresolved': ['off']
|
||||
},
|
||||
|
|
|
@ -1117,7 +1117,7 @@ import 'programStyles';
|
|||
function importRefreshIndicator() {
|
||||
if (!refreshIndicatorLoaded) {
|
||||
refreshIndicatorLoaded = true;
|
||||
/* eslint-disable-next-line no-unused-expressions */
|
||||
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||
import('emby-itemrefreshindicator');
|
||||
}
|
||||
}
|
||||
|
@ -1449,7 +1449,7 @@ import 'programStyles';
|
|||
const userData = item.UserData || {};
|
||||
|
||||
if (itemHelper.canMarkPlayed(item)) {
|
||||
/* eslint-disable-next-line no-unused-expressions */
|
||||
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||
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>';
|
||||
}
|
||||
|
@ -1457,7 +1457,7 @@ import 'programStyles';
|
|||
if (itemHelper.canRate(item)) {
|
||||
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');
|
||||
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}
|
||||
*/
|
||||
name
|
||||
name;
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
|
@ -730,7 +730,7 @@ function tryRemoveElement(elem) {
|
|||
const elem = e.target;
|
||||
this.destroyCustomTrack(elem);
|
||||
onEndedInternal(this, elem, this.onError);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -760,7 +760,7 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
|
||||
events.trigger(this, 'timeupdate');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -773,7 +773,7 @@ function tryRemoveElement(elem) {
|
|||
const elem = e.target;
|
||||
saveVolume(elem.volume);
|
||||
events.trigger(this, 'volumechange');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -785,7 +785,7 @@ function tryRemoveElement(elem) {
|
|||
|
||||
this.onStartedAndNavigatedToOsd();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -832,14 +832,14 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
}
|
||||
events.trigger(this, 'playing');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onPlay = () => {
|
||||
events.trigger(this, 'unpause');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -865,21 +865,21 @@ function tryRemoveElement(elem) {
|
|||
*/
|
||||
onClick = () => {
|
||||
events.trigger(this, 'click');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onDblClick = () => {
|
||||
events.trigger(this, 'dblclick');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
onPause = () => {
|
||||
events.trigger(this, 'pause');
|
||||
}
|
||||
};
|
||||
|
||||
onWaiting() {
|
||||
events.trigger(this, 'waiting');
|
||||
|
@ -929,7 +929,7 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
|
||||
onErrorInternal(this, type);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
|
|
@ -302,7 +302,7 @@ import 'material-icons';
|
|||
$(document).on('itemsaved', '.metadataEditorPage', function (e, item) {
|
||||
updateEditorNode(this, item);
|
||||
}).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');
|
||||
}).on('pagebeforeshow', '.metadataEditorPage', function () {
|
||||
var page = this;
|
||||
|
|
|
@ -155,7 +155,7 @@ export function enable() {
|
|||
function attachGamepadScript(e) {
|
||||
console.log('Gamepad connected! Attaching gamepadtokey.js script');
|
||||
window.removeEventListener('gamepadconnected', attachGamepadScript);
|
||||
/* eslint-disable-next-line no-unused-expressions */
|
||||
/* eslint-disable-next-line @babel/no-unused-expressions */
|
||||
import('scripts/gamepadtokey');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue