Some checks failed
Test and deploy staging / staging (push) Failing after 14s
- run sv migrate sveltekit-3: config moves into vite.config.ts, $lib becomes #lib, $env/dynamic becomes $app/env/private via src/env.ts, $app/environment becomes $app/env, hook types move to @sveltejs/kit/hooks - env vars stay optional (the migrator defaulted them to ''), and BANCHO_MODE, which it missed, is declared and passed to simulatorEnabled - handleError only logs and masks unknown errors; Kit 3 now routes 404s and error(...) through it too - json()/text() become Response.json()/new Response(); goto keepFocus/noScroll becomes reset: false; invalidateAll becomes refreshAll; page.url is copied before mutating - replace adapter-node with @sveltejs/adapter-bun; prod-server.ts wraps Bun.serve to add native WebSockets (bunSockets) for /ws paths, since the generated server has no websocket option - drop the Kit readdir patch: Kit 3 sorts route entries itself - match view and broadcast pages use the live score modules BREAKING CHANGE: requires SvelteKit 3, TypeScript 6 and Bun 1.4; the build output is build/index.js from adapter-bun, started through prod-server.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
2.0 KiB
JavaScript
59 lines
2.0 KiB
JavaScript
import prettier from 'eslint-config-prettier';
|
|
import path from 'node:path';
|
|
import { includeIgnoreFile } from '@eslint/compat';
|
|
import js from '@eslint/js';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import { defineConfig } from 'eslint/config';
|
|
import globals from 'globals';
|
|
import ts from 'typescript-eslint';
|
|
import { loadConfig } from '@sveltejs/load-config';
|
|
|
|
const svelteConfig = (await loadConfig('./', { traverse: false }))?.config;
|
|
|
|
const gitignorePath = path.resolve(import.meta.dirname, '.gitignore');
|
|
|
|
export default defineConfig(
|
|
includeIgnoreFile(gitignorePath),
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs.recommended,
|
|
prettier,
|
|
...svelte.configs.prettier,
|
|
{
|
|
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
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',
|
|
// Downgraded to warn — too many pre-existing violations to block CI.
|
|
// TODO: fix these incrementally and promote back to 'error'.
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'no-empty': 'warn',
|
|
'no-empty-pattern': 'warn',
|
|
'prefer-const': 'warn'
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
extraFileExtensions: ['.svelte'],
|
|
parser: ts.parser,
|
|
svelteConfig
|
|
}
|
|
},
|
|
rules: {
|
|
// $effect(), $derived() etc. are valid Svelte 5 rune expressions
|
|
'@typescript-eslint/no-unused-expressions': 'off',
|
|
// Downgraded to warn — many pre-existing violations.
|
|
// TODO: fix incrementally and promote back to 'error'.
|
|
'svelte/no-navigation-without-resolve': 'warn',
|
|
'svelte/require-each-key': 'warn',
|
|
'svelte/no-unused-svelte-ignore': 'warn',
|
|
'svelte/no-useless-mustaches': 'warn'
|
|
}
|
|
}
|
|
);
|