You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build: no-undef runs on TypeScript files and breaks if lint config changes #893
bugSomething isn't workingciCI, build pipeline, test hygienehygieneToil, but its useful to get get too behind on itjavascriptPull requests that update Javascript code
The shared ESLint config enables core ESLint's no-undef rule on .ts and .tsx files, because it spreads eslint.configs.recommended.rules into the TypeScript block.
typescript-eslint recommends turning it off for TypeScript: tsc already checks for undefined names, with full type knowledge, and the ESLint rule gives false positives.
Example
Today no-undef reports nothing, but only by accident. parserOptions.project makes the parser read lib from the tsconfig and register the DOM and ES globals, which keeps the rule quiet.
Removing project from src/diagram produces 383 spurious no-undef errors.
Adding parserOptions.lib: ['es2020', 'dom', 'dom.iterable'] back makes them go away.
Why it matters
Dropping project is the obvious way to speed up lint (#892), and anyone who tries it gets hundreds of unrelated errors with no hint that no-undef is the cause.
The hand-maintained globals lists in the shared config and in src/simlin-serve/web/eslint.config.cjs (window, document, WebSocket, ...) exist only to quiet this rule and will never be complete.
Fix
Set 'no-undef': 'off' in the TypeScript block of eslint.config.shared.js.
Then delete the globals lists, after checking that no remaining core rule reads them.
changed the title [-]build: no-undef is enabled on TypeScript files, silently masked by parserOptions.project[/-][+]build: no-undef runs on TypeScript files and breaks if lint config changes[/+]on Oct 12, 2026
bugSomething isn't workingciCI, build pipeline, test hygienehygieneToil, but its useful to get get too behind on itjavascriptPull requests that update Javascript code
Activity
[-]build: no-undef is enabled on TypeScript files, silently masked by parserOptions.project[/-][+]build: no-undef runs on TypeScript files and breaks if lint config changes[/+]