mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
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:
parent
f0c45f0336
commit
a7c19d9cbb
6 changed files with 31 additions and 29 deletions
|
@ -106,7 +106,7 @@ var JpxImage = (function JpxImageClosure() {
|
|||
this.parseCodestream(data, position, position + dataLength);
|
||||
break;
|
||||
case 0x6A502020: // 'jP\024\024'
|
||||
if (0x0d0a870a !== readUint32(data, position)) {
|
||||
if (readUint32(data, position) !== 0x0d0a870a) {
|
||||
warn('Invalid JP2 signature');
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue