1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58: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:
Jonas Jenwald 2019-05-10 12:54:06 +02:00
parent ca2fee3d51
commit 173fbef05b
26 changed files with 105 additions and 55 deletions

View file

@ -19,7 +19,7 @@
var preprocessor2 = require('../builder/preprocessor2.js');
var path = require('path');
module.exports = function (source) {
module.exports = function(source) {
// Options must be specified, ignoring request if not.
if (!this.query || typeof this.query !== 'object') {
return source;
@ -40,4 +40,5 @@ module.exports = function (source) {
// escodegen does not embed source -- setting map's sourcesContent.
map.sourcesContent = [source];
callback(null, sourceAndMap.code, map);
return undefined;
};