Skip to content

Eslint: update WP eslint and add new components-no-missing-40px-size-prop#46640

Closed
simison wants to merge 2 commits into
trunkfrom
update/js-tools-eslint-no-missing-40px-size-prop
Closed

Eslint: update WP eslint and add new components-no-missing-40px-size-prop#46640
simison wants to merge 2 commits into
trunkfrom
update/js-tools-eslint-no-missing-40px-size-prop

Conversation

@simison
Copy link
Copy Markdown
Member

@simison simison commented Jan 16, 2026

WIP: didn't fix errors yet, current status:

✖ 318 problems (303 errors, 15 warnings)
  0 errors and 15 warnings potentially fixable with the `--fix` option.

Proposed changes:

  • Try new @wordpress/components-no-missing-40px-size-prop rule

Rule was added in WordPress/gutenberg#74622

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Lint CI or run pnpm run lint manually
  • Try to introduce a lint error (ie. omitting the __next40pxDefaultSize prop), make sure that the linter correctly reports it

Copilot AI review requested due to automatic review settings January 16, 2026 15:11
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 16, 2026

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the update/js-tools-eslint-no-missing-40px-size-prop branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/js-tools-eslint-no-missing-40px-size-prop
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/js-tools-eslint-no-missing-40px-size-prop

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the WordPress ESLint plugin from version 23.0.0 to 24.0.0 and enables a new ESLint rule @wordpress/components-no-missing-40px-size-prop with the checkLocalImports: true option.

Changes:

  • Updates @wordpress/eslint-plugin dependency from 23.0.0 to 24.0.0
  • Enables the new components-no-missing-40px-size-prop rule with local import checking
  • Updates pnpm-lock.yaml with all transitive dependency updates for the new ESLint plugin version

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
tools/js-tools/package.json Updates @wordpress/eslint-plugin from 23.0.0 to 24.0.0
tools/js-tools/eslintrc/base.mjs Adds configuration for the new components-no-missing-40px-size-prop rule with checkLocalImports option
pnpm-lock.yaml Updates lock file with transitive dependencies for the new WordPress ESLint plugin version
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

// Replacement for throttle is not as straightforward as you-dont-need-lodash-underscore claims.
'you-dont-need-lodash-underscore/throttle': 'off',

'@wordpress/components-no-missing-40px-size-prop': 'error',
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could start with warning too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right place to add this. This is a configuration block specific to the you-dont-need-lodash-underscore package.

Warning or error doesn't matter. I tend towards a philosophy of "non-required linter warnings are fairly pointless because people will ignore them", so our CI requires warnings to be fixed as well as errors.

@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented Jan 16, 2026

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

@simison simison force-pushed the update/js-tools-eslint-no-missing-40px-size-prop branch from 721e5dd to 5e429f4 Compare January 16, 2026 17:15
Copilot AI review requested due to automatic review settings January 16, 2026 17:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Copy link
Copy Markdown
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

// Replacement for throttle is not as straightforward as you-dont-need-lodash-underscore claims.
'you-dont-need-lodash-underscore/throttle': 'off',

'@wordpress/components-no-missing-40px-size-prop': 'error',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right place to add this. This is a configuration block specific to the you-dont-need-lodash-underscore package.

Warning or error doesn't matter. I tend towards a philosophy of "non-required linter warnings are fairly pointless because people will ignore them", so our CI requires warnings to be fixed as well as errors.

},
},
},
rules: {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the start of this block (since "@wordpress/c" sorts before the existing "@wordpress/i" rule) would be more appropriate.

Comment thread pnpm-lock.yaml
resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
engines: {node: '>=6.9.0'}

'@babel/code-frame@7.28.6':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A run of pnpm dedupe would be nice to avoid all these extra package versions.

Even better, since the linting rule isn't enabled by default, I think I'll tell Renovate to go ahead with the update of the whole @wordpress/* monorepo (which will include this package), and then this PR can be a follow-up to enable the new rule.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on that in #46647

@ciampo
Copy link
Copy Markdown
Contributor

ciampo commented Jan 28, 2026

@simison sorry for the late reply (meetup + sick AFK), I can see @anomiex already left a relevant review. Happy to take another look at a later point!

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as stale. This happened because:

  • It has been inactive for the past 3 months.
  • It hasn't been labeled `[Pri] BLOCKER`, `[Pri] High`, `[Status] Keep Open`, etc.

If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.

If the PR is not updated (or at least commented on) in another month, it will be automatically closed.

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR.

@github-actions github-actions Bot closed this Apr 30, 2026
@github-actions github-actions Bot deleted the update/js-tools-eslint-no-missing-40px-size-prop branch April 30, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants