From 6d2f85cf5033e66cd5a3cf9c24e57623b5682f17 Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Thu, 28 Oct 2021 11:10:42 +0700 Subject: [PATCH 1/2] Add textdomain validation to .eslintrc.js --- .eslintrc.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 6779dc2312b..a4d25fecddb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -59,6 +59,15 @@ module.exports = { 'react-hooks/exhaustive-deps': 'error', 'react/jsx-fragments': [ 'error', 'syntax' ], '@wordpress/no-global-active-element': 'warn', + '@wordpress/i18n-text-domain': [ + 'error', + { + allowedTextDomain: [ + 'default', + 'woo-gutenberg-products-block', + ], + }, + ], camelcase: [ 'error', { From 16c0420ef30848eec7bf6ebc1cb592cc901cb9cf Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Fri, 5 Nov 2021 14:10:01 +0700 Subject: [PATCH 2/2] Only allow JS textdomain woo-gutenberg-products-block --- .eslintrc.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a4d25fecddb..77fa43e605c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -62,10 +62,7 @@ module.exports = { '@wordpress/i18n-text-domain': [ 'error', { - allowedTextDomain: [ - 'default', - 'woo-gutenberg-products-block', - ], + allowedTextDomain: [ 'woo-gutenberg-products-block' ], }, ], camelcase: [