1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Fix the linting errors, from the Prettier auto-formatting, that ESLint --fix couldn't handle

This patch makes the follow changes:
 - Remove no longer necessary inline `// eslint-disable-...` comments.
 - Fix `// eslint-disable-...` comments that Prettier moved down, thus causing new linting errors.
 - Concatenate strings which now fit on just one line.
 - Fix comments that are now too long.
 - Finally, and most importantly, adjust comments that Prettier moved down, since the new positions often is confusing or outright wrong.
This commit is contained in:
Jonas Jenwald 2019-12-25 20:03:46 +01:00
parent de36b2aaba
commit a63f7ad486
46 changed files with 179 additions and 219 deletions

View file

@ -524,8 +524,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
])
.then(
function() {
// Only add the dependency once we know that the native JPEG decoding
// succeeded, to ensure that rendering will always complete.
// Only add the dependency once we know that the native JPEG
// decoding succeeded, to ensure that rendering will always
// complete.
operatorList.addDependency(objId);
args = [objId, w, h];
@ -755,7 +756,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
return translated;
})
.catch(reason => {
// Error in the font data -- sending unsupported feature notification.
// Error in the font data -- sending unsupported feature
// notification.
this.handler.send("UnsupportedFeature", {
featureId: UNSUPPORTED_FEATURES.font,
});
@ -2160,9 +2162,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
return;
}
// Use a new `StateManager` to prevent incorrect positioning of
// textItems *after* the Form XObject, since errors in the data
// can otherwise prevent `restore` operators from executing.
// Use a new `StateManager` to prevent incorrect positioning
// of textItems *after* the Form XObject, since errors in the
// data can otherwise prevent `restore` operators from
// executing.
// NOTE: Only an issue when `options.ignoreErrors === true`.
let currentState = stateManager.state.clone();
let xObjStateManager = new StateManager(currentState);