chore: added no-undef oxlint rule

This commit is contained in:
Arno Wiest
2025-06-13 14:46:24 +02:00
parent cfe7fc675d
commit 01cca7328d
4 changed files with 9 additions and 8 deletions
+4 -5
View File
@@ -200,7 +200,8 @@
"@typescript-eslint/prefer-as-const": "error", "@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-namespace-keyword": "error", "@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error", "@typescript-eslint/triple-slash-reference": "error",
"curly": "warn" "curly": "warn",
"eslint/no-undef": "error"
}, },
"globals": { "globals": {
"NodeJS": "writeable" "NodeJS": "writeable"
@@ -225,11 +226,9 @@
], ],
"overrides": [ "overrides": [
{ {
"files": [ "files": ["*.svelte", "**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
"*.svelte",
"**/*.svelte"
],
"rules": { "rules": {
"eslint/no-undef": "off",
"no-inner-declarations": "off", "no-inner-declarations": "off",
"no-self-assign": "off" "no-self-assign": "off"
} }
+2
View File
@@ -13,3 +13,5 @@ node_modules
pnpm-lock.yaml pnpm-lock.yaml
package-lock.json package-lock.json
yarn.lock yarn.lock
biome.json
.oxlintrc.json
-1
View File
@@ -99,5 +99,4 @@ export default typescriptEslint.config(
}, },
}, },
}, },
oxlint.buildFromOxlintConfigFile('./.oxlintrc.json'),
); );
@@ -4,7 +4,6 @@
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte'; import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
import SettingAccordion from '$lib/components/shared-components/settings/setting-accordion.svelte'; import SettingAccordion from '$lib/components/shared-components/settings/setting-accordion.svelte';
import SettingTextarea from '$lib/components/shared-components/settings/setting-textarea.svelte'; import SettingTextarea from '$lib/components/shared-components/settings/setting-textarea.svelte';
import { modalManager } from '$lib/managers/modal-manager.svelte';
import EmailTemplatePreviewModal from '$lib/modals/EmailTemplatePreviewModal.svelte'; import EmailTemplatePreviewModal from '$lib/modals/EmailTemplatePreviewModal.svelte';
import { handleError } from '$lib/utils/handle-error'; import { handleError } from '$lib/utils/handle-error';
import { type SystemConfigDto, type SystemConfigTemplateEmailsDto, getNotificationTemplateAdmin } from '@immich/sdk'; import { type SystemConfigDto, type SystemConfigTemplateEmailsDto, getNotificationTemplateAdmin } from '@immich/sdk';
@@ -22,11 +21,13 @@
let loadingPreview = $state(false); let loadingPreview = $state(false);
const myCoolVariable = 'hello!';
const getTemplate = async (name: string, template: string) => { const getTemplate = async (name: string, template: string) => {
try { try {
loadingPreview = true; loadingPreview = true;
const { html } = await getNotificationTemplateAdmin({ name, templateDto: { template } }); const { html } = await getNotificationTemplateAdmin({ name, templateDto: { template } });
modalManager.show(EmailTemplatePreviewModal, { html }); modalManger.show(EmailTemplatePreviewModal, { html });
} catch (error) { } catch (error) {
handleError(error, 'Could not load template.'); handleError(error, 'Could not load template.');
} finally { } finally {