diff --git a/package-lock.json b/package-lock.json index 98047cd..7615603 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11750,9 +11750,9 @@ "dev": true }, "prettier": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz", - "integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", + "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", "dev": true }, "pretty-format": { diff --git a/package.json b/package.json index 5882808..9282e68 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@typescript-eslint/parser": "^4.2.0", "eslint": "^7.9.0", "jest": "^26.4.2", - "prettier": "^2.0.2", + "prettier": "^2.1.2", "semantic-release": "^17.1.2", "ts-jest": "^26.4.0", "typescript": "^4.0.3" diff --git a/src/encoding/iso2022.ts b/src/encoding/iso2022.ts index dd92965..c9de55c 100644 --- a/src/encoding/iso2022.ts +++ b/src/encoding/iso2022.ts @@ -1,5 +1,5 @@ import { Context, Recogniser } from '.'; -import match, { Match } from '../match' +import match, { Match } from '../match'; /** * This is a superclass for the individual detectors for diff --git a/src/encoding/mbcs.ts b/src/encoding/mbcs.ts index 14fceec..300d328 100644 --- a/src/encoding/mbcs.ts +++ b/src/encoding/mbcs.ts @@ -1,5 +1,5 @@ import { Context, Recogniser } from '.'; -import match, { Match } from '../match' +import match, { Match } from '../match'; /** * Binary search implementation (recursive) @@ -108,7 +108,7 @@ class mbcs implements Recogniser { const iter = new IteratedChar(); detectBlock: { - for (iter.reset(); this.nextChar(iter, det);) { + for (iter.reset(); this.nextChar(iter, det); ) { totalCharCount++; if (iter.error) { badCharCount++; @@ -275,7 +275,7 @@ export class sjis extends mbcs { iter.index = iter.nextIndex; iter.error = false; - const firstByte = iter.charValue = iter.nextByte(det); + const firstByte = (iter.charValue = iter.nextByte(det)); if (firstByte < 0) return false; if (firstByte <= 0x7f || (firstByte > 0xa0 && firstByte <= 0xdf)) diff --git a/src/encoding/unicode.ts b/src/encoding/unicode.ts index acd53a1..28be3a5 100644 --- a/src/encoding/unicode.ts +++ b/src/encoding/unicode.ts @@ -69,7 +69,7 @@ class UTF_32 implements Recogniser, WithGetChar { numInvalid = 0, hasBOM = false, confidence = 0; - const limit = (det.fRawLength / 4) * 4 + const limit = (det.fRawLength / 4) * 4; const input = det.fRawInput; if (limit == 0) { diff --git a/src/encoding/utf8.ts b/src/encoding/utf8.ts index 9a831f6..cc8cce4 100644 --- a/src/encoding/utf8.ts +++ b/src/encoding/utf8.ts @@ -12,7 +12,7 @@ export default class Utf8 implements Recogniser { numInvalid = 0, trailBytes = 0, confidence; - const input = det.fRawInput + const input = det.fRawInput; if ( det.fRawLength >= 3 && @@ -42,7 +42,7 @@ export default class Utf8 implements Recogniser { } // Verify that we've got the right number of trail bytes in the sequence - for (; ;) { + for (;;) { i++; if (i >= det.fRawLength) break;