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

未关闭
#124 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
json, typescript
领域
tooling

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
0
派生
6
平均合并
1 天 21 小时
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/godot-correctness-mcp 的其他 Issue

查看 TMHSDigital/godot-correctness-mcp 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。