Skip to content

Draft: Enable no-else-return rule

Miguel Rincon requested to merge mrincon-enable-eslint-rule-no-else-return into master

What does this MR do and why?

Enable no-else-return rule by removing it's override allowElseIf, this rule seems to have been disabled for historical reasons, during a migration of airbnb-base 12.1.0 -> 13.1.0 5 years ago. So I see no reason to keep it.

  no-else-return:
    - error
    - allowElseIf: true

We can use --fix to safely fix it automatically, so I see no reason to not update it.

Screenshots or screen recordings

NA

How to set up and validate locally

Changes in this MR were not manual, after removing the no-else-return I simply ran:

yarn run lint:eslint:all:fix
yarn run lint:prettier:fix

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miguel Rincon

Merge request reports