ESLint: Replace strict config with bulk suppressions - #81248
Merged
Conversation
|
Size Change: +49 B (0%) Total Size: 7.82 MB 📦 View Changed
|
| 5d4baa9ab5f57d207cc3a048003216a8574574d9 | ||
|
|
||
| # Remove dependency import separators. | ||
| 219f48684dbee5b6e2e2a643ffea046acdaa724b |
ciampo
force-pushed
the
codex/81188-define-dependency-import-lint-rules
branch
from
August 6, 2026 08:23
a469b60 to
5a06c73
Compare
ciampo
force-pushed
the
codex/81188-bulk-suppress-dependency-import-lint
branch
from
August 6, 2026 08:54
d532a3c to
1302136
Compare
|
Flaky tests detected in 1302136. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31086848414
|
Base automatically changed from
codex/81188-define-dependency-import-lint-rules
to
trunk
August 6, 2026 09:32
ciampo
marked this pull request as ready for review
August 6, 2026 09:38
ciampo
force-pushed
the
codex/81188-bulk-suppress-dependency-import-lint
branch
from
August 6, 2026 10:21
5bb7862 to
20fdd7a
Compare
Contributor
Author
|
@manzoorwanijk all feedback addressed. I plan on merging this PR later today, I'll do a last rebase just before merging. |
tyxla
reviewed
Aug 6, 2026
tyxla
left a comment
Member
There was a problem hiding this comment.
Thank you so much for this cleanup! 🚀
ciampo
force-pushed
the
codex/81188-bulk-suppress-dependency-import-lint
branch
from
August 7, 2026 10:59
20fdd7a to
6d02d6d
Compare
ciampo
enabled auto-merge (squash)
August 7, 2026 11:04
amitraj2203
pushed a commit
that referenced
this pull request
Aug 10, 2026
* ESLint: Remove dependency import separators * ESLint: Replace strict config with suppressions * ESLint: Update snapshots after import cleanup * ESLint: Remove dependency import separators after rebase * ESLint: Activate dependency import rules globally * ESLint: Address dependency import cleanup feedback * ESLint: Refresh metadata after final rebase * ESLint: Finalize dependency import cleanup --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org>
ramonjd
added a commit
that referenced
this pull request
Aug 11, 2026
trunk removed the /** WordPress dependencies */ separators repo-wide and turned on @wordpress/dependency-group and import/order (#81248), so the import blocks in the files this branch adds no longer pass lint. Remove the separator comments and the blank lines between import groups.
shail-mehta
pushed a commit
that referenced
this pull request
Aug 12, 2026
* ESLint: Remove dependency import separators * ESLint: Replace strict config with suppressions * ESLint: Update snapshots after import cleanup * ESLint: Remove dependency import separators after rebase * ESLint: Activate dependency import rules globally * ESLint: Address dependency import cleanup feedback * ESLint: Refresh metadata after final rebase * ESLint: Finalize dependency import cleanup --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org>
jasmussen
added a commit
that referenced
this pull request
Aug 20, 2026
Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciampo
pushed a commit
that referenced
this pull request
Aug 21, 2026
Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciampo
pushed a commit
that referenced
this pull request
Aug 21, 2026
Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciampo
pushed a commit
that referenced
this pull request
Aug 27, 2026
Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciampo
pushed a commit
that referenced
this pull request
Aug 28, 2026
Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciampo
pushed a commit
that referenced
this pull request
Aug 28, 2026
Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ciampo
added a commit
that referenced
this pull request
Aug 28, 2026
* Icons: Redraw 34 prominent icons to strokes * Update changelog. * Fix issues with path overrides. * Fix CI: prettier formatting and item-group snapshots Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Update packages/components/CHANGELOG.md Co-authored-by: Lena Morita <lena@jaguchi.com> * Update Square, update changelog. * Update block-icon snapshot for redrawn image icon Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Icon: merge consumer style with icon's intrinsic style Both the components and icons Icon components replaced an icon's intrinsic style entirely when a consumer passed a style prop, stripping things like fill: none from stroke-based icons. Merge the two instead, so consumer styles layer on top and only override on explicit conflicts. Adds regression tests and corrects the changelog PR links to #78808. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Icons: normalise redrawn cover icon Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Icons: harden style-attribute parsing in the build script The CSS-string to JSX style-object conversion now skips malformed declarations and escapes values via JSON.stringify, and splits the declaration list with a tokenizer that ignores semicolons inside url() and quoted strings (so base64 data: URIs survive). Adds unit tests covering the splitter and the end-to-end conversion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Icon: also merge consumer style in the generic element branch Apply the same explicit style merge to the isValidElement fallback so a non-svg icon element's intrinsic style (e.g. fill: none) survives a consumer-supplied style prop, matching the svg branch. Adds a regression test, and tidies changelog spacing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Icons: allow stroke attributes in registry sanitization The icon registry sanitizes SVG content through wp_kses with an allowlist that omitted stroke-related attributes and inline styles. Stroke-based icons rely on stroke, stroke-width, stroke-linecap, stroke-linejoin, stroke-miterlimit, vector-effect, and style="fill: none", so server-side rendering stripped them and the icons rendered as solid black fills. Add these attributes to the svg and path allowlists in both the compat base class and the Gutenberg subclass override, so stroke icons render correctly regardless of which base class core provides. Co-Authored-By: Claude <noreply@anthropic.com> * Icons: preserve intrinsic SVG fill style through render Even with `style` in the kses allowlist, wp_kses filters the attribute value through safecss_filter_attr(), which drops CSS properties not on its allowlist. SVG presentation properties like `fill` are not allowed, so `style="fill: none"` was emptied and removed during sanitization, leaving stroke-based icons with a solid default fill. Temporarily register a safe_style_css filter while sanitizing to allow the SVG presentation properties (fill, stroke, stroke-width, stroke-linecap, stroke-linejoin, stroke-miterlimit) in both the compat base class and the Gutenberg subclass override. Additionally, the icon block overwrote the SVG's intrinsic style attribute when applying block styles. Merge the existing style with the generated CSS so `fill: none` survives, with block styles last to win on conflicts. Co-Authored-By: Claude <noreply@anthropic.com> * Update lib/class-wp-icons-registry-gutenberg.php Co-authored-by: Weston Ruter <westonruter@git.wordpress.org> * Update packages/icons/lib/generate-library.cjs Co-authored-by: Weston Ruter <westonruter@git.wordpress.org> * Icons: restore missing JSDoc comment opener in build script A previous suggestion application landed the JSDoc body without its opening /** delimiter, which left the file with orphaned * lines that break Node's parser. Restore the opener so the build runs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Icons: parse style declarations into key/value tuples Rename splitStyleDeclarations to parseStyleDeclarations and have it split each declaration on the first un-quoted, un-parenthesised colon as part of the same tokenisation pass. Returns Array<[key, value]> instead of string[], so the caller no longer needs a second indexOf parse to extract the value. Per Weston's review feedback. Adds tests for the colon-handling edge cases (colons inside parens, quotes, and `data:` URIs). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Icon: address review feedback on icon block and Icon component - Block icon's render: guard against an empty existing style when merging block styles, avoiding a leading semicolon when the intrinsic style is absent or whitespace-only. - Icon component: move the explicit style merge before ...restProps in the svg branch to match the generic element branch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Icons: drop type hints from Gutenberg sanitize override The override declared stricter types than WP_Icons_Registry::sanitize_icon_content() in the parent class, triggering a PHP signature-compatibility fatal: Declaration of WP_Icons_Registry_Gutenberg::sanitize_icon_content(string $icon_content): string must be compatible with WP_Icons_Registry::sanitize_icon_content($icon_content) Match the parent's untyped signature. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Icons: drop temporary safe_style_css filter from sanitize_icon_content The global safe_style_css filter added in #79172 (lib/compat/wordpress-7.1/kses.php) now allowlists SVG presentation properties, so the per-call filter that temporarily allowed fill/stroke properties during wp_kses() is redundant. Co-Authored-By: Claude <noreply@anthropic.com> * Icons: drop temporary safe_style_css filter from base registry shim Same cleanup as the previous commit, applied to the WP 7.0 compat base class. The global safe_style_css filter from #79172 covers the SVG presentation properties, making the per-call filter redundant here too. Co-Authored-By: Claude <noreply@anthropic.com> * Icons: drop safe_style_css comment from base registry shim Remove the explanatory comment about the global safe_style_css filter from the WP 7.0 base class for a cleaner sanitize_icon_content(). Co-Authored-By: Claude <noreply@anthropic.com> * Icon block: Add CSS to preserve stroke-scaling * Icons: drop dependency group comment from generate-library test Trunk removed the dependency grouping comment convention repo-wide in #81248 while this branch was open. The test file added here still carried one, so `npm run lint:js` failed after merging trunk in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Icons: Address remaining stroke icon feedback * BlockVariationPicker: Color stroke icons correctly * Icon: Normalize merged style prop order * Icons: Narrow inline style conversion * Icons: Clarify stroke compatibility * Icons: Link Core sanitizer backport * Icons: Remove mismatched Core backport link * Icons: Preserve stroke icon compatibility after rebase * Icons: Document recoloring and stroke conventions * Icons: Address final review feedback * Icons: Harden inline style conversion * Icons: Restore Core sanitizer backport link * Icon block: Add rotation style merge test * Icon block: Join rotation CSS with a semicolon * BlockVariationPicker: Restore legacy icon color fallback * Icons: Preserve clip rules during sanitization * Icon: Avoid injecting empty style props --------- Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: westonruter <westonruter@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: fcoveram <fcoveram@git.wordpress.org> Co-authored-by: simison <simison@git.wordpress.org>
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.
Follow-up to #81246 and part of #81188.
What?
Applies the repository-wide dependency import cleanup, preserves the remaining exceptions as suppressions, enables the final rules in the base ESLint configuration, and removes the temporary strict configuration.
Why?
#81246 prevents new violations in staged files. This PR completes the migration so the same convention is enforced by the normal repository-wide lint command without breaking existing code.
How?
import/orderviolations in the ESLint suppression file.@wordpress/dependency-groupandimport/orderin the base configuration.Testing Instructions
npm run test:unit -- packages/eslint-plugin/rules/__tests__/dependency-group.js --runInBand.npm run lint:js -- --format compact --quiet --prune-suppressions.npm run docs:api-ref.npm run lint:pkg-json.npm run lint:md:docs -- docs/contributors/folder-structure.md tools/eslint/README.md.Testing Instructions for Keyboard
Not applicable. This PR has no user interface changes.
TODO / Follow-ups
A later migration step can resolve the 62 suppressed
import/orderviolations.Use of AI Tools
This PR was authored with Codex.