Files
eleith 72502ab548
ci/woodpecker/pr/config Pipeline was successful
ci/woodpecker/pr/hledger Pipeline was successful
ci/woodpecker/pr/jobs Pipeline was successful
ci/woodpecker/pr/snapshots Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/pr/worker Pipeline was successful
ci/woodpecker/push/config Pipeline was successful
ci/woodpecker/push/hledger Pipeline was successful
ci/woodpecker/push/jobs Pipeline was successful
ci/woodpecker/push/snapshots Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/worker Pipeline was successful
refactor(web): migrate to SvelteKit 3
2026-10-30 18:23:22 -07:00

50 lines
1.3 KiB
JavaScript

import path from 'node:path';
import { includeIgnoreFile } from '@eslint/compat';
import { loadConfig } from '@sveltejs/load-config';
import js from '@eslint/js';
import { defineConfig } from 'eslint/config';
import prettier from 'eslint-config-prettier';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';
const loadedConfig = await loadConfig(import.meta.dirname, { traverse: false });
if (!loadedConfig) throw new Error('Svelte configuration not found.');
if ('error' in loadedConfig) throw loadedConfig.error;
const svelteConfig = loadedConfig.config;
export default defineConfig(
includeIgnoreFile(path.resolve(import.meta.dirname, '../../.gitignore')),
{
ignores: [
'.svelte-kit/**',
'build/**',
'coverage/**',
'node_modules/**',
'data/**',
'playwright-report/**',
'test-results/**'
]
},
js.configs.recommended,
ts.configs.recommended,
svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: { globals: { ...globals.browser, ...globals.node } },
rules: { 'no-undef': 'off' }
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig
}
}
}
);