Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add textdomain validation to .eslintrc.js #5021

Merged
merged 2 commits into from
Nov 8, 2021

Conversation

nielslange
Copy link
Member

@nielslange nielslange commented Oct 28, 2021

Discovered in #5005 and #5020

Note

At the moment, we only validate the textdomain within PHP files based on the following PHPCS rule:

https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/888760656a13e83562fc1e995822043c931fe339/phpcs.xml#L18-L22

However, we do not validate the textdomain within JS, TS and TSX files. This PR aims to add textdomain validation for these files.

The solution, I used, is coming from Gutenberg. The following pages provide more information:

In my solution, I used the textdomains default and woo-gutenberg-products-block. woo-gutenberg-products-block validates our plugin-related textdomain, while default allows having strings without textdomain, such as default WordPress elements which get their translation directly from core. An example for such a string can be found here:

https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/20389f280acd3663f22eac3a1c0b132a64e9fd0c/assets/js/blocks/handpicked-products/block.js#L168-L178

Demo output

Output when allowing an empty textdomain
$ npm run lint:js                                                                                         1 ✘  took 26s  

> @woocommerce/[email protected] lint:js /Users/nielslange/Plugins/woocommerce-gutenberg-products-block
> wp-scripts lint-js --ext=js,ts,tsx


/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/cart-checkout/checkout/inner-blocks/checkout-terms-block/constants.js
   8:33  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  12:4   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  15:35  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  19:4   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  23:2   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  33:2   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/cart-checkout/payment-methods/saved-payment-method-options.js
  41:4  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/payment-method-extensions/payment-methods/stripe/credit-card/elements.js
  124:8  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  141:8  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  155:8  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/payment-method-extensions/payment-methods/stripe/payment-request/use-initialization.js
  193:7  error  Invalid text domain 'woocommerce-gateway-stripe'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/payment-method-extensions/payment-methods/stripe/stripe-utils/utils.js
  167:34  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  171:40  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  175:39  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  179:31  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  183:36  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  187:37  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  191:34  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  195:37  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  199:32  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  203:33  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  207:33  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  211:44  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  215:33  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  219:27  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  223:36  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  234:11  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  239:11  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

✖ 28 problems (28 errors, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @woocommerce/[email protected] lint:js: `wp-scripts lint-js --ext=js,ts,tsx`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @woocommerce/[email protected] lint:js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nielslange/.npm/_logs/2021-10-28T03_41_34_672Z-debug.log
Output when not allowing an empty textdomain
$ npm run lint:js                                                                                         1 ✘  took 28s  

> @woocommerce/[email protected] lint:js /Users/nielslange/Plugins/woocommerce-gutenberg-products-block
> wp-scripts lint-js --ext=js,ts,tsx


/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/atomic/blocks/product-elements/price/edit.js
  39:13  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/cart-checkout/checkout/inner-blocks/checkout-terms-block/constants.js
   8:33  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  12:4   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  15:35  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  19:4   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  23:2   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  33:2   error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/cart-checkout/payment-methods/saved-payment-method-options.js
  41:4  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/featured-category/block.js
  114:15  error  Missing text domain  @wordpress/i18n-text-domain
  178:18  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/featured-product/block.js
  164:15  error  Missing text domain  @wordpress/i18n-text-domain
  240:18  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/handpicked-products/block.js
  172:16  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/product-category/block.js
  293:16  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/product-tag/block.js
  275:16  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/blocks/products-by-attribute/block.js
  173:16  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/editor-components/heading-toolbar/index.js
  25:20  error  Missing text domain  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/payment-method-extensions/payment-methods/stripe/credit-card/elements.js
  124:8  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  141:8  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  155:8  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/payment-method-extensions/payment-methods/stripe/payment-request/use-initialization.js
  193:7  error  Invalid text domain 'woocommerce-gateway-stripe'  @wordpress/i18n-text-domain

/Users/nielslange/Plugins/woocommerce-gutenberg-products-block/assets/js/payment-method-extensions/payment-methods/stripe/stripe-utils/utils.js
  167:34  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  171:40  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  175:39  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  179:31  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  183:36  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  187:37  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  191:34  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  195:37  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  199:32  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  203:33  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  207:33  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  211:44  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  215:33  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  219:27  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  223:36  error  Invalid text domain 'woocommerce-gateway-stripe'    @wordpress/i18n-text-domain
  234:11  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain
  239:11  error  Invalid text domain 'woo-gutenberg-product-blocks'  @wordpress/i18n-text-domain

✖ 38 problems (38 errors, 0 warnings)
  38 errors and 0 warnings potentially fixable with the `--fix` option.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @woocommerce/[email protected] lint:js: `wp-scripts lint-js --ext=js,ts,tsx`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @woocommerce/[email protected] lint:js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nielslange/.npm/_logs/2021-10-28T04_38_35_417Z-debug.log

Benefits

In case a change contains an incorrect textdomain, this problem then gets automatically detected as seen on https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/5021/files.

Questions

Shall we allow the use of an empty textdomain?

As mentioned before, there are some sections in which we're not using a textdomain. However, these strings are still listed on WordPress.org and can be translated there. This might lead to confusion if a string is translated there, but this translation does not appear in our plugin.

Shall we allow the use of external textdomains?

Similar to the previous question, some sections use the textdomain woocommerce-gateway-stripe. While these sections are related to the WooCommerce Stripe extension, if the upstream changes one of these strings, then it's no longer translated. Furthermore, as mentioned in the question before, it can be confusing that the strings are editable on WordPress.org, but will not show up within our plugin due to the different textdomain.

@nielslange nielslange added tools Used for work on build or release tools. focus: i18n The issue/PR is related to internationalization. skip-changelog PRs that you don't want to appear in the changelog. labels Oct 28, 2021
@nielslange nielslange marked this pull request as draft October 28, 2021 04:24
@rubikuserbot rubikuserbot requested review from a team and mikejolley and removed request for a team October 28, 2021 04:24
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2021

Size Change: +8.37 kB (+1%)

Total Size: 1.11 MB

Filename Size Change
build/active-filters-frontend.js 8.18 kB -149 B (-2%)
build/active-filters.js 8 kB -4 B (0%)
build/all-products-frontend.js 23.1 kB -161 B (-1%)
build/all-products.js 38 kB +144 B (0%)
build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js 3.19 kB -2 B (0%)
build/atomic-block-components/add-to-cart--atomic-block-components/button.js 1.81 kB -1 B (0%)
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js 0 B -332 B (removed) 🏆
build/atomic-block-components/add-to-cart-frontend.js 8.34 kB -170 B (-2%)
build/atomic-block-components/add-to-cart.js 7.85 kB +11 B (0%)
build/atomic-block-components/button-frontend.js 1.74 kB -3 B (0%)
build/atomic-block-components/category-list-frontend.js 467 B +3 B (+1%)
build/atomic-block-components/category-list.js 469 B -1 B (0%)
build/atomic-block-components/image-frontend.js 1.71 kB -173 B (-9%)
build/atomic-block-components/image.js 1.36 kB +13 B (+1%)
build/atomic-block-components/price-frontend.js 2.13 kB -3 B (0%)
build/atomic-block-components/price.js 2.11 kB +2 B (0%)
build/atomic-block-components/rating-frontend.js 563 B +2 B (0%)
build/atomic-block-components/rating.js 565 B -1 B (0%)
build/atomic-block-components/sale-badge-frontend.js 861 B +2 B (0%)
build/atomic-block-components/sku-frontend.js 391 B -1 B (0%)
build/atomic-block-components/summary.js 912 B +1 B (0%)
build/atomic-block-components/tag-list-frontend.js 467 B +1 B (0%)
build/atomic-block-components/title-frontend.js 1.48 kB -76 B (-5%)
build/atomic-block-components/title.js 1.47 kB +95 B (+7%) 🔍
build/attribute-filter-frontend.js 18.1 kB -175 B (-1%)
build/attribute-filter.js 12.1 kB -5 B (0%)
build/blocks-checkout.js 21 kB -22 B (0%)
build/cart-blocks/accepted-payment-methods-frontend.js 1.39 kB -2 B (0%)
build/cart-blocks/checkout-button-frontend.js 1.22 kB -22 B (-2%)
build/cart-blocks/express-payment--checkout-blocks/express-payment--checkout-blocks/payment-frontend.js 4.73 kB +7 B (0%)
build/cart-blocks/express-payment-frontend.js 1.58 kB -5 B (0%)
build/cart-blocks/filled-cart-frontend.js 806 B -2 B (0%)
build/cart-blocks/line-items-frontend.js 5.85 kB +45 B (+1%)
build/cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js 3.69 kB +1 B (0%)
build/cart-blocks/order-summary-frontend.js 7.4 kB -12 B (0%)
build/cart-frontend.js 52.2 kB -618 B (-1%)
build/cart.js 50.5 kB +23 B (0%)
build/checkout-blocks/actions-frontend.js 1.48 kB -26 B (-2%)
build/checkout-blocks/billing-address-frontend.js 2.64 kB -24 B (-1%)
build/checkout-blocks/contact-information-frontend.js 3.87 kB -22 B (-1%)
build/checkout-blocks/express-payment-frontend.js 1.93 kB +1 B (0%)
build/checkout-blocks/fields-frontend.js 346 B -1 B (0%)
build/checkout-blocks/order-note-frontend.js 1.56 kB -2 B (0%)
build/checkout-blocks/order-summary-frontend.js 12.8 kB +64 B (+1%)
build/checkout-blocks/payment-frontend.js 4.56 kB -28 B (-1%)
build/checkout-blocks/shipping-address-frontend.js 3.03 kB -23 B (-1%)
build/checkout-blocks/shipping-methods-frontend.js 5.54 kB -20 B (0%)
build/checkout-blocks/terms-frontend.js 1.65 kB -2 B (0%)
build/checkout-blocks/totals-frontend.js 329 B -1 B (0%)
build/checkout-frontend.js 54.4 kB -679 B (-1%)
build/checkout.js 54 kB +28 B (0%)
build/featured-product.js 9.42 kB -6 B (0%)
build/handpicked-products.js 6.27 kB +3 B (0%)
build/mini-cart-component-frontend.js 44.4 kB +7.45 kB (+20%) 🚨
build/mini-cart-frontend.js 2.34 kB +13 B (+1%)
build/mini-cart.js 5.72 kB +434 B (+8%) 🔍
build/price-filter-frontend.js 14.2 kB -197 B (-1%)
build/price-filter.js 9.65 kB -5 B (0%)
build/product-best-sellers.js 6.62 kB -8 B (0%)
build/product-categories.js 3.37 kB -1 B (0%)
build/product-category.js 7.49 kB -2 B (0%)
build/product-new.js 6.77 kB -9 B (0%)
build/product-on-sale.js 7.11 kB -17 B (0%)
build/product-search.js 2.68 kB +3 B (0%)
build/product-tag.js 6.6 kB +8 B (0%)
build/product-top-rated.js 6.74 kB -6 B (0%)
build/products-by-attribute.js 7.7 kB -3 B (0%)
build/reviews-by-category.js 11.4 kB -11 B (0%)
build/reviews-by-product.js 13 kB -11 B (0%)
build/reviews-frontend.js 8.97 kB +10 B (0%)
build/single-product-frontend.js 26.6 kB +23 B (0%)
build/single-product.js 9.75 kB -18 B (0%)
build/stock-filter-frontend.js 8.62 kB -142 B (-2%)
build/stock-filter.js 7.81 kB -7 B (0%)
build/vendors--atomic-block-components/add-to-cart-frontend.js 4.77 kB -6 B (0%)
build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js 3.14 kB +36 B (+1%)
build/wc-blocks-editor-style-rtl.css 15.7 kB +98 B (+1%)
build/wc-blocks-editor-style.css 15.7 kB +101 B (+1%)
build/wc-blocks-middleware.js 1.19 kB -282 B (-19%) 👏
build/wc-blocks-registry.js 3.71 kB +1 B (0%)
build/wc-blocks-shared-context.js 1.54 kB -5 B (0%)
build/wc-blocks-shared-hocs.js 1.92 kB +172 B (+10%) ⚠️
build/wc-blocks-style-rtl.css 21 kB +399 B (+2%)
build/wc-blocks-style.css 21 kB +401 B (+2%)
build/wc-blocks-vendors.js 254 kB +157 B (0%)
build/wc-blocks.js 3.49 kB -1 B (0%)
build/wc-settings.js 2.91 kB -1 B (0%)
build/legacy-template.js 2.12 kB +2.12 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
build/all-reviews.js 9.57 kB
build/atomic-block-components/button.js 874 B
build/atomic-block-components/sale-badge.js 868 B
build/atomic-block-components/sku.js 393 B
build/atomic-block-components/stock-indicator-frontend.js 611 B
build/atomic-block-components/stock-indicator.js 611 B
build/atomic-block-components/summary-frontend.js 908 B
build/atomic-block-components/tag-list.js 471 B
build/cart-blocks/empty-cart-frontend.js 349 B
build/cart-blocks/items-frontend.js 303 B
build/cart-blocks/totals-frontend.js 322 B
build/featured-category.js 7.74 kB
build/price-format.js 1.37 kB
build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js 16.1 kB
build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js 5.71 kB
build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js 5.02 kB
build/wc-blocks-data.js 11.3 kB
build/wc-blocks-google-analytics.js 1.98 kB
build/wc-blocks-vendors-style-rtl.css 1.37 kB
build/wc-blocks-vendors-style.css 1.37 kB
build/wc-payment-method-bacs.js 806 B
build/wc-payment-method-cheque.js 806 B
build/wc-payment-method-cod.js 898 B
build/wc-payment-method-paypal.js 839 B
build/wc-payment-method-stripe.js 12.2 kB

compressed-size-action

@mikejolley
Copy link
Member

Nice, I see it's working already in the diff.

I'm not sure on the answer for default. I think it's always better to include a text-domain. That is I believe best practice on the PHP side. I think we should enforce using one.

For Stripe, I'm not actually sure why we still bundle this. Let's check with @nerrad -- can we remove Stripe from Blocks now it's integrated in the extension?

@nerrad nerrad added the block: checkout Issues related to the checkout block. label Oct 28, 2021
@nerrad
Copy link
Contributor

nerrad commented Oct 28, 2021

can we remove Stripe from Blocks now it's integrated in the extension?

It was left to cover folks that might not have upgraded the Stripe extension with the integration but were keeping blocks up to date. I think there's been enough time that we could feasibly remove it, but we maybe could do some version checking to verify the impact would be minimal. I'll do that and get back here (or create an issue if we can).

@nerrad
Copy link
Contributor

nerrad commented Oct 28, 2021

I'm not sure on the answer for default.

I think we can remove that. default (or '') is used for strings translated in WordPress/Gutenberg.

@nielslange
Copy link
Member Author

I think we can remove that. default (or '') is used for strings translated in WordPress/Gutenberg.

I removed default for now.

It was left to cover folks that might not have upgraded the Stripe extension with the integration but were keeping blocks up to date. I think there's been enough time that we could feasibly remove it, but we maybe could do some version checking to verify the impact would be minimal. I'll do that and get back here (or create an issue if we can).

Shall we ignore this for now and open this PR for review, @nerrad. Or do you want to clarify the Stripe integration first?

@nerrad
Copy link
Contributor

nerrad commented Nov 5, 2021

Shall we ignore this for now and open this PR for review, @nerrad. Or do you want to clarify the Stripe integration first?

The Stripe integration conversation doesn't need to block this PR.

@nielslange
Copy link
Member Author

@nerrad Thanks for letting me know. In this case, I'll open the PR up for review. 😀

@nielslange nielslange marked this pull request as ready for review November 5, 2021 12:19
@nielslange
Copy link
Member Author

@mikejolley Feel free to review this PR when you have time doing so. In addition to the original PR, I removed the default textdomain so that empty strings also get reported.

Copy link
Member

@mikejolley mikejolley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 Very useful. Good job, this will save headaches.

Will you be creating a follow up for all the eslint violations it's flagged below?

@github-actions github-actions bot added this to the 6.3.0 milestone Nov 5, 2021
@nielslange
Copy link
Member Author

👍🏻 Very useful. Good job, this will save headaches.

Thanks, @mikejolley! 🙌

Will you be creating a follow up for all the eslint violations it's flagged below?

Sure. I'll create a new issue and a fix for that, given that this issue is rather small. I'll link the new issue to this PR then.

@nielslange nielslange merged commit 650bb1a into trunk Nov 8, 2021
@nielslange nielslange deleted the add/5005-add-textdomain-validation-to-eslint branch November 8, 2021 09:06
jonny-bull pushed a commit to jonny-bull/woocommerce-gutenberg-products-block that referenced this pull request Dec 14, 2021
* Add textdomain validation to .eslintrc.js

* Only allow JS textdomain woo-gutenberg-products-block
jonny-bull pushed a commit to jonny-bull/woocommerce-gutenberg-products-block that referenced this pull request Dec 16, 2021
* Add textdomain validation to .eslintrc.js

* Only allow JS textdomain woo-gutenberg-products-block
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: checkout Issues related to the checkout block. focus: i18n The issue/PR is related to internationalization. skip-changelog PRs that you don't want to appear in the changelog. tools Used for work on build or release tools.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants