Commit 26e7a56a3aa for woocommerce
commit 26e7a56a3aaff4a9d0b5490463c321280604b347
Author: Manzoor Wani <manzoorwani.jk@gmail.com>
Date: Mon Jun 29 15:24:04 2026 +0530
Decouple blocks reformat-files script from .eslintignore (#66079)
build(blocks): decouple reformat-files from .eslintignore
Add the directory ignores from .eslintignore into .prettierignore and
point the blocks reformat-files script at Prettier's default ignore file,
so it keeps working after .eslintignore is removed for the ESLint flat
config migration. .eslintignore is left in place for ESLint 8.
Part of WOOPLUG-6930.
diff --git a/plugins/woocommerce/changelog/wooplug-6930-prettier-ignore-decouple b/plugins/woocommerce/changelog/wooplug-6930-prettier-ignore-decouple
new file mode 100644
index 00000000000..f173af83bee
--- /dev/null
+++ b/plugins/woocommerce/changelog/wooplug-6930-prettier-ignore-decouple
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Decouple the blocks reformat-files script from .eslintignore by using a dedicated .prettierignore.
diff --git a/plugins/woocommerce/client/blocks/.prettierignore b/plugins/woocommerce/client/blocks/.prettierignore
index 2e2602c0dfb..4cebec5f693 100644
--- a/plugins/woocommerce/client/blocks/.prettierignore
+++ b/plugins/woocommerce/client/blocks/.prettierignore
@@ -1,2 +1,15 @@
*.json
*.yml
+
+build
+build-module
+coverage
+languages
+node_modules
+vendor
+legacy
+reports
+tests/e2e-jest/specs/backend/__fixtures__
+tests/e2e-jest/specs/backend/__snapshots__
+storybook/dist
+assets/js/interactivity
diff --git a/plugins/woocommerce/client/blocks/package.json b/plugins/woocommerce/client/blocks/package.json
index 405a699758f..942f16482b2 100644
--- a/plugins/woocommerce/client/blocks/package.json
+++ b/plugins/woocommerce/client/blocks/package.json
@@ -67,7 +67,7 @@
"lint:js-fix": "eslint assets/js --ext=js,jsx,ts,tsx --fix",
"lint:md:docs": "wp-scripts lint-md-docs",
"pre-commit": "lint-staged",
- "reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,jsx,ts,tsx,css,scss}\"",
+ "reformat-files": "prettier --write \"**/*.{js,jsx,ts,tsx,css,scss}\"",
"rimraf": "./node_modules/rimraf/bin.js",
"start": "rimraf ../../assets/client/blocks/* && BABEL_ENV=default CHECK_CIRCULAR_DEPS=true webpack --watch",
"storybook": "pnpm watch:build:storybook",