Pārlūkot izejas kodu

added rule use-isnan and and updated file to follow new rule (#13117)

Patrick O'Carroll 7 gadi atpakaļ
vecāks
revīzija
f8c2b23c86
2 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 1 1
      public/app/plugins/panel/table/renderer.ts
  2. 9 1
      tslint.json

+ 1 - 1
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;
     }
 

+ 9 - 1
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"]
   }
 }