Skip to content

The swiss army knife of lossless video/audio editing

Adapt to the remaining native rules of @mifi/lint-config

Claudebaf5be38c1ad
diff --git a/.oxlintrc.json b/.oxlintrc.json
index 082b5983..05bac6f3 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -24,8 +24,14 @@
"jsx-a11y/interactive-supports-focus": "off",
"jsx-a11y/control-has-associated-label": "off",
"@stylistic/function-call-spacing": "off",
+ // Express 5 forwards rejected promises to the error handler
+ "oxc/no-async-endpoint-handlers": "off",
// TODO stage 2 rules from @mifi/lint-config with many findings here (count in parentheses), turned off until fixed
"unicorn-js/consistent-boolean-name": "off", // (95)
+ "react/exhaustive-effect-dependencies": "off", // (81)
+ "jsx-a11y/prefer-tag-over-role": "off", // (60)
+ "react/hooks": "off", // (32)
+ "react/memo-dependencies": "off", // (20)
"unicorn/prefer-number-coercion": "off", // (95)
"unicorn-js/prefer-minimal-ternary": "off", // (19)
"unicorn-js/prefer-simple-condition-first": "off", // (17)
diff --git a/src/renderer/src/components/FileNameTemplateEditor.tsx b/src/renderer/src/components/FileNameTemplateEditor.tsx
index 66735e51..70467ce6 100644
--- a/src/renderer/src/components/FileNameTemplateEditor.tsx
+++ b/src/renderer/src/components/FileNameTemplateEditor.tsx
@@ -60,7 +60,7 @@ function FileNameTemplateEditor(opts: {
}, [haveImportantMessage]);
useEffect(() => {
- // eslint-disable-next-line react-hooks/set-state-in-effect
+ // eslint-disable-next-line react-hooks/set-state-in-effect, react/no-deriving-state-in-effects -- TODO fix (new rule in @mifi/lint-config)
setText(templateIn);
}, [templateIn]);
diff --git a/src/renderer/src/hooks/useWaveform.ts b/src/renderer/src/hooks/useWaveform.ts
index 4fd71498..7df31017 100644
--- a/src/renderer/src/hooks/useWaveform.ts
+++ b/src/renderer/src/hooks/useWaveform.ts
@@ -50,6 +50,7 @@ export default ({ filePath, relevantTime, fileDuration, waveformEnabled, audioSt
return;
}
+ // eslint-disable-next-line no-unmodified-loop-condition -- set by the effect cleanup
while (!aborted) {
const times = [
waveformStartTimeRef.current,
diff --git a/src/renderer/src/worker/eval.ts b/src/renderer/src/worker/eval.ts
index e4d358d1..2c3a1d9b 100644
--- a/src/renderer/src/worker/eval.ts
+++ b/src/renderer/src/worker/eval.ts
@@ -70,6 +70,7 @@ export default async function safeishEval(code: string, context: Record<string,
worker.addEventListener('messageerror', onMessageerror);
worker.addEventListener('error', onError);
+ // eslint-disable-next-line unicorn/require-post-message-target-origin -- Worker.postMessage has no targetOrigin
worker.postMessage({ id, code, context: JSON.stringify(context) } satisfies RequestMessageData);
});
}