Skip to content

refactor!: rename to diagnostics-webpack-plugin and the option to checks - #311

Merged
alexander-akait merged 3 commits into
mainfrom
refactor/rename-to-diagnostics
Sep 7, 2026
Merged

refactor!: rename to diagnostics-webpack-plugin and the option to checks#311
alexander-akait merged 3 commits into
mainfrom
refactor/rename-to-diagnostics

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

lint-webpack-plugin is not publishable: it has been taken since 2018 by a plugin that runs a lint shell command, and linter-webpack-plugin since 2019. Neither is a squat, so neither is worth disputing.

diagnostics is the term the tools use for what this plugin collects — TypeScript's API returns Diagnostic objects, 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:

new DiagnosticsPlugin({
  checks: [{ use: "eslint" }, { use: "stylelint" }],
});

src/linters/ becomes src/checks/, LintError becomes DiagnosticError, and the internal typedefs move from Linter* to Check*. Vocabulary is now split on purpose: a check is one configured entry, a tool is the program behind it, and the adapter contract keeps its lintFiles — 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:

  • The changelog does not mention lint-webpack-plugin. Nothing was ever published under it, so the pending changeset still records the move as coming from eslint-webpack-plugin — which is the only name a user has installed.
  • lintDirtyModulesOnly keeps its name. It is the one option migrating eslint-webpack-plugin users 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.cjs survives the directory move into both builds.

Does this PR introduce a breaking change?

Yes, twice: the package is diagnostics-webpack-plugin, and the linters option is checks. 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-plugin into esdiagnostics-webpack-plugin in the migration guides and that Stylelint's own LinterOptions and LintResult types had been clobbered, and repaired both. I reviewed the result.

Note

The GitHub repository still needs renaming to webpack/diagnostics-webpack-pluginpackage.json, .changeset/config.json and the release.yml repository 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

alexander-akait and others added 2 commits September 7, 2026 15:05
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
alexander-akait force-pushed the refactor/rename-to-diagnostics branch from 1c7c706 to 4c49b26 Compare September 7, 2026 15:06
`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
@alexander-akait
alexander-akait merged commit 752f25c into main Sep 7, 2026
13 checks passed
@alexander-akait
alexander-akait deleted the refactor/rename-to-diagnostics branch September 7, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant