Enable the unicorn/prefer-ternary ESLint plugin rule

To limit the readability impact of these changes, the `only-single-line` option was used; please find additional details at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md

These changes were done automatically, using the `gulp lint --fix` command.
This commit is contained in:
Jonas Jenwald 2023-07-27 09:18:26 +02:00
parent 8f83a1359e
commit 674e7ee381
31 changed files with 123 additions and 265 deletions

View file

@ -1707,11 +1707,7 @@ class PDFDocument {
const field = this.xref.fetchIfRef(fieldRef);
if (field.has("T")) {
const partName = stringToPDFString(field.get("T"));
if (name === "") {
name = partName;
} else {
name = `${name}.${partName}`;
}
name = name === "" ? partName : `${name}.${partName}`;
}
if (!field.has("Kids") && /\[\d+\]$/.test(name)) {