]> git.proxmox.com Git - mirror_novnc.git/blobdiff - .eslintrc
Merge pull request #1318 from chrisjdev/emptyPassword
[mirror_novnc.git] / .eslintrc
index b85e51cd839917ad7c7e7773f64a9d074ff59cdf..900a7186efc4f5d9b1ab728ecc1c825de20d2924 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -8,6 +8,8 @@
     },
     "extends": "eslint:recommended",
     "rules": {
+        // Unsafe or confusing stuff that we forbid
+
         "no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }],
         "no-constant-condition": ["error", { "checkLoops": false }],
         "no-var": "error",
         "arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
         "arrow-spacing": ["error"],
         "no-confusing-arrow": ["error", { "allowParens": true }],
+
+        // Enforced coding style
+
+        "brace-style": ["error", "1tbs", { "allowSingleLine": true }],
+        "indent": ["error", 4, { "SwitchCase": 1,
+                                 "CallExpression": { "arguments": "first" },
+                                 "ArrayExpression": "first",
+                                 "ObjectExpression": "first",
+                                 "ignoreComments": true }],
+        "comma-spacing": ["error"],
+        "comma-style": ["error"],
+        "curly": ["error", "multi-line"],
+        "func-call-spacing": ["error"],
+        "func-names": ["error"],
+        "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
+        "key-spacing": ["error"],
+        "keyword-spacing": ["error"],
+        "no-trailing-spaces": ["error"],
+        "semi": ["error"],
+        "space-before-blocks": ["error"],
+        "space-before-function-paren": ["error", { "anonymous": "always",
+                                                   "named": "never",
+                                                   "asyncArrow": "always" }],
+        "switch-colon-spacing": ["error"],
     }
 }