X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.json;h=2b20e8ddd73ad7fcd2b093ca2d138550bcb0e12e;hb=997335abef215a4793b95c1dd53d441967dc62de;hp=8b10dc67bc7b4f510e918775b1fe6fdbbc3c23e2;hpb=8475b2228f0b36777e1a9528b2d61348facad82f;p=e-mobility-charging-stations-simulator.git diff --git a/.eslintrc.json b/.eslintrc.json index 8b10dc67..2b20e8dd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,13 @@ { + "$schema": "https://json.schemastore.org/eslintrc", "root": true, "env": { - "es2020": true, + "es2022": true, "node": true, "mocha": true }, "parserOptions": { - "ecmaVersion": 2020, + "ecmaVersion": 2022, "sourceType": "module" }, "plugins": ["import"], @@ -84,14 +85,13 @@ "space-unary-ops": "error", "spaced-comment": ["error", "always"], "switch-colon-spacing": "error", - "arrow-body-style": ["error", "as-needed"], - "arrow-parens": ["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, @@ -100,7 +100,6 @@ "allowSeparatedGroups": true } ], - "import/no-unresolved": "error", "import/order": [ "error", { @@ -143,13 +142,13 @@ "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": { @@ -168,7 +167,7 @@ } }, { - "files": ["**/*.js"], + "files": ["**/*.js", "**/*.cjs", "**/*.mjs"], "plugins": ["jsdoc"], "extends": ["plugin:jsdoc/recommended", "plugin:n/recommended"], "rules": {