Skip to content

Commit 33201eb

Browse files
committed
style(lint): fixes lint
1 parent 287df33 commit 33201eb

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

src/marshaller/marshaller.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,12 @@ import {
2323
marshalledRefKey
2424
} from "./marshalled-data-keys";
2525

26-
// tslint:disable:no-any
27-
// tslint:disable:no-shadowed-variable
28-
// tslint:disable:no-construct
29-
3026
/**
3127
* A Regular expression that matches the description of a Symbol
3228
* @type {RegExp}
3329
*/
3430
const SYMBOL_REGEX: RegExp = /Symbol\(([^)]*)\)/;
3531

36-
// Until Typescript ships typings for BigInt, declare it here
37-
declare const BigInt: Function;
38-
3932
/**
4033
* Marshalls the given value
4134
* @param {T} value
@@ -314,10 +307,11 @@ function demarshallValue(
314307
case "ref": {
315308
const { value } = <IMarshalledRefData>data;
316309
const refMapHit = refMap.get(value);
317-
if (refMapHit == null)
310+
if (refMapHit == null) {
318311
throw new ReferenceError(
319312
`Internal Error: Could not resolve a reference!!`
320313
);
314+
}
321315
return refMapHit;
322316
}
323317

@@ -452,7 +446,7 @@ export function isMarshalledData(data: any): data is MarshalledData {
452446
* @returns {string}
453447
*/
454448
function generateRef(currentCount: number): string {
455-
return `${++currentCount}`;
449+
return `${currentCount + 1}`;
456450
}
457451

458452
/**

test/marshaller.test.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import test from "ava";
22
import { demarshall, marshall } from "../src/marshaller/marshaller";
33

4-
// tslint:disable:no-any
5-
// tslint:disable:no-construct
6-
74
test("#1", t => {
85
const original = undefined;
96
const marshalled = marshall(original);

tslint.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"extends": "./node_modules/@wessberg/ts-config/tslint.json"
2+
"extends": "./node_modules/@wessberg/ts-config/tslint.json",
3+
"rules": {
4+
"use-primitive-type": false,
5+
"no-construct": false,
6+
"no-any": false,
7+
"no-shadowed-variable": false
8+
}
39
}

0 commit comments

Comments
 (0)