Commit ec85726bc05 for woocommerce
commit ec85726bc053e057fc924d7e867a93ab7a6ab1a8
Author: Luigi Teschio <gigitux@gmail.com>
Date: Mon Nov 16 15:12:15 2026 +0100
Avoid duplicate Admin and Blocks lint checks in Core CI (#70825)
* Avoid duplicate Admin and Blocks lint checks in Core CI
* Add changelog entries for lint job coverage
* Limit branch lint script changes to path exclusions
* Simplify Core lint ignore patterns
diff --git a/plugins/woocommerce/bin/eslint-branch.sh b/plugins/woocommerce/bin/eslint-branch.sh
index 1b9cf4e73a4..fd62f7eba1b 100644
--- a/plugins/woocommerce/bin/eslint-branch.sh
+++ b/plugins/woocommerce/bin/eslint-branch.sh
@@ -11,7 +11,12 @@
baseBranch=${1:-"origin/trunk"}
# shellcheck disable=SC2046
-changedFiles=$(git diff $(git merge-base HEAD $baseBranch) --relative --name-only --diff-filter=d -- '*.js' '*.jsx' '*.ts' '*.tsx')
+changedFiles=$(git diff $(git merge-base HEAD $baseBranch) --relative --name-only --diff-filter=d -- \
+ '*.js' '*.jsx' '*.ts' '*.tsx' \
+ ':(exclude)client/admin/client/**' \
+ ':(exclude)client/blocks/assets/**' \
+ ':(exclude)client/blocks/packages/**' \
+ ':(exclude)client/blocks/tests/**')
# Only complete this if changed files are detected.
if [[ -z $changedFiles ]]; then
diff --git a/plugins/woocommerce/changelog/fix-lint-job-overlap b/plugins/woocommerce/changelog/fix-lint-job-overlap
new file mode 100644
index 00000000000..0486963ed50
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-lint-job-overlap
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Avoid duplicate admin and blocks branch lint checks; CI tooling only, no production change.
diff --git a/plugins/woocommerce/client/admin/changelog/fix-lint-job-overlap b/plugins/woocommerce/client/admin/changelog/fix-lint-job-overlap
new file mode 100644
index 00000000000..eeb72925f5b
--- /dev/null
+++ b/plugins/woocommerce/client/admin/changelog/fix-lint-job-overlap
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Cover JSX changes in the admin lint job; CI tooling only, no production change.
diff --git a/plugins/woocommerce/client/admin/package.json b/plugins/woocommerce/client/admin/package.json
index aaa9713932f..0304a4f2ae5 100644
--- a/plugins/woocommerce/client/admin/package.json
+++ b/plugins/woocommerce/client/admin/package.json
@@ -224,7 +224,7 @@
"lint": {
"command": "lint",
"changes": [
- "client/**/*.{js,ts,tsx,scss}",
+ "client/**/*.{js,jsx,ts,tsx,scss}",
"stylelint.config.js"
]
},
diff --git a/plugins/woocommerce/client/blocks/changelog/fix-lint-job-overlap b/plugins/woocommerce/client/blocks/changelog/fix-lint-job-overlap
new file mode 100644
index 00000000000..65503da36c3
--- /dev/null
+++ b/plugins/woocommerce/client/blocks/changelog/fix-lint-job-overlap
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Cover JSX changes in the blocks lint job; CI tooling only, no production change.
diff --git a/plugins/woocommerce/client/blocks/package.json b/plugins/woocommerce/client/blocks/package.json
index 2b220268303..278ea089045 100644
--- a/plugins/woocommerce/client/blocks/package.json
+++ b/plugins/woocommerce/client/blocks/package.json
@@ -290,9 +290,9 @@
"lint": {
"command": "lint",
"changes": [
- "assets/**/*.{js,ts,tsx,scss}",
- "packages/**/*.{js,ts,tsx,scss}",
- "tests/**/*.{js,ts,tsx,scss}",
+ "assets/**/*.{js,jsx,ts,tsx,scss}",
+ "packages/**/*.{js,jsx,ts,tsx,scss}",
+ "tests/**/*.{js,jsx,ts,tsx,scss}",
".stylelintrc.json"
]
},
diff --git a/plugins/woocommerce/eslint.config.mjs b/plugins/woocommerce/eslint.config.mjs
index d0677ff197a..ea85e79b791 100644
--- a/plugins/woocommerce/eslint.config.mjs
+++ b/plugins/woocommerce/eslint.config.mjs
@@ -19,9 +19,8 @@ export default [
/*
* These only scope `eslint .` so it does not walk into trees that own a
* config. They do not decide which rules a file gets: ESLint 10 resolves
- * the nearest eslint.config.* for each file, so bin/eslint-branch.sh,
- * which passes explicit paths, still lints a changed client/legacy or
- * client/admin file with that package's own config.
+ * the nearest eslint.config.* for each file. The branch runner separately
+ * excludes source paths covered by the dedicated admin and blocks lint jobs.
*
* node_modules is ignored by default.
*/
diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json
index 69e879fb934..316f2ae7a26 100644
--- a/plugins/woocommerce/package.json
+++ b/plugins/woocommerce/package.json
@@ -150,7 +150,11 @@
"changes": [
"composer.lock",
"**/*.php",
- "**/*.js"
+ "**/*.{js,jsx,ts,tsx}"
+ ],
+ "ignore": [
+ "client/admin/client/**/*.{js,jsx,ts,tsx}",
+ "client/blocks/{assets,packages,tests}/**/*.{js,jsx,ts,tsx}"
]
},
"tests": [