Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
/build
/.svelte-kit
/package
.eslintcache
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
/src/lib/gql/generated
9 changes: 7 additions & 2 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import js from '@eslint/js';
import path from 'path';
import stylistic from '@stylistic/eslint-plugin';
import svelte from 'eslint-plugin-svelte';
import svelteConfig from './svelte.config.js';
import svelteParser from 'svelte-eslint-parser';
import tsParser from '@typescript-eslint/parser';
import typescript from 'typescript-eslint';
Expand Down Expand Up @@ -48,6 +47,10 @@ export default [
...svelte.configs.recommended,
{
rules: {
// Low-value type-aware rule disabled for lint performance/consistency with the
// sibling viewer package, where it dominated lint time. (Here its cost is small;
// this package's hot rule is no-misused-promises — see the lint perf notes.)
'@typescript-eslint/no-duplicate-type-constituents': 'off',
// https://typescript-eslint.io/rules/
'@typescript-eslint/naming-convention': [
'error',
Expand Down Expand Up @@ -123,7 +126,9 @@ export default [
project: true,
tsconfigRootDir: __dirname,
extraFileExtensions: ['.svelte'], // Yes, TS-Parser, relax when you're fed svelte files
svelteConfig: svelteConfig,
// svelteConfig is intentionally NOT passed here: svelte-eslint-parser auto-loads
// svelte.config.js from disk, and passing it inline would embed its warningFilter/
// onwarn functions in the ESLint config, breaking --cache (config must serialize).
},
globals: {
...globals.browser,
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"check": "svelte-kit sync && svelte-check",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "vitest",
"lint": "svelte-kit sync && eslint .",
"lint": "svelte-kit sync && eslint . --cache",
"lint:report": "svelte-kit sync && eslint-output",
"format": "eslint . --fix",
"clean": "pnpm dlx rimraf node_modules .svelte-kit"
Expand Down
1 change: 1 addition & 0 deletions frontend/viewer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ storybook-static
screenshots/
__screenshots__/
eslint_report.json
.eslintcache
**/*-html-report
5 changes: 5 additions & 0 deletions frontend/viewer/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export default [
...svelte.configs.prettier,
{
rules: {
// Disabled for performance: this single type-aware rule accounted for ~60% of
// total lint time (~15s of a ~73s run) and flagged nothing in this codebase. It
// does expensive type-relation checks on every union/intersection, which blows up
// against our large generated dotnet-types unions. See TIMING=25 profiling.
'@typescript-eslint/no-duplicate-type-constituents': 'off',
// https://typescript-eslint.io/rules/
'@typescript-eslint/naming-convention': [
'error',
Expand Down
2 changes: 1 addition & 1 deletion frontend/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"check": "svelte-check",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint",
"lint": "eslint --cache",
"lint:report": "eslint-output",
"i18n:extract": "node extract-i18n-preserve-comments.js",
"generate-icon-types": "node ./generate-icon-types.js",
Expand Down
Loading