Closed acicovic closed 1 month ago
I endorse this change 😀 The next version of wp-scripts will enable this in the recommended ruleset.
Note to our future selves: As we aren't currently using the last version of wp-scripts
due to https://github.com/WordPress/gutenberg/issues/62202, we do want to add this rule, at least until we're able to upgrade.
Related to #2624. If we become able to upgrade wp-scripts, then this rule will be auto-included. It probably makes sense to focus on #2624, as it should solve two issues at once.
I finally went to fix this, since it was an easy win/change.
Is your feature request related to a problem?
The TL;DR is that we should enable the https://typescript-eslint.io/rules/method-signature-style rule in our code, and fix any violations.
To see why, this is an example (originally quoted by @sirreal, can be found here):
Relatedly: https://x.com/mattpocockuk/status/1803753059480121593