Skip to content

Commit

Permalink
eslint: Enable more temporarily-disabled rules (#39057)
Browse files Browse the repository at this point in the history
* `no-undef-init`: One instance fixed.
* `no-prototype-builtins`: Swapped a lot of calls to `.hasOwnProperty()`
  with `Object.hasOwn()`, since all browsers we support appear to
  support that.
* `no-unused-expressions`: Enabled, but with `allowShortCircuit` and
  `allowTernary` set true since we have a lot of that. Fixing these
  caught bugs in two different places!

Also, moved the `eqeqeq` override ignoring `== null` from "temporarily
disabled" to "maybe we want to keep this override permanently", to be
decided later. Put the `no-unused-expressions` allowing of short-circuit
and ternarys there too.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10583749686

Upstream-Ref: Automattic/jetpack@62905b8
  • Loading branch information
anomiex authored and matticbot committed Aug 27, 2024
1 parent a9da0a3 commit 35aaf9b
Show file tree
Hide file tree
Showing 27 changed files with 154 additions and 140 deletions.
78 changes: 39 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-blaze/build/editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-script-data', 'lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '2d2aa2f7699a282be179');
<?php return array('dependencies' => array('jetpack-script-data', 'lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'b7b3824cb20211dce859');
2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-blaze/build/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-blaze/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"require": {
"php": ">=7.0",
"automattic/jetpack-assets": "^2.3.4",
"automattic/jetpack-connection": "^2.12.4",
"automattic/jetpack-connection": "^2.12.5-alpha",
"automattic/jetpack-constants": "^2.0.4",
"automattic/jetpack-plans": "^0.4.8",
"automattic/jetpack-redirect": "^2.0.3",
Expand Down
5 changes: 5 additions & 0 deletions vendor/automattic/jetpack-connection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.12.5-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

## [2.12.4] - 2024-08-23
### Changed
- Updated package dependencies. [#39004]
Expand Down Expand Up @@ -1162,6 +1166,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Separate the connection library into its own package.

[2.12.5-alpha]: https://github.com/Automattic/jetpack-connection/compare/v2.12.4...v2.12.5-alpha
[2.12.4]: https://github.com/Automattic/jetpack-connection/compare/v2.12.3...v2.12.4
[2.12.3]: https://github.com/Automattic/jetpack-connection/compare/v2.12.2...v2.12.3
[2.12.2]: https://github.com/Automattic/jetpack-connection/compare/v2.12.1...v2.12.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'd40b533924e16c083ac0');
<?php return array('dependencies' => array('react', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '8f67321a68ba05b3a5b7');
12 changes: 6 additions & 6 deletions vendor/automattic/jetpack-connection/dist/identity-crisis.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Package_Version {

const PACKAGE_VERSION = '2.12.4';
const PACKAGE_VERSION = '2.12.5-alpha';

const PACKAGE_SLUG = 'connection';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import './style.scss';
* The initial renderer function.
*/
function render() {
if ( ! window.hasOwnProperty( 'JP_IDENTITY_CRISIS__INITIAL_STATE' ) ) {
if ( ! Object.hasOwn( window, 'JP_IDENTITY_CRISIS__INITIAL_STATE' ) ) {
return;
}

Expand Down Expand Up @@ -47,10 +47,10 @@ function render() {
tracksUserData={ tracksUserData || {} }
tracksEventData={ tracksEventData }
customContent={
consumerData.hasOwnProperty( 'customContent' ) ? consumerData.customContent : {}
Object.hasOwn( consumerData, 'customContent' ) ? consumerData.customContent : {}
}
isAdmin={ isAdmin }
logo={ consumerData.hasOwnProperty( 'logo' ) ? consumerData.logo : undefined }
logo={ Object.hasOwn( consumerData, 'logo' ) ? consumerData.logo : undefined }
possibleDynamicSiteUrlDetected={ possibleDynamicSiteUrlDetected }
isDevelopmentSite={ isDevelopmentSite }
/>
Expand Down
2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-jitm/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"php": ">=7.0",
"automattic/jetpack-a8c-mc-stats": "^2.0.2",
"automattic/jetpack-assets": "^2.3.4",
"automattic/jetpack-connection": "^2.12.4",
"automattic/jetpack-connection": "^2.12.5-alpha",
"automattic/jetpack-device-detection": "^2.1.4",
"automattic/jetpack-logo": "^2.0.4",
"automattic/jetpack-redirect": "^2.0.3",
Expand Down
2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-masterbar/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"automattic/jetpack-blaze": "^0.22.7",
"automattic/jetpack-compat": "^3.0.2",
"automattic/jetpack-device-detection": "^2.1.4",
"automattic/jetpack-connection": "^2.12.4",
"automattic/jetpack-connection": "^2.12.5-alpha",
"automattic/jetpack-jitm": "^3.1.18",
"automattic/jetpack-logo": "^2.0.4",
"automattic/jetpack-plans": "^0.4.8",
Expand Down
Loading

0 comments on commit 35aaf9b

Please sign in to comment.