Summary
flaglint.config.json (and the inline Zod schema in src/config.ts) define a validated config shape, but there is no published JSON Schema that editors can use for autocompletion and inline validation. Without it, contributors writing a config file have no IDE guidance and must read the source.
Providing a schema at schema/flaglint-config.schema.json and linking it from the README gives users instant IDE autocompletion in VS Code, WebStorm, and any other editor that supports $schema.
Acceptance criteria
schema/flaglint-config.schema.json is present and valid JSON Schema (draft-07 or 2020-12)
- It covers all fields currently defined in the Zod schema in
src/config.ts:
staleThreshold, minFileCount, include, exclude, wrappers, enforce
- A
$schema example is shown in the README under the config section:
{
"$schema": "https://raw.githubusercontent.com/flaglint/flaglint/main/schema/flaglint-config.schema.json",
"staleThreshold": 90
}
- The schema file is included in the npm package (
files in package.json)
Implementation notes
- The schema can be authored by hand from the Zod definition in
src/config.ts — no codegen needed
- Keep the schema in sync with the Zod schema; a comment in
src/config.ts pointing to the schema file makes the coupling explicit
Files likely touched
schema/flaglint-config.schema.json — new file
package.json — add schema/ to files
README.md — add $schema usage example
No logic changes required — pure docs/config artifact. Great for a first contribution.
Summary
flaglint.config.json(and the inline Zod schema insrc/config.ts) define a validated config shape, but there is no published JSON Schema that editors can use for autocompletion and inline validation. Without it, contributors writing a config file have no IDE guidance and must read the source.Providing a schema at
schema/flaglint-config.schema.jsonand linking it from the README gives users instant IDE autocompletion in VS Code, WebStorm, and any other editor that supports$schema.Acceptance criteria
schema/flaglint-config.schema.jsonis present and valid JSON Schema (draft-07 or 2020-12)src/config.ts:staleThreshold,minFileCount,include,exclude,wrappers,enforce$schemaexample is shown in the README under the config section:{ "$schema": "https://raw.githubusercontent.com/flaglint/flaglint/main/schema/flaglint-config.schema.json", "staleThreshold": 90 }filesinpackage.json)Implementation notes
src/config.ts— no codegen neededsrc/config.tspointing to the schema file makes the coupling explicitFiles likely touched
schema/flaglint-config.schema.json— new filepackage.json— addschema/tofilesREADME.md— add$schemausage exampleNo logic changes required — pure docs/config artifact. Great for a first contribution.