Skip to content

Commit

Permalink
Upgrade prettier & tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopding committed Nov 22, 2018
1 parent c00b3b3 commit 6de1293
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 23 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"inquirer": "^6.0.0",
"jest": "^22.4.3",
"jest-junit": "^3.6.0",
"prettier": "^1.11.1",
"prettier": "^1.15.2",
"relative": "^3.0.2",
"rollup": "^0.60.7",
"rollup-plugin-analyzer": "^2.0.3",
Expand All @@ -75,7 +75,7 @@
"ts-jest": "^22.4.2",
"ts-node": "^6.0.5",
"tsconfig-paths": "^3.3.2",
"tslint": "^5.9.1",
"tslint": "^5.11.0",
"typedoc": "^0.11.1",
"typedoc-plugin-markdown": "^1.1.13",
"typescript": "^2.7.2"
Expand Down
2 changes: 1 addition & 1 deletion src/core/pdf-document/PDFDocumentWriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const computeOffsets = (
objectNumber: object.reference.objectNumber,
generationNumber: object.reference.generationNumber,
startOffset: startingOffset,
endOffset: (startingOffset += object.bytesSize()),
endOffset: startingOffset += object.bytesSize(),
}));

class PDFDocumentWriter {
Expand Down
7 changes: 2 additions & 5 deletions src/core/pdf-objects/PDFName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ class PDFName extends PDFObject {
`/${this.key}`
.replace('#', '#23')
.split('')
.map(
(char) =>
PDFName.isRegularChar(char)
? char
: `#${charCode(char).toString(16)}`,
.map((char) =>
PDFName.isRegularChar(char) ? char : `#${charCode(char).toString(16)}`,
)
.join('');

Expand Down
2 changes: 1 addition & 1 deletion src/core/pdf-structures/factories/PNGXObjectFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class PNGXObjectFactory {
/** @hidden */
private splitAlphaChannel = () => {
const pixels = this.image.decodePixelsSync();
const colorByteSize = this.image.colors * this.image.bits / 8;
const colorByteSize = (this.image.colors * this.image.bits) / 8;
const pixelCount = this.image.width * this.image.height;
this.imgData = new Uint8Array(pixelCount * colorByteSize);
this.alphaChannel = new Uint8Array(pixelCount);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/pdf-operators/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const clipEvenOdd = () => W.asterisk!.operator;
/* ======== Graphics state operators ======== */
const { Q, q } = PDFOperators;
const { cos, sin, tan } = Math;
export const degreesToRadians = (degrees: number) => degrees * Math.PI / 180;
export const degreesToRadians = (degrees: number) => (degrees * Math.PI) / 180;

export const translate = (xPos: number, yPos: number) =>
cm.of(1, 0, 0, 1, xPos, yPos);
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4908,10 +4908,10 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=

prettier@^1.11.1:
version "1.11.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"
integrity sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==
prettier@^1.15.2:
version "1.15.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e"
integrity sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug==

pretty-format@^22.4.3:
version "22.4.3"
Expand Down Expand Up @@ -6182,10 +6182,10 @@ tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e"
integrity sha512-AVP5Xol3WivEr7hnssHDsaM+lVrVXWUvd1cfXTRkTj80b//6g2wIFEH6hZG0muGZRnHGrfttpdzRk3YlBkWjKw==

tslint@^5.9.1:
version "5.9.1"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"
integrity sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=
tslint@^5.11.0:
version "5.11.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed"
integrity sha1-mPMMAurjzecAYgHkwzywi0hYHu0=
dependencies:
babel-code-frame "^6.22.0"
builtin-modules "^1.1.1"
Expand All @@ -6198,12 +6198,12 @@ tslint@^5.9.1:
resolve "^1.3.2"
semver "^5.3.0"
tslib "^1.8.0"
tsutils "^2.12.1"
tsutils "^2.27.2"

tsutils@^2.12.1:
version "2.22.2"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.22.2.tgz#0b9f3d87aa3eb95bd32d26ce2b88aa329a657951"
integrity sha512-u06FUSulCJ+Y8a2ftuqZN6kIGqdP2yJjUPEngXqmdPND4UQfb04igcotH+dw+IFr417yP6muCLE8/5/Qlfnx0w==
tsutils@^2.27.2:
version "2.29.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==
dependencies:
tslib "^1.8.1"

Expand Down

0 comments on commit 6de1293

Please sign in to comment.