Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

fix(lint): cleanup some new warnings (#1151)

Corentin Thomasset486a8e2ad68c
diff --git a/apps/papra-client/src/modules/documents/components/pdf-viewer/toolbar/document-properties-dialog.component.tsx b/apps/papra-client/src/modules/documents/components/pdf-viewer/toolbar/document-properties-dialog.component.tsx
index 68a7e7f1..44caf772 100644
--- a/apps/papra-client/src/modules/documents/components/pdf-viewer/toolbar/document-properties-dialog.component.tsx
+++ b/apps/papra-client/src/modules/documents/components/pdf-viewer/toolbar/document-properties-dialog.component.tsx
@@ -40,7 +40,7 @@ export const DocumentPropertiesDialog: Component<DocumentPropertiesDialogProps>
return undefined;
}
- return `${ps.width} x ${ps.height}`;
+ return `${String(ps.width)} x ${String(ps.height)}`;
};
const getProperties = (): { label: TranslationKeys; value?: string | number | null }[] => [
diff --git a/apps/papra-client/src/modules/tagging-rules/tagging-rules.models.ts b/apps/papra-client/src/modules/tagging-rules/tagging-rules.models.ts
deleted file mode 100644
index e69de29b..00000000
diff --git a/apps/papra-client/src/modules/ui/components/color-swatch-picker.tsx b/apps/papra-client/src/modules/ui/components/color-swatch-picker.tsx
index 8b8c1c5e..38aacc6e 100644
--- a/apps/papra-client/src/modules/ui/components/color-swatch-picker.tsx
+++ b/apps/papra-client/src/modules/ui/components/color-swatch-picker.tsx
@@ -58,7 +58,7 @@ const ColorPicker: Component<{
try {
const parsedColor = parseColor(color);
onUpdateColor(parsedColor);
- } catch (_error) {}
+ } catch {}
};
return (
diff --git a/apps/papra-server/src/modules/shared/fs/fs.services.ts b/apps/papra-server/src/modules/shared/fs/fs.services.ts
index 90577035..0b14c670 100644
--- a/apps/papra-server/src/modules/shared/fs/fs.services.ts
+++ b/apps/papra-server/src/modules/shared/fs/fs.services.ts
@@ -142,7 +142,7 @@ export async function areFilesContentIdentical({
const content2 = await readFile({ filePath: file2, fs });
return Buffer.compare(content1, content2) === 0;
- } catch (_) {
+ } catch {
return false;
}
}
diff --git a/apps/papra-server/src/modules/webhooks/index.ts b/apps/papra-server/src/modules/webhooks/index.ts
deleted file mode 100644
index e69de29b..00000000
diff --git a/apps/website/src/components/PosthogAnalytics.astro b/apps/website/src/components/PosthogAnalytics.astro
index ece67bac..08d8c2b6 100644
--- a/apps/website/src/components/PosthogAnalytics.astro
+++ b/apps/website/src/components/PosthogAnalytics.astro
@@ -7,10 +7,11 @@ const isEnabled: boolean = Boolean(apiKey);
<link rel="preconnect" href={apiHost} />
<script is:inline define:vars={{apiKey, apiHost}}>
+ // oxlint-disable
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug getPageViewId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init(apiKey, {
- api_host: apiHost,
- person_profiles: 'identified_only'
+ api_host: apiHost,
+ person_profiles: 'identified_only'
})
</script>
)}
diff --git a/oxlint.config.ts b/oxlint.config.ts
index 242c9918..81bb3ecc 100644
--- a/oxlint.config.ts
+++ b/oxlint.config.ts
@@ -8,6 +8,7 @@ export default defineConfig({
rules: {
'typescript/consistent-type-imports': 'error',
'no-console': 'error',
+ 'no-unused-vars': 'error',
'typescript/no-redundant-type-constituents': 'error',
},
ignorePatterns: [