refactor!: rename to diagnostics-webpack-plugin and the option to checks - #311
Merged
Conversation
ESLint 10 takes `applySuppressions` and `suppressionsLocation` as constructor options, and the plugin already hands every ESLint option through, so the feature works with no code of its own. Cover it so a change to the pass-through cannot drop it silently, and document that ESLint resolves the suppressions file against its own `cwd` rather than the plugin's `context`. Closes #291. Supersedes #292, which predates the constructor options and reached into `eslint/lib/services/suppressions-service.js` instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
…ecks` `lint-webpack-plugin` and `linter-webpack-plugin` are both taken on npm, by packages published in 2018 and 2019. `diagnostics` is the term the tools themselves use — TypeScript reports Diagnostics, and so does the Language Server Protocol — so it covers the linters running today and the type checkers and analysers meant to follow, without naming any of them. The option follows: `linters` becomes `checks`, `src/linters/` becomes `src/checks/`, and `LintError` becomes `DiagnosticError`. Nothing shipped under the old name, so the changelog still records the move as coming from `eslint-webpack-plugin`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
alexander-akait
force-pushed
the
refactor/rename-to-diagnostics
branch
from
September 7, 2026 15:06
1c7c706 to
4c49b26
Compare
`diagnostics-webpack-plugin` is a new package on npm, so its versions start over rather than continuing `eslint-webpack-plugin`'s. Setting the version to 0.0.0 makes the pending majors resolve to 1.0.0, and the changelog says which of its entries belong to the old package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
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
lint-webpack-pluginis not publishable: it has been taken since 2018 by a plugin that runs a lint shell command, andlinter-webpack-pluginsince 2019. Neither is a squat, so neither is worth disputing.diagnosticsis the term the tools use for what this plugin collects — TypeScript's API returnsDiagnosticobjects, and so does the Language Server Protocol. It covers the linters running today and the type checkers and analysers meant to follow, without naming any of them, which is what the next adapter needs.The option follows the name, since
linters: [{ use: "typescript" }]would not have aged well:src/linters/becomessrc/checks/,LintErrorbecomesDiagnosticError, and the internal typedefs move fromLinter*toCheck*. Vocabulary is now split on purpose: a check is one configured entry, a tool is the program behind it, and the adapter contract keeps itslintFiles— renaming that touches Stylelint's worker plumbing and reads better alongside the TypeScript adapter than ahead of it.Two things worth a reviewer's eye:
lint-webpack-plugin. Nothing was ever published under it, so the pending changeset still records the move as coming fromeslint-webpack-plugin— which is the only name a user has installed.lintDirtyModulesOnlykeeps its name. It is the one option migratingeslint-webpack-pluginusers already know by name, and renaming it adds a second thing to learn for no gain here.What kind of change does this PR introduce?
refactor (breaking).
Did you add tests for your changes?
No new tests — the rename is mechanical and the existing suite is the check: 129 passing, unchanged. I also confirmed both published entry points still construct the plugin, and that
stylelint-worker.cjssurvives the directory move into both builds.Does this PR introduce a breaking change?
Yes, twice: the package is
diagnostics-webpack-plugin, and thelintersoption ischecks. Both land in the same unreleased major as the merge itself, so no published version is affected.If relevant, what needs to be documented once your changes are merged or what have you already documented?
The README is updated throughout — title, badges, install and import examples, option tables, both migration guides and the adapter section. The pending changeset already describes the new name and option.
Use of AI
Written with Claude Code, driven interactively. I chose the name from options it checked against npm; it did the rename, caught that the substitution had corrupted
eslint-webpack-pluginintoesdiagnostics-webpack-pluginin the migration guides and that Stylelint's ownLinterOptionsandLintResulttypes had been clobbered, and repaired both. I reviewed the result.Note
The GitHub repository still needs renaming to
webpack/diagnostics-webpack-plugin—package.json,.changeset/config.jsonand therelease.ymlrepository guard already point there, and the guard is what stops the release job running under the old name.🤖 Generated with Claude Code
https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy
Generated by Claude Code