wordpress-seo
wordpress-seo copied to clipboard
Adapt the ESLint default rules
Context
- Make the exceptions of
template-curly-spacingandspace-before-function-parena general rule instead.
Summary
This PR can be summarized in the following changelog entry:
- [eslint-config-yoast] Adds configuration for the
template-curly-spacingrule, enforcing spaces. - [eslint-config-yoast] Adjusts the configuration of the
space-before-function-parenrule, enforcing spaces for async arrow functions.
Relevant technical choices:
- Bonus points: decrease the lint warnings for
@yoast/componentsto the current number of warnings.
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
- Verify the
template-curly-spacingandspace-before-function-parenrules are only configured in the default now - Verify the linting passes (CI to the rescue)
- Do we want to publish the
eslint-config-yoastpackage manually after merging? - Something to consider is feature branches, e.g.
feature/analysis-integration. Please create an issue to adjust this. Example PR that touches that config: https://github.com/Yoast/wordpress-seo/pull/18467
Test instructions for QA when the code is in the RC
- [ ] QA should use the same steps as above.
QA can test this PR by following these steps:
- No need, CI verifies this works.
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
- [ ] This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.
Other environments
- [ ] This PR also affects Shopify. I have added a changelog entry starting with
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.
Documentation
- [ ] I have written documentation for this change.
Quality assurance
- [x] I have tested this code to the best of my abilities
- [ ] I have added unittests to verify the code works as intended
- [ ] If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
- [ ] I have written this PR in accordance with my team's definition of done.
Fixes JSPW-33