refactor: refine OCPP stack log message
[e-mobility-charging-stations-simulator.git] / .eslintrc.json
index 27d9f65b987d51ed54c8de4c94c58c633655ffdd..ddb47174049aff56a7589146429e75c4e1660902 100644 (file)
@@ -1,12 +1,12 @@
 {
+  "$schema": "https://json.schemastore.org/eslintrc",
   "root": true,
   "env": {
-    "es2020": true,
-    "node": true,
-    "mocha": true
+    "es2022": true,
+    "node": true
   },
   "parserOptions": {
-    "ecmaVersion": 2020,
+    "ecmaVersion": 2022,
     "sourceType": "module"
   },
   "plugins": ["import"],
     "space-unary-ops": "error",
     "spaced-comment": ["error", "always"],
     "switch-colon-spacing": "error",
-    "arrow-body-style": ["error", "as-needed"],
     "arrow-parens": ["error", "always"],
     "arrow-spacing": "error",
     "no-duplicate-imports": "error",
     "no-var": "error",
     "prefer-const": "error",
     "sort-imports": [
-      "warn",
+      "error",
       {
         "ignoreCase": false,
         "ignoreDeclarationSort": true,
         "allowSeparatedGroups": true
       }
     ],
-    "import/no-unresolved": "error",
     "import/order": [
       "error",
       {
       "files": ["**/*.ts"],
       "parser": "@typescript-eslint/parser",
       "parserOptions": {
-        "project": "./tsconfig.json"
+        "project": true,
+        "tsconfigRootDir": "./"
       },
       "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
       "extends": [
-        "plugin:@typescript-eslint/eslint-recommended",
-        "plugin:@typescript-eslint/recommended",
-        "plugin:@typescript-eslint/recommended-requiring-type-checking",
+        "plugin:@typescript-eslint/recommended-type-checked",
+        "plugin:@typescript-eslint/stylistic-type-checked",
         "plugin:import/typescript"
       ],
       "rules": {
       }
     },
     {
-      "files": ["**/*.js"],
+      "files": ["**/*.js", "**/*.cjs", "**/*.mjs"],
       "plugins": ["jsdoc"],
       "extends": ["plugin:jsdoc/recommended", "plugin:n/recommended"],
       "rules": {