Ship a JSON Schema for godot-correctness.config.json

Aperta
#124 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
json, typescript
Ambito
tooling

Direzione di ricerca

Read src/lint/config.ts, package.json, and the existing drift test for mcp-tools.json; inspect the build scripts and config example to see how schemas are generated and packaged. Run npm run build && npm test to check the current setup. Done when the generated schema includes the rule ID enum, ships in the package, is referenced by the example config, and the drift test passes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement severity: medium

Summary

The config accepts a $schema key as a pointer for editors (src/lint/config.ts:25), but the package ships no JSON Schema to point it at.

Where

  • src/lint/config.ts:24-25
  • godot-correctness.config.example.json
  • docs/lint.md

Proposal

  • Generate schema/config.schema.json from the zod schema at build time (zod 4 z.toJSONSchema), with an enum of rule ids from the catalogue.
  • Add it to the package files, reference it from the example config, and add a drift test like the existing mcp-tools.json one.

Who benefits

Users editing the config get autocomplete and validation for rule names and options in their editor, which catches the typos that strict config validation (#63) only reports at run time.

Getting started

  • Relevant files: src/lint/config.ts, scripts/, package.json
  • How to run tests: npm run build && npm test

Filed by repo-audit/full-audit at e836036. Severity: medium. Effort: S. audit-key: enhancement|src/lint/config.ts|$schema

Lingua principale
TypeScript
Stelle
0
Fork
6
Merge medio
1g 21h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/godot-correctness-mcp

Tutte le issue di TMHSDigital/godot-correctness-mcp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.