wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Adapt the ESLint default rules

Open igorschoester opened this issue 3 years ago • 0 comments

Context

  • Make the exceptions of template-curly-spacing and space-before-function-paren a general rule instead.

Summary

This PR can be summarized in the following changelog entry:

  • [eslint-config-yoast] Adds configuration for the template-curly-spacing rule, enforcing spaces.
  • [eslint-config-yoast] Adjusts the configuration of the space-before-function-paren rule, enforcing spaces for async arrow functions.

Relevant technical choices:

  • Bonus points: decrease the lint warnings for @yoast/components to 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-spacing and space-before-function-paren rules are only configured in the default now
  • Verify the linting passes (CI to the rescue)
  • Do we want to publish the eslint-config-yoast package 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 the Shopify label 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

igorschoester avatar Jun 14 '22 11:06 igorschoester