mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the consistent-return
ESLint rule
This rule is already enabled in mozilla-central, and helps ensure more consistent functions/methods, see https://searchfox.org/mozilla-central/rev/b9da45f63cb567244933c77b2c7e827a057d3f9b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js#119-120 Please see https://eslint.org/docs/rules/consistent-return for additional information.
This commit is contained in:
parent
ca2fee3d51
commit
173fbef05b
26 changed files with 105 additions and 55 deletions
|
@ -39,7 +39,7 @@ describe('network', function() {
|
|||
var read = function () {
|
||||
return fullReader.read().then(function (result) {
|
||||
if (result.done) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
count++;
|
||||
len += result.value.byteLength;
|
||||
|
@ -94,7 +94,7 @@ describe('network', function() {
|
|||
var read = function (reader, lenResult) {
|
||||
return reader.read().then(function (result) {
|
||||
if (result.done) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
lenResult.value += result.value.byteLength;
|
||||
return read(reader, lenResult);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue