mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Enable eslint sonar prefer-object-literal
This commit is contained in:
parent
9d8f9c806c
commit
e0013915fd
6 changed files with 26 additions and 31 deletions
|
@ -75,8 +75,7 @@ module.exports = {
|
|||
|
||||
'sonarjs/cognitive-complexity': ['warn'],
|
||||
// TODO: Enable the following rules and fix issues
|
||||
'sonarjs/no-duplicate-string': ['off'],
|
||||
'sonarjs/prefer-object-literal': ['off']
|
||||
'sonarjs/no-duplicate-string': ['off']
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
|
|
|
@ -26,11 +26,7 @@ import template from './imageeditor.template.html';
|
|||
let hasChanges = false;
|
||||
|
||||
function getBaseRemoteOptions() {
|
||||
const options = {};
|
||||
|
||||
options.itemId = currentItem.Id;
|
||||
|
||||
return options;
|
||||
return { itemId: currentItem.Id };
|
||||
}
|
||||
|
||||
function reload(page, item, focusContext) {
|
||||
|
|
|
@ -3609,9 +3609,10 @@ class PlaybackManager {
|
|||
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
|
||||
const options = {};
|
||||
options.UserId = apiClient.getCurrentUserId();
|
||||
options.Limit = 200;
|
||||
const options = {
|
||||
UserId: apiClient.getCurrentUserId(),
|
||||
Limit: 200
|
||||
};
|
||||
|
||||
const instance = this;
|
||||
|
||||
|
|
|
@ -25,17 +25,15 @@ import template from './subtitlesettings.template.html';
|
|||
*/
|
||||
|
||||
function getSubtitleAppearanceObject(context) {
|
||||
const appearanceSettings = {};
|
||||
|
||||
appearanceSettings.textSize = context.querySelector('#selectTextSize').value;
|
||||
appearanceSettings.textWeight = context.querySelector('#selectTextWeight').value;
|
||||
appearanceSettings.dropShadow = context.querySelector('#selectDropShadow').value;
|
||||
appearanceSettings.font = context.querySelector('#selectFont').value;
|
||||
appearanceSettings.textBackground = context.querySelector('#inputTextBackground').value;
|
||||
appearanceSettings.textColor = layoutManager.tv ? context.querySelector('#selectTextColor').value : context.querySelector('#inputTextColor').value;
|
||||
appearanceSettings.verticalPosition = context.querySelector('#sliderVerticalPosition').value;
|
||||
|
||||
return appearanceSettings;
|
||||
return {
|
||||
textSize: context.querySelector('#selectTextSize').value,
|
||||
textWeight: context.querySelector('#selectTextWeight').value,
|
||||
dropShadow: context.querySelector('#selectDropShadow').value,
|
||||
font: context.querySelector('#selectFont').value,
|
||||
textBackground: context.querySelector('#inputTextBackground').value,
|
||||
textColor: layoutManager.tv ? context.querySelector('#selectTextColor').value : context.querySelector('#inputTextColor').value,
|
||||
verticalPosition: context.querySelector('#sliderVerticalPosition').value
|
||||
};
|
||||
}
|
||||
|
||||
function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
||||
|
|
|
@ -7,9 +7,11 @@ import Dashboard from '../../../utils/dashboard';
|
|||
function save(page) {
|
||||
loading.show();
|
||||
const apiClient = ApiClient;
|
||||
const config = {};
|
||||
config.EnableRemoteAccess = page.querySelector('#chkRemoteAccess').checked;
|
||||
config.EnableAutomaticPortMapping = page.querySelector('#chkEnableUpnp').checked;
|
||||
const config = {
|
||||
EnableRemoteAccess: page.querySelector('#chkRemoteAccess').checked,
|
||||
EnableAutomaticPortMapping: page.querySelector('#chkEnableUpnp').checked
|
||||
};
|
||||
|
||||
apiClient.ajax({
|
||||
type: 'POST',
|
||||
data: JSON.stringify(config),
|
||||
|
|
|
@ -349,13 +349,12 @@ import browser from './browser';
|
|||
|
||||
const canPlayMkv = testCanPlayMkv(videoTestElement);
|
||||
|
||||
const profile = {};
|
||||
|
||||
profile.MaxStreamingBitrate = bitrateSetting;
|
||||
profile.MaxStaticBitrate = 100000000;
|
||||
profile.MusicStreamingTranscodingBitrate = Math.min(bitrateSetting, 384000);
|
||||
|
||||
profile.DirectPlayProfiles = [];
|
||||
const profile = {
|
||||
MaxStreamingBitrate: bitrateSetting,
|
||||
MaxStaticBitrate: 100000000,
|
||||
MusicStreamingTranscodingBitrate: Math.min(bitrateSetting, 384000),
|
||||
DirectPlayProfiles: []
|
||||
};
|
||||
|
||||
let videoAudioCodecs = [];
|
||||
let hlsInTsVideoAudioCodecs = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue