]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Add tslint
authorParis Kasidiaris <paris@sourcelair.com>
Thu, 15 Dec 2016 11:53:26 +0000 (13:53 +0200)
committerParis Kasidiaris <paris@sourcelair.com>
Thu, 15 Dec 2016 11:53:26 +0000 (13:53 +0200)
Fix #408

package.json
tslint.json [new file with mode: 0644]

index cd83738398e1fa648c48c283553671131193b218..e05454584cb38e9dc773735161aa3da46e64cb8c 100644 (file)
     "pty.js": "0.3.1",
     "sleep": "^3.0.1",
     "sorcery": "^0.10.0",
+    "tslint": "^4.0.2",
     "typescript": "^2.0.3"
   },
   "scripts": {
     "start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'",
+    "lint": "tslint src/**/*.ts",
     "test": "mocha --recursive ./lib",
     "build:docs": "jsdoc -c jsdoc.json",
     "build": "./bin/build",
diff --git a/tslint.json b/tslint.json
new file mode 100644 (file)
index 0000000..d571d9c
--- /dev/null
@@ -0,0 +1,53 @@
+{
+  "rules": {
+    "class-name": true,
+    "comment-format": [
+      true,
+      "check-space"
+    ],
+    "indent": [
+      true,
+      "spaces"
+    ],
+    "eofline": true,
+    "no-eval": true,
+    "no-internal-module": true,
+    "no-trailing-whitespace": true,
+    "no-unsafe-finally": true,
+    "no-var-keyword": true,
+    "quotemark": [
+      true,
+      "single"
+    ],
+    "semicolon": [
+      true,
+      "always"
+    ],
+    "triple-equals": [
+      true,
+      "allow-null-check"
+    ],
+    "typedef-whitespace": [
+      true,
+      {
+        "call-signature": "nospace",
+        "index-signature": "nospace",
+        "parameter": "nospace",
+        "property-declaration": "nospace",
+        "variable-declaration": "nospace"
+      }
+    ],
+    "variable-name": [
+      true,
+      "ban-keywords"
+    ],
+    "whitespace": [
+      true,
+      "check-branch",
+      "check-decl",
+      "check-operator",
+      "check-separator",
+      "check-type"
+    ]
+  }
+}