diff --git a/.eslintrc.js b/.eslintrc.js
index ff12e198c3..c9d5ed917c 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -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']
},
diff --git a/src/components/cardbuilder/cardBuilder.js b/src/components/cardbuilder/cardBuilder.js
index 4a37331ef4..64cc7dab9b 100644
--- a/src/components/cardbuilder/cardBuilder.js
+++ b/src/components/cardbuilder/cardBuilder.js
@@ -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 += '';
}
@@ -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 += '';
}
diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js
index d52f0eb5b3..7789061677 100644
--- a/src/plugins/htmlVideoPlayer/plugin.js
+++ b/src/plugins/htmlVideoPlayer/plugin.js
@@ -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
diff --git a/src/scripts/editorsidebar.js b/src/scripts/editorsidebar.js
index 2489335969..d10407c7bb 100644
--- a/src/scripts/editorsidebar.js
+++ b/src/scripts/editorsidebar.js
@@ -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;
diff --git a/src/scripts/keyboardNavigation.js b/src/scripts/keyboardNavigation.js
index 10a9611c33..ec354a7ba3 100644
--- a/src/scripts/keyboardNavigation.js
+++ b/src/scripts/keyboardNavigation.js
@@ -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');
}