Skip to content

Ban any, unknown and casts through unknown in the server's lint (GRYT-1792) - #299

Merged
grytchat merged 1 commit into
mainfrom
claude/GRYT-1792-server-lint
Oct 19, 2026
Merged

grytchat merged 1 commit into
mainfrom
claude/GRYT-1792-server-lint

Conversation

@grytchat

Copy link
Copy Markdown
Contributor

The server half of Gryt-chat/client#890. This changes one file, eslint.config.mjs, and no code.

New errors

  • @typescript-eslint/no-explicit-any (was a warning)
  • @typescript-eslint/no-restricted-types with unknown
  • no-restricted-syntax for x as unknown as Y
  • no-nested-ternary
  • @typescript-eslint/no-non-null-assertion
  • no-param-reassign
  • @typescript-eslint/consistent-type-imports (inline style; typeof import() stays allowed for the lazily loaded MLS packages)
  • eqeqeq (smart), no-else-return, prefer-const. These have no existing violations.

Existing debt is listed per rule as files overrides, so nothing is autofixed and no code file changes:

Rule Files
unknown (grouped by why: socket payloads, requests, stored data, caught errors, tests, not typed yet) 136
casts through unknown 63
non-null assertions 38
type-only imports 24 (one mechanical PR later)
nested ternaries 12
reassigned parameters 3
any 1

Review-required paths (src/auth, src/middleware, src/db, src/storage) are exempt from the new rules, with any kept as a warning there, until a reviewed PR fixes them.

npx eslint . and check-comment-length pass.

Vikunja: GRYT-1792

🤖 Generated with Claude Code

…-1792)

any becomes an error (it was a warning). unknown, casts through unknown,
nested ternaries, non-null assertions, reassigned parameters and unmarked
type-only imports are errors too, along with eqeqeq, no-else-return and
prefer-const. Existing debt is listed per rule in the config, so no code
file changes here; review-required paths are exempt until a reviewed PR
fixes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grytchat
grytchat merged commit a5c5800 into main Oct 19, 2026
6 checks passed
@grytchat
grytchat deleted the claude/GRYT-1792-server-lint branch October 19, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant