Repository navigation
Support linter configuration overrides from the CLI - #12195
Timothee Guerin (timotheeguerin) wants to merge 6 commits into
Conversation
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
There was a problem hiding this comment.
🟡 Changes recommended
Invalid inherited rule options still block compilation even when CLI overrides replace or disable them.
1 open finding
What changed in this PR
Adds runtime-only linter overrides to the TypeSpec compiler CLI without modifying project configuration.
Changes:
- Adds ruleset selection, per-rule overrides, and lint disabling.
- Adds unit and end-to-end coverage.
- Documents flags, precedence, and path resolution.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


Changing lint policy for a single compilation currently requires editing
tspconfig.yamlor maintaining a separate config, even when the goal is just to skip linting or try another ruleset.Add runtime-only overrides without changing the project's configuration:
--linter-rulesetcan be repeated and accepts library rulesets orfile:YAML references. It replaces the configuredextendslist while preserving configured per-rule settings. CLI file paths resolve from the working directory.--linter-ruleacceptstrue,false, or a JSON options object and takes precedence over configured rule settings.--no-linterdisables lint rules without suppressing compiler diagnostics or emitters, and cannot be combined with either override flag.