mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the arrow-body-style
ESLint rule
This manually ignores some cases where the resulting auto-formatting would not, as far as I'm concerned, constitute a readability improvement or where we'd just end up with more overall indentation. Please see https://eslint.org/docs/latest/rules/arrow-body-style
This commit is contained in:
parent
998184a00e
commit
f9a384d711
20 changed files with 78 additions and 82 deletions
|
@ -79,6 +79,7 @@ class AnnotationFactory {
|
|||
// with "GoToE" actions, from throwing and thus breaking parsing:
|
||||
pdfManager.ensureCatalog("attachments"),
|
||||
]).then(
|
||||
// eslint-disable-next-line arrow-body-style
|
||||
([acroForm, xfaDatasets, structTreeRoot, baseUrl, attachments]) => {
|
||||
return {
|
||||
pdfManager,
|
||||
|
@ -2133,11 +2134,8 @@ class WidgetAnnotation extends Annotation {
|
|||
value,
|
||||
};
|
||||
|
||||
const encoder = val => {
|
||||
return isAscii(val)
|
||||
? val
|
||||
: stringToUTF16String(val, /* bigEndian = */ true);
|
||||
};
|
||||
const encoder = val =>
|
||||
isAscii(val) ? val : stringToUTF16String(val, /* bigEndian = */ true);
|
||||
dict.set("V", Array.isArray(value) ? value.map(encoder) : encoder(value));
|
||||
this.amendSavedDict(annotationStorage, dict);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue