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

View File

@@ -200,7 +200,8 @@
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": "error",
"curly": "warn"
"curly": "warn",
"eslint/no-undef": "error"
},
"globals": {
"NodeJS": "writeable"
@@ -225,11 +226,9 @@
],
"overrides": [
{
"files": [
"*.svelte",
"**/*.svelte"
],
"files": ["*.svelte", "**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
"rules": {
"eslint/no-undef": "off",
"no-inner-declarations": "off",
"no-self-assign": "off"
}

View File

@@ -13,3 +13,5 @@ node_modules
pnpm-lock.yaml
package-lock.json
yarn.lock
biome.json
.oxlintrc.json

View File

@@ -99,5 +99,4 @@ export default typescriptEslint.config(
},
},
},
oxlint.buildFromOxlintConfigFile('./.oxlintrc.json'),
);

View File

@@ -4,7 +4,6 @@
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
import SettingAccordion from '$lib/components/shared-components/settings/setting-accordion.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 { handleError } from '$lib/utils/handle-error';
import { type SystemConfigDto, type SystemConfigTemplateEmailsDto, getNotificationTemplateAdmin } from '@immich/sdk';
@@ -22,11 +21,13 @@
let loadingPreview = $state(false);
const myCoolVariable = 'hello!';
const getTemplate = async (name: string, template: string) => {
try {
loadingPreview = true;
const { html } = await getNotificationTemplateAdmin({ name, templateDto: { template } });
modalManager.show(EmailTemplatePreviewModal, { html });
modalManger.show(EmailTemplatePreviewModal, { html });
} catch (error) {
handleError(error, 'Could not load template.');
} finally {