diff --git a/eslint.config.js b/eslint.config.js index 106456d..9fabe6e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -25,7 +25,17 @@ export default defineConfig( rules: { // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors - 'no-undef': 'off' + 'no-undef': 'off', + // Disable no-navigation-without-resolve as we're using resolveRoute from $app/paths + 'svelte/no-navigation-without-resolve': 'off', + // Allow unused vars that start with underscore + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_' + } + ] } }, { diff --git a/src/lib/components/CommentsList.svelte b/src/lib/components/CommentsList.svelte index 6ebc642..0f1fa1d 100644 --- a/src/lib/components/CommentsList.svelte +++ b/src/lib/components/CommentsList.svelte @@ -56,7 +56,7 @@ await apiSync.deleteComment(commentId, findId); } - function canDeleteComment(comment: any): boolean { + function canDeleteComment(comment: { user: { id: string } }): boolean { return Boolean( currentUserId && (comment.user.id === currentUserId || comment.user.id === 'current-user') ); @@ -65,7 +65,7 @@ {#snippet loadingSkeleton()}