From f8c2b23c86c7a7ce3c44a7a5b7cd7f50e805ff80 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Mon, 3 Sep 2018 13:31:37 +0200 Subject: [PATCH] added rule use-isnan and and updated file to follow new rule (#13117) --- public/app/plugins/panel/table/renderer.ts | 2 +- tslint.json | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/table/renderer.ts b/public/app/plugins/panel/table/renderer.ts index 120ff80b6be..c25e37357cb 100644 --- a/public/app/plugins/panel/table/renderer.ts +++ b/public/app/plugins/panel/table/renderer.ts @@ -185,7 +185,7 @@ export class TableRenderer { } const numericValue = Number(value); - if (numericValue === NaN) { + if (isNaN(numericValue)) { return; } diff --git a/tslint.json b/tslint.json index f14078ee3aa..f53eb541643 100644 --- a/tslint.json +++ b/tslint.json @@ -59,7 +59,15 @@ "variable-declaration": "nospace" } ], - "variable-name": [true, "ban-keywords"], + "variable-name": [ + true, + "check-format", + "ban-keywords", + "allow-leading-underscore", + "allow-trailing-underscore", + "allow-pascal-case" + ], + "use-isnan": true, "whitespace": [true, "check-branch", "check-decl", "check-type", "check-preblock"] } }