From b076a7b521499e5676b21b4bff944f05856a4f3f Mon Sep 17 00:00:00 2001 From: Sam Seay Date: Wed, 31 May 2023 11:45:10 +1200 Subject: [PATCH] Fix linter issues and update Syncpack (#38523) --- .syncpackrc | 20 +- package.json | 8 +- .../js/components/changelog/dev-linter-fixes | 4 + .../select-control.tsx | 4 +- .../experimental-tree-control/tree-item.tsx | 2 +- packages/js/data/changelog/dev-linter-fixes | 4 + packages/js/data/src/products/types.ts | 2 +- .../eslint-plugin/changelog/dev-linter-fixes | 4 + .../js/eslint-plugin/configs/recommended.js | 2 + packages/js/eslint-plugin/package.json | 5 +- .../product-editor/changelog/dev-linter-fixes | 4 + .../js/product-editor/src/utils/init-block.ts | 2 +- plugins/woocommerce-admin/.eslintrc.js | 5 +- .../core-profiler/pages/BusinessInfo.tsx | 8 +- .../core-profiler/pages/UserProfile.tsx | 7 +- .../settings/general/store-address.tsx | 2 +- .../components/useJetpackPluginState.tsx | 2 +- .../components/useSendMagicLink.tsx | 2 +- .../task-lists/fills/products/constants.tsx | 2 +- plugins/woocommerce-admin/package.json | 4 +- .../changelog/dev-linter-fixes | 4 + plugins/woocommerce-beta-tester/package.json | 4 +- .../woocommerce/changelog/dev-linter-fixes | 4 + plugins/woocommerce/package.json | 2 +- pnpm-lock.yaml | 482 +++++++----------- 25 files changed, 256 insertions(+), 333 deletions(-) create mode 100644 packages/js/components/changelog/dev-linter-fixes create mode 100644 packages/js/data/changelog/dev-linter-fixes create mode 100644 packages/js/eslint-plugin/changelog/dev-linter-fixes create mode 100644 packages/js/product-editor/changelog/dev-linter-fixes create mode 100644 plugins/woocommerce-beta-tester/changelog/dev-linter-fixes create mode 100644 plugins/woocommerce/changelog/dev-linter-fixes diff --git a/.syncpackrc b/.syncpackrc index 92924797133..3a29fb5af7d 100644 --- a/.syncpackrc +++ b/.syncpackrc @@ -75,11 +75,9 @@ }, { "dependencies": [ - "@wordpress/eslint-plugin", "@wordpress/babel-plugin-import-jsx-pragma", "@wordpress/babel-preset-default", "@wordpress/stylelint-config", - "@wordpress/prettier-config", "@wordpress/scripts", "@wordpress/jest-console", "@wordpress/dependency-extraction-webpack-plugin", @@ -115,6 +113,24 @@ ], "isIgnored": true }, + { + "dependencies": [ + "@wordpress/prettier-config" + ], + "packages": [ + "**" + ], + "pinVersion": "2.17.0" + }, + { + "dependencies": [ + "@wordpress/eslint-plugin" + ], + "packages": [ + "**" + ], + "pinVersion": "14.7.0" + }, { "dependencies": [ "@wordpress/env" diff --git a/package.json b/package.json index dc0cc55d9b0..174978b240c 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "@types/node": "^16.18.18", "@woocommerce/eslint-plugin": "workspace:*", "@wordpress/data": "wp-6.0", - "@wordpress/eslint-plugin": "^11.1.0", - "@wordpress/prettier-config": "^1.4.0", + "@wordpress/eslint-plugin": "14.7.0", + "@wordpress/prettier-config": "2.17.0", "babel-loader": "^8.3.0", "chalk": "^4.1.2", "copy-webpack-plugin": "^10.2.4", @@ -53,12 +53,12 @@ "moment": "^2.29.4", "node-stream-zip": "^1.15.0", "postcss-loader": "^4.3.0", - "prettier": "npm:wp-prettier@^2.6.2", + "prettier": "npm:wp-prettier@^2.8.5", "regenerator-runtime": "^0.13.11", "request": "^2.88.2", "sass": "^1.59.3", "sass-loader": "^10.4.1", - "syncpack": "^9.8.4", + "syncpack": "^10.1.0", "turbo": "^1.9.3", "typescript": "^4.9.5", "url-loader": "^1.1.2", diff --git a/packages/js/components/changelog/dev-linter-fixes b/packages/js/components/changelog/dev-linter-fixes new file mode 100644 index 00000000000..3f90d9fdcc5 --- /dev/null +++ b/packages/js/components/changelog/dev-linter-fixes @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Lint fixes diff --git a/packages/js/components/src/experimental-select-control/select-control.tsx b/packages/js/components/src/experimental-select-control/select-control.tsx index 0bb76218a6e..7b8e6cf5c7f 100644 --- a/packages/js/components/src/experimental-select-control/select-control.tsx +++ b/packages/js/components/src/experimental-select-control/select-control.tsx @@ -280,7 +280,7 @@ function SelectControl< ItemType = DefaultItemType >( { ) } > { /* Downshift's getLabelProps handles the necessary label attributes. */ } - { /* eslint-disable jsx-a11y/label-has-for */ } + { /* eslint-disable jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ } { label && ( ) } - { /* eslint-enable jsx-a11y/label-has-for */ } + { /* eslint-enable jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ } - { /* eslint-disable-next-line jsx-a11y/label-has-for */ } + { /* eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */ }