Skip to content

Commit

Permalink
Disabling the "strict-type-predicates" rule until this TSLint bug is f…
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Dec 1, 2018
1 parent 91466f5 commit 0cb228d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion _ts/github/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class GitHub {
const url = `https://api.github.com/users/${account.login}`;

return this._gitHubApiRequest(url, (response) => {
// tslint:disable-next-line:strict-type-predicates
if (typeof response.rawBody !== "object") {
throw new ApiError(url, "did not return a JSON object as expected", response.rawBody);
}
Expand Down
2 changes: 0 additions & 2 deletions _ts/state-store/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ function setItem(key: string, value: POJO): void {
* Deserializes date strings when parsing JSON
*/
function reviver(key: string, value: unknown): unknown {
// TSLint Bug - https://github.com/palantir/tslint/issues/4107
// tslint:disable-next-line:strict-type-predicates
if (typeof value === "string" && jsonDatePattern.test(value)) {
value = new Date(value);
}
Expand Down
1 change: 0 additions & 1 deletion _ts/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export interface JsonPOJO extends POJOof<string | number | boolean | JsonPOJO |
* Returns the given value as a pretty-formatted string
*/
export function prettify(value: unknown): string {
// tslint:disable-next-line:strict-type-predicates
if (value && typeof value === "object") {
return JSON.stringify(value, undefined, 2);
}
Expand Down
4 changes: 4 additions & 0 deletions tslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ rules:
# Allow boolean expressions to use any truthy/falsy value, not just boolean
strict-boolean-expressions: false

# Disabling this rule until this TSLint bug is fixed:
# https://github.com/palantir/tslint/issues/4107
strict-type-predicates: false

# Don't require a default for every switch statement
switch-default: false

Expand Down

0 comments on commit 0cb228d

Please sign in to comment.