eef0ef5522
Checkpoint of the in-progress frontend toolchain work (Vite pinned to ^6 after the 7/8 rolldown build break, eslint-plugin-svelte v3 navigation/reactivity fixes, CI/Dockerfile/manifest updates) together with three UI performance optimizations (verified on the Vite 6 build): - Critical CSS: move auth.css/music.css off the global path into their route chunks (login/device/nextcloud-login, music) -- -25% gzipped critical CSS (~5.4 KB) on every non-auth/non-music page load. - relativeTimeAgo: cache the Intl.RelativeTimeFormat (was rebuilt per call, once per row per render) -- 22.7x faster date formatting in large lists. - Virtualize search results and grouped trash (list view) via VirtualList -- DOM rows mounted stay ~constant (~27) instead of O(N) (94.6% fewer for 500 hits). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
import js from '@eslint/js';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import prettier from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
import ts from 'typescript-eslint';
|
|
|
|
export default ts.config(
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs['flat/recommended'],
|
|
prettier,
|
|
...svelte.configs['flat/prettier'],
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
// `.svelte` components and `.svelte.ts`/`.svelte.js` rune modules are all
|
|
// parsed by svelte-eslint-parser under eslint-plugin-svelte v3; it needs the
|
|
// TS parser for the embedded/whole-file TypeScript or it chokes on type syntax.
|
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: ts.parser
|
|
}
|
|
},
|
|
// TypeScript + svelte-check already resolve identifiers (including `<script
|
|
// generics>` type params, which core `no-undef` can't see). Defer to them.
|
|
rules: {
|
|
'no-undef': 'off'
|
|
}
|
|
},
|
|
{
|
|
// `static/` holds vendored, verbatim assets (the delta-upload worker and
|
|
// the wasm-bindgen hash glue) — lint them as the upstream ships them.
|
|
ignores: ['build/', '.svelte-kit/', 'package/', 'static/', 'bench/']
|
|
}
|
|
);
|