From 6c61150cf28cc0e5469673b091de2e89da68ab07 Mon Sep 17 00:00:00 2001 From: "jeanchristophe.mqt@gmail.com" Date: Fri, 22 Mar 2024 23:12:07 +0100 Subject: [PATCH] Fix eslint warnings and errors --- .../ffmpegCommandRorderStreams/1.0.0/index.js | 14 ++++++++------ .../ffmpegCommandRorderStreams/1.0.0/index.ts | 16 +++++++++------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.js index 66a55bfdf..05d3231f2 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.js @@ -84,10 +84,12 @@ var plugin = function (args) { // eslint-disable-next-line no-param-reassign stream.typeIndex = index; }); - var getSimplifiedStreams = function (streams) { - return streams.map(function (stream) { - return { index: stream.typeIndex, codec_name: stream.codec_name, codec_type: stream.codec_type }; - }); + var getSimplifiedStreams = function (streamsToSimplify) { + return streamsToSimplify.map(function (stream) { return ({ + index: stream.typeIndex, + codec_name: stream.codec_name, + codec_type: stream.codec_type, + }); }); }; var originalStreams = JSON.stringify(getSimplifiedStreams(streams)); var sortStreams = function (sortType) { @@ -174,10 +176,10 @@ var plugin = function (args) { args.variables.ffmpegCommand.shouldProcess = true; // eslint-disable-next-line no-param-reassign args.variables.ffmpegCommand.streams = streams; - args.jobLog("Streams are not in order. Reordering."); + args.jobLog('Streams are not in order. Reordering.'); } else - args.jobLog("\u2714 Streams are already in order. No reordering necessary."); + args.jobLog('✔ Streams are already in order. No reordering necessary.'); return { outputFileObj: args.inputFileObj, outputNumber: 1, diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.ts index 1d383d4c8..b49247fef 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandRorderStreams/1.0.0/index.ts @@ -116,10 +116,13 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { stream.typeIndex = index; }); - const getSimplifiedStreams = (streams: IffmpegCommandStream[]) => - streams.map(stream => { - return { index: stream.typeIndex, codec_name: stream.codec_name, codec_type: stream.codec_type }; - }); + const getSimplifiedStreams = + (streamsToSimplify: IffmpegCommandStream[]) => + streamsToSimplify.map((stream) => ({ + index: stream.typeIndex, + codec_name: stream.codec_name, + codec_type: stream.codec_type, + })); const originalStreams = JSON.stringify(getSimplifiedStreams(streams)); @@ -227,9 +230,8 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { args.variables.ffmpegCommand.shouldProcess = true; // eslint-disable-next-line no-param-reassign args.variables.ffmpegCommand.streams = streams; - args.jobLog(`Streams are not in order. Reordering.`); - } else - args.jobLog(`✔ Streams are already in order. No reordering necessary.`); + args.jobLog('Streams are not in order. Reordering.'); + } else args.jobLog('✔ Streams are already in order. No reordering necessary.'); return { outputFileObj: args.inputFileObj,