Commit 26b2ff5690c for woocommerce

commit 26b2ff5690cb03a5f6a60a7f2fbc383bf5d4194c
Author: Ján Mikláš <neosinner@gmail.com>
Date:   Tue Nov 17 17:41:17 2026 +0100

    Share extension lint and analysis defaults (#71059)

    * feat: share the Jest 30 ESLint setting

    * feat: share extension analysis presets

    * docs: record extension lint defaults

diff --git a/packages/js/eslint-plugin/README.md b/packages/js/eslint-plugin/README.md
index 8d8eb420d9b..1f5af6c9ae3 100644
--- a/packages/js/eslint-plugin/README.md
+++ b/packages/js/eslint-plugin/README.md
@@ -67,6 +67,16 @@ export default [

 Refer to the [ESLint documentation on Flat Config](https://eslint.org/docs/latest/use/configure/configuration-files) for more information.

+### Jest 30 rules without a Jest install
+
+When your extension uses the Jest 30 rules from `recommended` without Jest installed, add `woocommerce.configs.jest30` after the recommended config. The setting gives the Jest plugin a version when it cannot detect one. Keep your test runner and file-specific overrides in your own config.
+
+```js
+import woocommerce from '@woocommerce/eslint-plugin';
+
+export default [ ...woocommerce.configs.recommended, woocommerce.configs.jest30 ];
+```
+
 ### Do not register `import` or `react` yourself

 `eslint-plugin-import` and `eslint-plugin-react` do not support ESLint v10.
diff --git a/packages/js/eslint-plugin/changelog/wooprd-4107-jest-30 b/packages/js/eslint-plugin/changelog/wooprd-4107-jest-30
new file mode 100644
index 00000000000..3fa8ca07bb4
--- /dev/null
+++ b/packages/js/eslint-plugin/changelog/wooprd-4107-jest-30
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add an opt-in Jest 30 lint setting for extensions that use the recommended config without installing Jest.
diff --git a/packages/js/eslint-plugin/index.js b/packages/js/eslint-plugin/index.js
index 5f057bba8b9..637456fbcbb 100644
--- a/packages/js/eslint-plugin/index.js
+++ b/packages/js/eslint-plugin/index.js
@@ -43,5 +43,10 @@ module.exports = {
 	},
 	configs: {
 		recommended: dedupePlugins( require( './configs/recommended' ) ),
+		jest30: {
+			settings: {
+				jest: { version: 30 },
+			},
+		},
 	},
 };
diff --git a/packages/js/extension-tooling/README.md b/packages/js/extension-tooling/README.md
index 18e679e6bbe..5989aa7925e 100644
--- a/packages/js/extension-tooling/README.md
+++ b/packages/js/extension-tooling/README.md
@@ -59,6 +59,23 @@ Add this mapping alongside the extension's existing `wp-content/bin` mapping in

 Use `wp-env run cli bash wp-content/woo-extension-tooling/seed-dev.sh wp-content/bin/seed_dev_plugin.sh` for `env:dev:seed`. Pass the fixture hook's path inside the container. Include WooCommerce Gateway Dummy in the development site's plugin list to use the seeded dummy payment method.

+## Lint and analysis presets
+
+If your Stylelint config already disables `selector-class-pattern` for legacy SCSS, extend the shared overlay after the WordPress preset. Keep any file-specific rules in your own config.
+
+```json
+{
+	"extends": [
+		"@wordpress/stylelint-config/scss-stylistic",
+		"@woocommerce/extension-tooling/stylelint/legacy-scss"
+	]
+}
+```
+
+Add `configs/phpstan.neon` from the pinned tooling source as the last entry in PHPStan's `includes` list. To use analysis level 8 and a two-process cap, remove the local `level` and `parallel.maximumNumberOfProcesses` settings, which take precedence over included values. Composer-only jobs can read the file directly from the same checkout. Keep the PHP target version, paths, bootstrap, stubs, and baseline in your extension config.
+
+For PHPCS, extend the `WooCommerce-Core` standard from `woocommerce/woocommerce-sniffs`. Define text domains, PHP compatibility checks, and exclusions in the extension's ruleset.
+
 ## License

 GPL-3.0-or-later. The helpers originated in WooCommerce Composite Products.
diff --git a/packages/js/extension-tooling/changelog/wooprd-4107-lint-defaults b/packages/js/extension-tooling/changelog/wooprd-4107-lint-defaults
new file mode 100644
index 00000000000..e00127a7022
--- /dev/null
+++ b/packages/js/extension-tooling/changelog/wooprd-4107-lint-defaults
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Share opt-in Stylelint and PHPStan presets for WooCommerce extensions.
diff --git a/packages/js/extension-tooling/configs/phpstan.neon b/packages/js/extension-tooling/configs/phpstan.neon
new file mode 100644
index 00000000000..714f7e8b601
--- /dev/null
+++ b/packages/js/extension-tooling/configs/phpstan.neon
@@ -0,0 +1,4 @@
+parameters:
+    level: 8
+    parallel:
+        maximumNumberOfProcesses: 2
diff --git a/packages/js/extension-tooling/configs/stylelint-legacy-scss.json b/packages/js/extension-tooling/configs/stylelint-legacy-scss.json
new file mode 100644
index 00000000000..f290422c365
--- /dev/null
+++ b/packages/js/extension-tooling/configs/stylelint-legacy-scss.json
@@ -0,0 +1,5 @@
+{
+	"rules": {
+		"selector-class-pattern": null
+	}
+}
diff --git a/packages/js/extension-tooling/package.json b/packages/js/extension-tooling/package.json
index 8c5a7261448..3b1b67a4b11 100644
--- a/packages/js/extension-tooling/package.json
+++ b/packages/js/extension-tooling/package.json
@@ -16,7 +16,8 @@
 	"exports": {
 		"./webpack-dist-minify": "./src/webpack-dist-minify.js",
 		"./webpack-text-includes": "./src/webpack-text-includes.js",
-		"./check-i18n": "./src/check-i18n.js"
+		"./check-i18n": "./src/check-i18n.js",
+		"./stylelint/legacy-scss": "./configs/stylelint-legacy-scss.json"
 	},
 	"bin": {
 		"woo-extension-config": "./bin/woo-config.sh",
@@ -25,6 +26,7 @@
 	},
 	"files": [
 		"bin",
+		"configs",
 		"src"
 	],
 	"publishConfig": {