Adds enforcement of WordPress's i18n rules#22042
Conversation
rohans456
left a comment
There was a problem hiding this comment.
This PR is a solid step towards improving the i18n quality of the yoastseo package. The changes are well-structured, and the use of compatibility tools (flatCompat.extends and fixupConfigRules) is correctly implemented. I’ve suggested a small optimization to reduce redundant processing and improve performance.
| export default [ | ||
| { ignores: [ "build", "vendor", "examples" ] }, | ||
| ...yoastConfig, | ||
| ...fixupConfigRules( flatCompat.extends( "plugin:@wordpress/eslint-plugin/i18n" ) ), |
There was a problem hiding this comment.
- Calling
flatCompat.extends(...)inside an array spread could add unnecessary processing overhead. - Consider storing the result in a variable before applying
fixupConfigRules, like:
const wordpressRules = flatCompat.extends("plugin:@wordpress/eslint-plugin/i18n");
...fixupConfigRules(wordpressRules),
There was a problem hiding this comment.
Thanks, I've applied this when moving the rules to the generic config in packages/eslint/default.mjs 🎉
|
A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch. |
|
@mhkuu Please be aware that following packages have been abandoned and are not actively maintained anymore:
Please consider using the other packages instead. |
Pull Request Test Coverage Report for Build 5b91beb8f200401be1924eae61d8391df50808f0Details
💛 - Coveralls |
|
After a discussion with @FAMarfuaty we decided to move the configuration to the generic ESLint config in |
|
CR/ACC by @rohans456: ✅ |
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
yarn lint, confirm the number of warnings is below the threshold.yarn test, confirm they all pass.Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/lingo-other-tasks/issues/456