refactor!: fold quiet into reportAs - #317
Merged
Merged
Conversation
alexander-akait
force-pushed
the
refactor/errors-only
branch
from
September 8, 2026 10:13
2972642 to
cc0c738
Compare
`reportAs` says what a check reports its results as. One value covers its
errors and its warnings alike, an object sets them apart, and a severity the
object leaves out keeps its own:
reportAs: "warning" // nothing fails the build
reportAs: { warnings: false } // the errors alone (was quiet: true)
reportAs: { warnings: "error" } // warnings fail it too
reportAs: false // nothing is reported
Each severity independently becomes an error, a warning or nothing, so the
nine states that gives are the whole space, and every option this replaces has
a spelling: `emitError: false` is `{ errors: false }` and `failOnWarning:
true` is `{ warnings: "error" }`, neither of which the scalar alone could say.
A partial object reading its missing severity from the default is what keeps
the common cases short — naming the warnings says nothing about the errors.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
alexander-akait
force-pushed
the
refactor/errors-only
branch
from
September 8, 2026 10:31
cc0c738 to
5598951
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reportAssays what a check reports its results as. One value covers its errors and its warnings alike; an object sets them apart, and a severity the object leaves out keeps its own.quiethas nothing left to say and goes.Every state, measured on real builds rather than reasoned about:
reportAs"error""warning"false{ warnings: false }{ warnings: "error" }{ errors: false }{ errors: "warning" }{ errors: "warning", warnings: false }Each severity independently becomes a webpack error, a webpack warning, or nothing — so the nine states that gives are the whole space, and there is nothing left for a second option to express.
Every option this replaces now has a spelling, including two the scalar alone could not say:
quiet: true,emitWarning: falsereportAs: { warnings: false }emitError: falsereportAs: { errors: false }emitError: falseandemitWarning: falsereportAs: falsefailOnError: truefailOnError: falsereportAs: "warning"failOnWarning: truereportAs: { warnings: "error" }A partial object is what keeps it short.
{ warnings: false }says nothing about the errors, so the two severities stay independent and the common cases stay one key long. An empty object is the default.What kind of change does this PR introduce?
refactor (breaking).
Did you add tests for your changes?
Yes.
test/quiet.test.jsandtest/stylelint/quiet.test.jsare gone;report-as.test.jscovers the scalar, the object, a partial object leaving the other severity alone, a warning made fatal, an error made non-fatal, and what the schema refuses — for both checks. 118 passing.Does this PR introduce a breaking change?
Yes:
quietis gone, spelledreportAs: { warnings: false }. Nothing has shipped under this package name, so it lands in the same unreleased major asreportAsitself. The README's migration table maps every old option onto the new one.If relevant, what needs to be documented once your changes are merged or what have you already documented?
Documented here: the
Errors and warningssection rewritten around the one option, a value table covering the scalar and the object forms, the adapter contract inAdding a check, and the migration table — which no longer has a "no counterpart" row. The changeset is a major.Use of AI
Written with Claude Code, driven interactively. I asked for the option list, said to fix
quiet, then to remove it and fold it intoreportAs, and then to letreportAstake an object so each severity can be set on its own. Its first attempt was a rename, its second read the value as a threshold and dropped two behaviours to fit — I turned both down, and the object recovers them. It enumerated what the options expressed at each step rather than guessing, measured every value of the final shape on real builds, and corrected its own earlier claim that one option would need seven values. I reviewed the result.🤖 Generated with Claude Code
https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy