Skip to content

feat: add tsconfig.json + consider using "AI" for coding#792

Closed
Topfi wants to merge 1 commit intogarrytan:mainfrom
Topfi:feat/strict-typecheck
Closed

feat: add tsconfig.json + consider using "AI" for coding#792
Topfi wants to merge 1 commit intogarrytan:mainfrom
Topfi:feat/strict-typecheck

Conversation

@Topfi
Copy link
Copy Markdown

@Topfi Topfi commented Apr 4, 2026

feat: add tsconfig.json + consider using "AI" for coding

The Problem

This is a TS project.

This is a 50k LOC TS project.

This is a 50k LOC TS project for LLM personas.

This is a 50k LOC TS project for LLM personas without a tsconfig.json.

This is a 50k LOC TS project for LLM personas without a tsconfig.json that has grown to hundreds of any.

Suggested Fix

Add a standard issue tsconfig.json, lint to surface explicit any and install the required deps. Adjust CI and resolve all that'll surface now.

tsconfig.json

{
  "compilerOptions": {
    "lib": ["ESNext"],
    "target": "ESNext",
    "module": "Preserve",
    "moduleDetection": "force",
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "types": ["bun"],
    "strict": true,
    "skipLibCheck": true,
    "noEmit": true,
    "noFallthroughCasesInSwitch": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true
  },
  "include": [
    "bin/**/*.ts",
    "browse/**/*.ts",
    "design/**/*.ts",
    "lib/**/*.ts",
    "scripts/**/*.ts",
    "test/**/*.ts"
  ],
  "exclude": [
    "node_modules",
    "browse/dist",
    "design/dist",
    "supabase/functions"
  ]
}

eslint.config.js

// eslint.config.js
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import tseslint from "typescript-eslint";

export default defineConfig(
  {
    ignores: [
      "node_modules/**",
      "browse/dist/**",
      "design/dist/**",
      "supabase/functions/**"
    ]
  },
  js.configs.recommended,
  tseslint.configs.recommended,
  {
    files: [
      "bin/**/*.ts",
      "browse/**/*.ts",
      "design/**/*.ts",
      "lib/**/*.ts",
      "scripts/**/*.ts",
      "test/**/*.ts"
    ],
    rules: {
      "@typescript-eslint/no-explicit-any": "error"
    }
  }
);

package.json (additions)

{
  "scripts": {
    "typecheck": "tsc -p tsconfig.json --noEmit",
    "lint:ts": "eslint \"bin/**/*.ts\" \"browse/**/*.ts\" \"design/**/*.ts\" \"lib/**/*.ts\" \"scripts/**/*.ts\" \"test/**/*.ts\""
  },
  "devDependencies": {
    "typescript": "^6.0.0",
    "@types/bun": "latest",
    "eslint": "^10.0.0",
    "typescript-eslint": "^8.0.0",
    "@eslint/js": "^10.0.0"
  }
}

Suggestion

Consider using an LLM (sometimes overhypingly called "AI") in your workflow. Any modern LLM going back to the Opus 4.1 days would have advised you to utilise the typesafety or go for plain JS. I understand that using LLMs in coding can be a bit scary, but these tools can provide some very helpful output, if one doesn't overdo it with excessive prompts that bloat the context window and of course audits all code the model outputs in full. Reading code, especially if not written by yourself, can be daunting, but it is important if you want to start using LLMs, that you continue to do so. Who knows what other issues could go unnoticed otherwise. Being an experienced developer, I am sure you will prefer sticking with writing everything yourself though.

Severity

Information Class
Containment Keter
Secondary Apollyon
Disruption Ekhi
Risk Critical
Clearance O5 / SLOP Research Team
Site 13

🤖 Generated with Claude Code

Surface type errors and explicit-any lint violations.
Does NOT fix any errors — just adds the tooling and CI gate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Topfi
Copy link
Copy Markdown
Author

Topfi commented Apr 4, 2026

Screenshot 2026-04-04 at 02 57 42

@garrytan garrytan closed this Apr 4, 2026
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.

2 participants