Adjust the yoda ESLint rule to apply to inequalities as well

I happened to notice that some inequalities had the wrong order, and was surprised since I thought that the `yoda` rule should have caught that.
However, reading http://eslint.org/docs/rules/yoda#options a bit more closely than previously, it's quite obvious that the `onlyEquality` option does *exactly* what its name suggests. Hence I think that it makes sense to adjust the options such that only ranges are allowed instead.
This commit is contained in:
Jonas Jenwald 2017-03-06 16:50:22 +01:00
parent f0c45f0336
commit a7c19d9cbb
6 changed files with 31 additions and 29 deletions

View file

@ -41,7 +41,7 @@ function onAnimationStart(event) {
// invocations have no effect.
function watchObjectOrEmbed(elem) {
var mimeType = elem.type;
if (mimeType && 'application/pdf' !== mimeType.toLowerCase()) {
if (mimeType && mimeType.toLowerCase() !== 'application/pdf') {
return;
}
// <embed src> <object data>