1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixes for lint errors

added missing packages for lint
removed unecessary babel/polyfill
This commit is contained in:
vitorsemeano 2020-10-19 20:25:58 +01:00
parent 03e659e629
commit a48d466e6a
21 changed files with 26 additions and 31 deletions

View file

@ -10,13 +10,13 @@
"@babel/eslint-plugin": "^7.12.1", "@babel/eslint-plugin": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.10.1", "@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-private-methods": "^7.12.1", "@babel/plugin-proposal-private-methods": "^7.12.1",
"@babel/polyfill": "^7.11.5",
"@babel/preset-env": "^7.12.1", "@babel/preset-env": "^7.12.1",
"autoprefixer": "^9.8.6", "autoprefixer": "^9.8.6",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"browser-sync": "^2.26.13", "browser-sync": "^2.26.13",
"confusing-browser-globals": "^1.0.10", "confusing-browser-globals": "^1.0.10",
"clean-webpack-plugin": "^3.0.0", "clean-webpack-plugin": "^3.0.0",
"confusing-browser-globals": "^1.0.9",
"copy-webpack-plugin": "^6.0.3", "copy-webpack-plugin": "^6.0.3",
"css-loader": "^5.0.0", "css-loader": "^5.0.0",
"cssnano": "^4.1.10", "cssnano": "^4.1.10",

View file

@ -18,7 +18,7 @@ class ServerConnections extends ConnectionManager {
if (!AppInfo.isNativeApp) { if (!AppInfo.isNativeApp) {
console.debug('creating ApiClient singleton'); console.debug('creating ApiClient singleton');
var apiClient = new ApiClient( const apiClient = new ApiClient(
Dashboard.serverAddress(), Dashboard.serverAddress(),
appHost.appName(), appHost.appName(),
appHost.appVersion(), appHost.appVersion(),

View file

@ -311,7 +311,7 @@ function askForExit() {
}); });
} }
let deviceId = getDeviceId(); const deviceId = getDeviceId();
const deviceName = getDeviceName(); const deviceName = getDeviceName();
const appName = 'Jellyfin Web'; const appName = 'Jellyfin Web';
const appVersion = '10.7.0'; const appVersion = '10.7.0';

View file

@ -194,7 +194,7 @@ function initEditor(context, settings) {
} }
} }
function loadDynamicFilters(context, options) { function loadDynamicFilters(context, options) {
var apiClient = ServerConnections.getApiClient(options.serverId); const apiClient = ServerConnections.getApiClient(options.serverId);
const filterMenuOptions = Object.assign(options.filterMenuOptions, { const filterMenuOptions = Object.assign(options.filterMenuOptions, {

View file

@ -2,6 +2,8 @@ import { playbackManager } from '../playback/playbackmanager';
import nowPlayingHelper from '../playback/nowplayinghelper'; import nowPlayingHelper from '../playback/nowplayinghelper';
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
import ServerConnections from '../ServerConnections'; import ServerConnections from '../ServerConnections';
import shell from '../../scripts/shell';
/* eslint-disable indent */ /* eslint-disable indent */
// Reports media playback to the device for lock screen control // Reports media playback to the device for lock screen control

View file

@ -251,7 +251,7 @@ export function show(options) {
return showWithUser(options, player, null); return showWithUser(options, player, null);
} }
var apiClient = ServerConnections.getApiClient(currentItem.ServerId); const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
return apiClient.getCurrentUser().then(function (user) { return apiClient.getCurrentUser().then(function (user) {
return showWithUser(options, player, user); return showWithUser(options, player, user);
}); });

View file

@ -414,7 +414,7 @@ import ServerConnections from '../ServerConnections';
name: 'Original Media Info' name: 'Original Media Info'
}); });
var apiClient = ServerConnections.getApiClient(playbackManager.currentItem(player).ServerId); const apiClient = ServerConnections.getApiClient(playbackManager.currentItem(player).ServerId);
if (syncPlayManager.isSyncPlayEnabled() && apiClient.isMinServerVersion('10.6.0')) { if (syncPlayManager.isSyncPlayEnabled() && apiClient.isMinServerVersion('10.6.0')) {
categories.push({ categories.push({
stats: getSyncPlayStats(), stats: getSyncPlayStats(),

View file

@ -1,5 +1,6 @@
import globalize from '../../scripts/globalize'; import globalize from '../../scripts/globalize';
import toast from '../toast/toast'; import toast from '../toast/toast';
import Dashboard from '../../scripts/clientUtils';
export class QuickConnectSettings { export class QuickConnectSettings {
constructor() { } constructor() { }

View file

@ -17,7 +17,7 @@ import './remotecontrol.css';
import '../../elements/emby-ratingbutton/emby-ratingbutton'; import '../../elements/emby-ratingbutton/emby-ratingbutton';
import ServerConnections from '../ServerConnections'; import ServerConnections from '../ServerConnections';
import toast from '../toast/toast'; import toast from '../toast/toast';
import { appRouter } from "../appRouter"; import { appRouter } from '../appRouter';
/*eslint prefer-const: "error"*/ /*eslint prefer-const: "error"*/

View file

@ -9,6 +9,7 @@ import '../../elements/emby-select/emby-select';
import '../../elements/emby-button/emby-button'; import '../../elements/emby-button/emby-button';
import '../../assets/css/flexstyles.css'; import '../../assets/css/flexstyles.css';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../scripts/clientUtils';
import { Events } from 'jellyfin-apiclient';
export default function (page, providerId, options) { export default function (page, providerId, options) {
function reload() { function reload() {

View file

@ -6,6 +6,7 @@ import '../../elements/emby-input/emby-input';
import '../listview/listview.css'; import '../listview/listview.css';
import '../../elements/emby-button/paper-icon-button-light'; import '../../elements/emby-button/paper-icon-button-light';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../scripts/clientUtils';
import { Events } from 'jellyfin-apiclient';
export default function (page, providerId, options) { export default function (page, providerId, options) {
function getListingProvider(config, id) { function getListingProvider(config, id) {

View file

@ -99,6 +99,7 @@ function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
function getViewEventDetail(view, {state, url, options = {}}, isRestored) { function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
const index = url.indexOf('?'); const index = url.indexOf('?');
// eslint-disable-next-line compat/compat
const searchParams = new URLSearchParams(url.substring(index + 1)); const searchParams = new URLSearchParams(url.substring(index + 1));
const params = {}; const params = {};

View file

@ -1,13 +1,14 @@
import loading from '../../components/loading/loading'; import loading from '../../components/loading/loading';
import keyboardnavigation from '../../scripts/keyboardNavigation'; import keyboardnavigation from '../../scripts/keyboardNavigation';
import dialogHelper from '../../components/dialogHelper/dialogHelper'; import dialogHelper from '../../components/dialogHelper/dialogHelper';
import dom from '../../scripts/dom'; import '../../scripts/dom';
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
import './style.css'; import './style.css';
import 'material-design-icons-iconfont'; import 'material-design-icons-iconfont';
import '../../elements/emby-button/paper-icon-button-light'; import '../../elements/emby-button/paper-icon-button-light';
import ServerConnections from '../../components/ServerConnections'; import ServerConnections from '../../components/ServerConnections';
import TableOfContents from './tableOfContents'; import TableOfContents from './tableOfContents';
import browser from '../../scripts/browser';
export class BookPlayer { export class BookPlayer {
constructor() { constructor() {

View file

@ -1,4 +1,5 @@
import { Archive } from 'libarchive.js/main.js'; // eslint-disable-next-line import/named, import/namespace
import { Archive } from 'libarchive.js';
import loading from '../../components/loading/loading'; import loading from '../../components/loading/loading';
import dialogHelper from '../../components/dialogHelper/dialogHelper'; import dialogHelper from '../../components/dialogHelper/dialogHelper';
import keyboardnavigation from '../../scripts/keyboardNavigation'; import keyboardnavigation from '../../scripts/keyboardNavigation';

View file

@ -11,11 +11,11 @@ export default class PhotoPlayer {
play(options) { play(options) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
import('../../components/slideshow/slideshow').then(({default: Slideshow}) => { import('../../components/slideshow/slideshow').then(({default: Slideshow}) => {
var index = options.startIndex || 0; const index = options.startIndex || 0;
var apiClient = ServerConnections.currentApiClient(); const apiClient = ServerConnections.currentApiClient();
apiClient.getCurrentUser().then(function(result) { apiClient.getCurrentUser().then(function(result) {
var newSlideShow = new Slideshow({ const newSlideShow = new Slideshow({
showTitle: false, showTitle: false,
cover: false, cover: false,
items: options.items, items: options.items,

View file

@ -163,7 +163,7 @@ import { Events } from 'jellyfin-apiclient';
return; return;
} }
let url = filtered[0].path; const url = filtered[0].path;
import(`../strings/${url}`).then((fileContent) => { import(`../strings/${url}`).then((fileContent) => {
resolve(fileContent); resolve(fileContent);

View file

@ -73,7 +73,7 @@ window.pageIdOn = function(eventName, id, fn) {
}); });
}; };
if (self.appMode === 'cordova' || self.appMode === 'android' || self.appMode === 'standalone') { if (window.appMode === 'cordova' || window.appMode === 'android' || window.appMode === 'standalone') {
AppInfo.isNativeApp = true; AppInfo.isNativeApp = true;
} }

View file

@ -17,7 +17,7 @@ function getThemes() {
function getThemeStylesheetInfo(id) { function getThemeStylesheetInfo(id) {
return getThemes().then(themes => { return getThemes().then(themes => {
const theme = themes.find(theme => { let theme = themes.find(theme => {
return id ? theme.id === id : theme.default; return id ? theme.id === id : theme.default;
}); });

View file

@ -13,7 +13,7 @@ module.exports = merge(common, {
test: /\.js$/, test: /\.js$/,
enforce: 'pre', enforce: 'pre',
use: ['source-map-loader'] use: ['source-map-loader']
}, }
] ]
}, },
plugins: [ plugins: [

View file

@ -3,5 +3,5 @@ const merge = require('webpack-merge');
module.exports = merge(common, { module.exports = merge(common, {
mode: 'production', mode: 'production',
entry: './scripts/site.js', entry: './scripts/site.js'
}); });

View file

@ -717,14 +717,6 @@
"@babel/helper-create-regexp-features-plugin" "^7.12.1" "@babel/helper-create-regexp-features-plugin" "^7.12.1"
"@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4"
"@babel/polyfill@^7.11.5":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96"
integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==
dependencies:
core-js "^2.6.5"
regenerator-runtime "^0.13.4"
"@babel/preset-env@^7.12.1": "@babel/preset-env@^7.12.1":
version "7.12.1" version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.1.tgz#9c7e5ca82a19efc865384bb4989148d2ee5d7ac2" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.1.tgz#9c7e5ca82a19efc865384bb4989148d2ee5d7ac2"
@ -2934,7 +2926,7 @@ config-chain@^1.1.11:
ini "^1.3.4" ini "^1.3.4"
proto-list "~1.2.1" proto-list "~1.2.1"
confusing-browser-globals@^1.0.10: confusing-browser-globals@^1.0.9:
version "1.0.10" version "1.0.10"
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59"
integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==
@ -3063,11 +3055,6 @@ core-js-compat@^3.6.2:
browserslist "^4.8.5" browserslist "^4.8.5"
semver "7.0.0" semver "7.0.0"
core-js@^2.6.5:
version "2.6.11"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
core-js@^3.6.5: core-js@^3.6.5:
version "3.6.5" version "3.6.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"