ianstormtaylor/slate-plugins

Consider using ESLint rule: default-case

Nantris opened this issue · 0 comments

Do you want to request a feature or report a bug?

Feature (DevOps)

What's the current behavior?

Switch statements do not require a default case

What's the expected behavior?

If the past when returning undefined moved through the plugin stack this would definitely be overkill, but it might be worth considering now.

If we require a default case, it would probably help with ensuring that we are always returning next() where needed - This might be worth implementing in Slate itself as well with the recent changes.

https://eslint.org/docs/rules/default-case