Fix build due to winston types definition fix
[e-mobility-charging-stations-simulator.git] / .eslintrc
index 68996a2e275b396c17c543415c6d801885e9ffcd..2153335c5ebfd5164e4f1b88eded5fc72bd0ff11 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -7,18 +7,40 @@
   "extends": [
     "eslint:recommended",
     "plugin:@typescript-eslint/recommended",
-    "plugin:@typescript-eslint/recommended-requiring-type-checking"
+    "plugin:@typescript-eslint/recommended-requiring-type-checking",
+    "plugin:import/errors",
+    "plugin:import/warnings",
+    "plugin:import/typescript",
+    "plugin:jsdoc/recommended"
   ],
   "plugins": [
+    "import",
+    "jsdoc",
     "@typescript-eslint"
   ],
+  "settings": {
+    "jsdoc": {
+      "mode": "typescript"
+    }
+  },
   "rules": {
     "indent": "off",
     "@typescript-eslint/indent": [
       "error",
       2,
       {
-        "SwitchCase": 1
+        "SwitchCase": 1,
+        "CallExpression": {
+          "arguments": 1
+        },
+        "FunctionDeclaration": {
+          "parameters": 2,
+          "body": 1
+        },
+        "FunctionExpression": {
+          "parameters": 2,
+          "body": 1
+        }
       }
     ],
     "@typescript-eslint/array-type": "off",
@@ -64,7 +86,8 @@
     ],
     "no-useless-catch": "error",
     "no-useless-return": "error",
-    "no-shadow": "error",
+    "no-shadow": "off", // This one is generating false positive no-shadow errors on exported/const enums
+    "@typescript-eslint/no-shadow": "error",
     "no-multiple-empty-lines": [
       "error",
       {
     "keyword-spacing": [
       "error"
     ],
+    "id-blacklist": [
+      "error",
+      "any",
+      "Number",
+      "number",
+      "String",
+      "string",
+      "Boolean",
+      "boolean",
+      "Undefined",
+      "undefined",
+      "Symbol",
+      "symbol"
+    ],
     "linebreak-style": [
       "error",
       "unix"
       "error",
       "single"
     ]
-  }
+  },
+  "overrides": [
+    {
+      "files": [
+        "*.js"
+      ],
+      "extends": "plugin:node/recommended",
+      "rules": {
+        "node/shebang": "off",
+        "@typescript-eslint/no-unused-vars": "off",
+        "@typescript-eslint/no-var-requires": "off"
+      }
+    }
+  ]
 }