Conversation
The move to @wordpress/scripts expected the global stylesheet at client/main.scss, but the rename never landed, and the screenshots rework later removed client/theme.js without dropping its entry. Point the build back at existing files, remove the orphaned build/theme.js, and rebuild the stylesheet, which drops the image gallery styles whose source is already gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply `npm run format` so the files match the theme's @wordpress/scripts configuration. Formatting only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace .eslintignore, which ESLint 9 no longer reads, with an eslint.config.js that stops excluding js/, and fix what the linter reports: - Declare the categorization form's REST field name instead of leaking it as a global. - Keep a reference to the categorization button so its spinner clears after a successful save. - Look up the categorization form's controls only once the form is known to exist. - Use block-scoped declarations and explicit window globals throughout. Version the affected scripts by file modification time, as the theme's other scripts already are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 9 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (29)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Limit the token to reading contents, since the repository default grants write access. Don't persist that token in the checkout, and skip dependency install scripts, so third-party packages never run next to it. Pass the PHPCS base ref through the environment rather than interpolating it into the script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to #953 (Meta Trac #8446), which surfaced that the Plugin Directory theme's
js/directory was excluded from linting and that nothing lints the theme in CI.Changes
Fix the theme build.
npm run buildfails on trunk:client/main.scss, but thestyle.scss→main.scssrename didn't make it into the commit. The rename matters: an entry namedstylemakes webpack emitbuild/style-style.css.client/theme.jsbut kept its entry and the committedbuild/theme.js, which nothing enqueues.Rebuilding the stylesheet drops the image gallery and
.plugin-screenshotsrules whose source r14950 removed; nothing references them any more (only theplugin-screenshots__*BEM classes are in use).Format.
npm run formatonjs/andsrc/, in a formatting-only commit.Lint.
.eslintignoreis replaced byeslint.config.js(ESLint 9 no longer reads the former), without thejs/exclusion.@wordpress/*imports are exempted fromimport/no-unresolvedsince they're script dependencies provided at runtime. Fixing the remaining errors turned up a few real bugs insection-categorization.js:rest_namewas never declared, so it leaked as a global.buttonheld the return value ofclassList.add()(alwaysundefined), so the spinner never cleared after a successful save.! formcheck.The four
js/scripts with hard-coded versions now usefilemtime(), like the theme's other scripts, so the changes reach browsers.CI. New
plugins-theme-lint.yml, modeled onstyle-lint.yml, runsnpm run lint:json PRs and trunk pushes touching the theme's JS orpackage.json.Notes
package-lock.jsonis gitignored repo-wide, so CI installs frompackage.json.@wordpress/scriptsis pinned, but transitive dependencies float — which is also why onlybuild/blocks/plugin-card/view.*is rebuilt here: a full rebuild changes every block bundle through toolchain drift alone (webpack runtime,asset.phpformatting). For the same reason CI doesn't check build output for drift.js/navigation.jsandjs/skip-link-focus-fix.jslook like leftovers from the classic theme (no#site-navigationin the block templates; the skip-link fix targets old IE/Opera), but removing them is out of scope here.Testing
npm run lint:jspasses in the theme directory.npm run buildsucceeds;build/style.cssdiffers from trunk only by the removed gallery rules.🤖 Generated with Claude Code