Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yoda rule is expecting yoda in less than/greater than comparisons #4

Open
tdmalone opened this issue Dec 7, 2017 · 0 comments
Open

Comments

@tdmalone
Copy link
Contributor

tdmalone commented Dec 7, 2017

As per https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#yoda-conditions (via https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/#yoda-conditions), WP coding standards says yoda conditionals are best avoided when doing <, >, <= or >= comparisons.

However eslint's yoda rule appears to apply it regardless, without an obvious option to switch this off.

Might have to look into this further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant