Skip to content

Commit a67a907

Browse files
committed
feat: new eslint rule for i18n
prevent import i18n from wordpress
1 parent df309a0 commit a67a907

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

configs/eslint-config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import globals from 'globals'
1717
import tseslint from 'typescript-eslint'
1818

1919
import translateObjProp from './obj-prop-translate.mjs'
20+
import { group } from 'console'
2021

2122
export default tseslint.config(
2223
eslint.configs.recommended,
@@ -149,6 +150,10 @@ export default tseslint.config(
149150
{
150151
group: ['lucide-react'],
151152
message: 'Use the <LucideIcn /> component instead.'
153+
},
154+
{
155+
group: ['@wordpress/i18n'],
156+
message: 'use `@common/helpers/i18nwrap` instead.'
152157
}
153158
]
154159
}

0 commit comments

Comments
 (0)