From: Jérôme Benoit Date: Thu, 1 Aug 2024 22:25:34 +0000 (+0200) Subject: chore: fix eslint configuration for vue.js X-Git-Tag: ocpp-server@v1.5.2~147 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=64596c752bc78e9a353cfdf60ba3a0b79c45969d;p=e-mobility-charging-stations-simulator.git chore: fix eslint configuration for vue.js Signed-off-by: Jérôme Benoit --- diff --git a/eslint.config.js b/eslint.config.js index 6b2e2d32..b7ebdc9c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,7 +3,8 @@ import js from '@eslint/js' import { defineFlatConfig } from 'eslint-define-config' import jsdoc from 'eslint-plugin-jsdoc' import simpleImportSort from 'eslint-plugin-simple-import-sort' -// import pluginVue from 'eslint-plugin-vue' +// eslint-disable-next-line n/no-extraneous-import +import pluginVue from 'eslint-plugin-vue' import neostandard, { plugins } from 'neostandard' export default defineFlatConfig([ @@ -25,15 +26,25 @@ export default defineFlatConfig([ ], }, }, - ...neostandard({ - ts: true, - }), - // ...pluginVue.configs['flat/recommended'], - ...plugins['typescript-eslint'].config( - ...plugins['typescript-eslint'].configs.strictTypeChecked, - ...plugins['typescript-eslint'].configs.stylisticTypeChecked - ), + ...pluginVue.configs['flat/recommended'], + { + files: ['**/*.vue'], + languageOptions: { + parserOptions: { + parser: '@typescript-eslint/parser', + }, + }, + }, + ...plugins['typescript-eslint'] + .config( + ...plugins['typescript-eslint'].configs.strictTypeChecked, + ...plugins['typescript-eslint'].configs.stylisticTypeChecked + ) + .map(config => { + return { files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', '*/**.vue'], ...config } + }), { + files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], languageOptions: { parserOptions: { projectService: true, @@ -50,6 +61,9 @@ export default defineFlatConfig([ 'simple-import-sort/exports': 'error', }, }, + ...neostandard({ + ts: true, + }), { files: [ 'src/charging-station/Bootstrap.ts', @@ -75,6 +89,12 @@ export default defineFlatConfig([ '@typescript-eslint/no-unsafe-member-access': 'off', }, }, + { + files: ['ui/web/src/components/Container.vue', 'ui/web/src/components/buttons/Button.vue'], + rules: { + 'vue/multi-word-component-names': 'off', + }, + }, { files: ['**/*.js', '**/*.mjs', '**/*.cjs'], ...plugins['typescript-eslint'].configs.disableTypeChecked, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb82b41c..4bd57002 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -216,17 +216,17 @@ importers: specifier: ^7.0.3 version: 7.0.3 eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.8.0 + version: 9.8.0 eslint-define-config: specifier: ^2.1.0 version: 2.1.0 eslint-plugin-simple-import-sort: specifier: ^12.1.1 - version: 12.1.1(eslint@8.57.0) + version: 12.1.1(eslint@9.8.0) eslint-plugin-vue: specifier: ^9.27.0 - version: 9.27.0(eslint@8.57.0) + version: 9.27.0(eslint@9.8.0) jsdom: specifier: ^24.1.1 version: 24.1.1(bufferutil@4.0.8)(utf-8-validate@6.0.4) @@ -240,8 +240,8 @@ importers: specifier: ~5.5.4 version: 5.5.4 typescript-eslint: - specifier: ^7.18.0 - version: 7.18.0(eslint@8.57.0)(typescript@5.5.4) + specifier: ^8.0.0 + version: 8.0.0(eslint@9.8.0)(typescript@5.5.4) vite: specifier: ^5.3.5 version: 5.3.5(@types/node@22.0.2) @@ -798,18 +798,10 @@ packages: resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.8.0': resolution: {integrity: sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -821,11 +813,6 @@ packages: '@gar/promisify@1.1.3': resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - '@humanwhocodes/gitignore-to-minimatch@1.0.2': resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} @@ -833,10 +820,6 @@ packages: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - '@humanwhocodes/retry@0.3.0': resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} @@ -1200,17 +1183,6 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/eslint-plugin@8.0.0': resolution: {integrity: sha512-STIZdwEQRXAHvNUS6ILDf5z3u95Gc8jzywunxSNqX00OooIemaaNIA0vEgynJlycL5AjabYLLrIyHd4iazyvtg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1222,16 +1194,6 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/parser@8.0.0': resolution: {integrity: sha512-pS1hdZ+vnrpDIxuFXYQpLTILglTjSYJ9MbetZctrUawogUsPdz31DIIRZ9+rab0LhYNTsk88w4fIzVheiTbWOQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1242,24 +1204,10 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@8.0.0': resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/type-utils@8.0.0': resolution: {integrity: sha512-mJAFP2mZLTBwAn5WI4PMakpywfWFH5nQZezUQdSKV23Pqo6o9iShQg1hP2+0hJJXP2LnZkWPphdIq4juYYwCeg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1269,23 +1217,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@8.0.0': resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.0.0': resolution: {integrity: sha512-5b97WpKMX+Y43YKi4zVcCVLtK5F98dFls3Oxui8LbnmRsseKenbbDinmvxrWegKDMmlkIq/XHuyy0UGLtpCDKg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1295,29 +1230,16 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - '@typescript-eslint/utils@8.0.0': resolution: {integrity: sha512-k/oS/A/3QeGLRvOWCg6/9rATJL5rec7/5s1YmdS0ZU6LHveJyGFwBvLhSRBv6i9xaj7etmosp+l+ViN1I9Aj/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@8.0.0': resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitejs/plugin-vue-jsx@4.0.0': resolution: {integrity: sha512-A+6wL2AdQhDsLsDnY+2v4rRDI1HLJGIMc97a8FURO9tqKsH5QvjWrzsa5DH3NlZsM742W2wODl2fF+bfcTWtXw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1749,8 +1671,8 @@ packages: engines: {node: '>= 0.8'} hasBin: true - browserslist@4.23.2: - resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2380,10 +2302,6 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - domain-browser@1.2.0: resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} engines: {node: '>=0.4', npm: '>=1.2'} @@ -2654,11 +2572,6 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - eslint@9.8.0: resolution: {integrity: sha512-K8qnZ/QJzT2dLKdZJVX6W4XOwBzutMYmt0lqUS+JdXgd+HTYFlonFgkJ8s44d/zMPPCnOOk0kMWCApCPhiOy9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2805,10 +2718,6 @@ packages: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -2842,10 +2751,6 @@ packages: flame-gradient@1.0.0: resolution: {integrity: sha512-9ejk16/DqvQJ4dHsh68W/4N0zmVQ60zukyUuEHrTbf5pJvP4JqlIdke86Z9174PZokRCXAntY5+H1txSyC7mUA==} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -4655,8 +4560,8 @@ packages: resolution: {integrity: sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==} engines: {node: '>=8'} - qs@6.12.3: - resolution: {integrity: sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==} + qs@6.13.0: + resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} qs@6.5.3: @@ -5463,16 +5368,6 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript-eslint@7.18.0: - resolution: {integrity: sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - typescript-eslint@8.0.0: resolution: {integrity: sha512-yQWBJutWL1PmpmDddIOl9/Mi6vZjqNCjqSGBMQ4vsc2Aiodk0SnbQQWPXbSy0HNuKCuGkw1+u4aQ2mO40TdhDQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5963,7 +5858,7 @@ snapshots: dependencies: '@babel/compat-data': 7.25.2 '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.2 + browserslist: 4.23.3 lru-cache: 5.1.1 semver: 7.6.3 @@ -6496,11 +6391,6 @@ snapshots: '@esbuild/win32-x64@0.23.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': - dependencies: - eslint: 8.57.0 - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.8.0)': dependencies: eslint: 9.8.0 @@ -6516,20 +6406,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.3.6 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 @@ -6544,8 +6420,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} - '@eslint/js@9.8.0': {} '@eslint/object-schema@2.1.4': {} @@ -6553,20 +6427,10 @@ snapshots: '@gar/promisify@1.1.3': optional: true - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - '@humanwhocodes/gitignore-to-minimatch@1.0.2': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} - '@humanwhocodes/retry@0.3.0': {} '@isaacs/cliui@8.0.2': @@ -6974,24 +6838,6 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': - dependencies: - '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 7.18.0 - eslint: 8.57.0 - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0)(typescript@5.5.4))(eslint@9.8.0)(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 @@ -7010,19 +6856,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4)': - dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6 - eslint: 8.57.0 - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@8.0.0(eslint@9.8.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 8.0.0 @@ -7036,28 +6869,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/scope-manager@8.0.0': dependencies: '@typescript-eslint/types': 8.0.0 '@typescript-eslint/visitor-keys': 8.0.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.0)(typescript@5.5.4)': - dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - debug: 4.3.6 - eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.5.4) - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.0.0(eslint@9.8.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.4) @@ -7070,25 +6886,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/types@8.0.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.0.0(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 8.0.0 @@ -7104,17 +6903,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.0)(typescript@5.5.4)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) - eslint: 8.57.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.0.0(eslint@9.8.0)(typescript@5.5.4)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.8.0) @@ -7126,18 +6914,11 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.0.0': dependencies: '@typescript-eslint/types': 8.0.0 eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-vue-jsx@4.0.0(vite@5.3.5(@types/node@22.0.2))(vue@3.4.35(typescript@5.5.4))': dependencies: '@babel/core': 7.25.2 @@ -7737,12 +7518,12 @@ snapshots: vm-browserify: 1.1.2 xtend: 4.0.2 - browserslist@4.23.2: + browserslist@4.23.3: dependencies: caniuse-lite: 1.0.30001646 electron-to-chromium: 1.5.4 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.2) + update-browserslist-db: 1.1.0(browserslist@4.23.3) bson@6.8.0: {} @@ -8452,10 +8233,6 @@ snapshots: dependencies: esutils: 2.0.3 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - domain-browser@1.2.0: {} dot-prop@5.3.0: @@ -8849,24 +8626,20 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@8.57.0): - dependencies: - eslint: 8.57.0 - eslint-plugin-simple-import-sort@12.1.1(eslint@9.8.0): dependencies: eslint: 9.8.0 - eslint-plugin-vue@9.27.0(eslint@8.57.0): + eslint-plugin-vue@9.27.0(eslint@9.8.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.8.0) + eslint: 9.8.0 globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.1 semver: 7.6.3 - vue-eslint-parser: 9.4.3(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.8.0) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -8885,49 +8658,6 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@8.57.0: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.11.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.6 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.1 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - eslint@9.8.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.8.0) @@ -9114,10 +8844,6 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -9163,12 +8889,6 @@ snapshots: dependencies: sinusoidal-decimal: 1.0.0 - flat-cache@3.2.0: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - flat-cache@4.0.1: dependencies: flatted: 3.3.1 @@ -11065,7 +10785,7 @@ snapshots: dependencies: escape-goat: 2.1.1 - qs@6.12.3: + qs@6.13.0: dependencies: side-channel: 1.0.6 @@ -12021,17 +11741,6 @@ snapshots: typedarray@0.0.6: {} - typescript-eslint@7.18.0(eslint@8.57.0)(typescript@5.5.4): - dependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/parser': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4) - eslint: 8.57.0 - optionalDependencies: - typescript: 5.5.4 - transitivePeerDependencies: - - supports-color - typescript-eslint@8.0.0(eslint@9.8.0)(typescript@5.5.4): dependencies: '@typescript-eslint/eslint-plugin': 8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0)(typescript@5.5.4))(eslint@9.8.0)(typescript@5.5.4) @@ -12090,9 +11799,9 @@ snapshots: unpipe@1.0.0: {} - update-browserslist-db@1.1.0(browserslist@4.23.2): + update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: - browserslist: 4.23.2 + browserslist: 4.23.3 escalade: 3.1.2 picocolors: 1.0.1 @@ -12127,7 +11836,7 @@ snapshots: url@0.11.4: dependencies: punycode: 1.4.1 - qs: 6.12.3 + qs: 6.13.0 utf-8-validate@6.0.4: dependencies: @@ -12235,10 +11944,10 @@ snapshots: vue-component-type-helpers@2.0.29: {} - vue-eslint-parser@9.4.3(eslint@8.57.0): + vue-eslint-parser@9.4.3(eslint@9.8.0): dependencies: debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.8.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 diff --git a/ui/web/package.json b/ui/web/package.json index c9d3179d..a9578f76 100644 --- a/ui/web/package.json +++ b/ui/web/package.json @@ -44,7 +44,7 @@ "@vue/test-utils": "^2.4.6", "@vue/tsconfig": "^0.5.1", "cross-env": "^7.0.3", - "eslint": "^8.57.0", + "eslint": "^9.8.0", "eslint-define-config": "^2.1.0", "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-vue": "^9.27.0", @@ -52,7 +52,7 @@ "prettier": "^3.3.3", "rimraf": "^6.0.1", "typescript": "~5.5.4", - "typescript-eslint": "^7.18.0", + "typescript-eslint": "^8.0.0", "vite": "^5.3.5", "vitest": "^2.0.5" } diff --git a/ui/web/src/components/Container.vue b/ui/web/src/components/Container.vue index 451a7659..0bc72b01 100644 --- a/ui/web/src/components/Container.vue +++ b/ui/web/src/components/Container.vue @@ -1,6 +1,6 @@ diff --git a/ui/web/src/components/actions/AddChargingStations.vue b/ui/web/src/components/actions/AddChargingStations.vue index 9c87a489..7a6fcec0 100644 --- a/ui/web/src/components/actions/AddChargingStations.vue +++ b/ui/web/src/components/actions/AddChargingStations.vue @@ -1,8 +1,18 @@ diff --git a/ui/web/src/components/buttons/ToggleButton.vue b/ui/web/src/components/buttons/ToggleButton.vue index 5f444745..03748f28 100644 --- a/ui/web/src/components/buttons/ToggleButton.vue +++ b/ui/web/src/components/buttons/ToggleButton.vue @@ -1,6 +1,9 @@ diff --git a/ui/web/src/components/charging-stations/CSConnector.vue b/ui/web/src/components/charging-stations/CSConnector.vue index 7619d43f..45548a93 100644 --- a/ui/web/src/components/charging-stations/CSConnector.vue +++ b/ui/web/src/components/charging-stations/CSConnector.vue @@ -1,7 +1,11 @@ @@ -66,7 +76,7 @@ const stopTransaction = (): void => { uiClient .stopTransaction(props.hashId, props.connector.transactionId) .then(() => { - $toast.success('Transaction successfully stopped') + return $toast.success('Transaction successfully stopped') }) .catch((error: Error) => { $toast.error('Error at stopping transaction') @@ -77,7 +87,7 @@ const startAutomaticTransactionGenerator = (): void => { uiClient .startAutomaticTransactionGenerator(props.hashId, props.connectorId) .then(() => { - $toast.success('Automatic transaction generator successfully started') + return $toast.success('Automatic transaction generator successfully started') }) .catch((error: Error) => { $toast.error('Error at starting automatic transaction generator') @@ -88,7 +98,7 @@ const stopAutomaticTransactionGenerator = (): void => { uiClient .stopAutomaticTransactionGenerator(props.hashId, props.connectorId) .then(() => { - $toast.success('Automatic transaction generator successfully stopped') + return $toast.success('Automatic transaction generator successfully stopped') }) .catch((error: Error) => { $toast.error('Error at stopping automatic transaction generator') diff --git a/ui/web/src/components/charging-stations/CSData.vue b/ui/web/src/components/charging-stations/CSData.vue index 32d4490f..941bf754 100644 --- a/ui/web/src/components/charging-stations/CSData.vue +++ b/ui/web/src/components/charging-stations/CSData.vue @@ -3,25 +3,37 @@ {{ chargingStation.stationInfo.chargingStationId }} - {{ chargingStation.started === true ? 'Yes' : 'No' }} + + {{ chargingStation.started === true ? 'Yes' : 'No' }} + {{ getSupervisionUrl() }} - {{ getWSState() }} + + {{ getWSState() }} + {{ chargingStation.bootNotificationResponse?.status ?? 'Ø' }} {{ chargingStation.stationInfo.templateName }} - {{ chargingStation.stationInfo.chargePointVendor }} - {{ chargingStation.stationInfo.chargePointModel }} + + {{ chargingStation.stationInfo.chargePointVendor }} + + + {{ chargingStation.stationInfo.chargePointModel }} + {{ chargingStation.stationInfo.firmwareVersion ?? 'Ø' }} - - + + Set Supervision Url - - - + + + - + - - - - - + + + + + @@ -142,7 +185,7 @@ const startChargingStation = (): void => { uiClient .startChargingStation(props.chargingStation.stationInfo.hashId) .then(() => { - $toast.success('Charging station successfully started') + return $toast.success('Charging station successfully started') }) .catch((error: Error) => { $toast.error('Error at starting charging station') @@ -153,7 +196,7 @@ const stopChargingStation = (): void => { uiClient .stopChargingStation(props.chargingStation.stationInfo.hashId) .then(() => { - $toast.success('Charging station successfully stopped') + return $toast.success('Charging station successfully stopped') }) .catch((error: Error) => { $toast.error('Error at stopping charging station') @@ -164,7 +207,7 @@ const openConnection = (): void => { uiClient .openConnection(props.chargingStation.stationInfo.hashId) .then(() => { - $toast.success('Connection successfully opened') + return $toast.success('Connection successfully opened') }) .catch((error: Error) => { $toast.error('Error at opening connection') @@ -175,7 +218,7 @@ const closeConnection = (): void => { uiClient .closeConnection(props.chargingStation.stationInfo.hashId) .then(() => { - $toast.success('Connection successfully closed') + return $toast.success('Connection successfully closed') }) .catch((error: Error) => { $toast.error('Error at closing connection') @@ -186,7 +229,7 @@ const deleteChargingStation = (): void => { uiClient .deleteChargingStation(props.chargingStation.stationInfo.hashId) .then(() => { - $toast.success('Charging station successfully deleted') + return $toast.success('Charging station successfully deleted') }) .catch((error: Error) => { $toast.error('Error at deleting charging station') diff --git a/ui/web/src/components/charging-stations/CSTable.vue b/ui/web/src/components/charging-stations/CSTable.vue index 3175d650..d7e79856 100644 --- a/ui/web/src/components/charging-stations/CSTable.vue +++ b/ui/web/src/components/charging-stations/CSTable.vue @@ -5,17 +5,72 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index 765d91bb..0428df73 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -239,7 +239,11 @@ export class UIClient { this.responseHandlers.set(uuid, { procedureName, resolve, reject }) } catch (error) { this.responseHandlers.delete(uuid) - reject(error as Error) + reject( + new Error( + `Send request '${procedureName}' message: error ${(error as Error).toString()}` + ) + ) } finally { clearTimeout(sendTimeout) } diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index dba6d246..e9b4d3b2 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -208,14 +208,15 @@ const getSimulatorState = (): void => { .simulatorState() .then((response: ResponsePayload) => { simulatorState.value = response.state as SimulatorState + return undefined + }) + .finally(() => { + state.value.gettingSimulatorState = false }) .catch((error: Error) => { $toast.error('Error at fetching simulator state') console.error('Error at fetching simulator state:', error) }) - .finally(() => { - state.value.gettingSimulatorState = false - }) } } @@ -228,15 +229,16 @@ const getTemplates = (): void => { if (app != null) { app.appContext.config.globalProperties.$templates.value = response.templates as string[] } + return undefined + }) + .finally(() => { + state.value.gettingTemplates = false }) .catch((error: Error) => { clearTemplates() $toast.error('Error at fetching charging station templates') console.error('Error at fetching charging station templates:', error) }) - .finally(() => { - state.value.gettingTemplates = false - }) } } @@ -250,15 +252,16 @@ const getChargingStations = (): void => { app.appContext.config.globalProperties.$chargingStations.value = response.chargingStations as ChargingStationData[] } + return undefined + }) + .finally(() => { + state.value.gettingChargingStations = false }) .catch((error: Error) => { clearChargingStations() $toast.error('Error at fetching charging stations') console.error('Error at fetching charging stations:', error) }) - .finally(() => { - state.value.gettingChargingStations = false - }) } } @@ -303,30 +306,30 @@ const startSimulator = (): void => { uiClient .startSimulator() .then(() => { - $toast.success('Simulator successfully started') + return $toast.success('Simulator successfully started') + }) + .finally(() => { + getSimulatorState() }) .catch((error: Error) => { $toast.error('Error at starting simulator') console.error('Error at starting simulator:', error) }) - .finally(() => { - getSimulatorState() - }) } const stopSimulator = (): void => { uiClient .stopSimulator() .then(() => { clearChargingStations() - $toast.success('Simulator successfully stopped') + return $toast.success('Simulator successfully stopped') + }) + .finally(() => { + getSimulatorState() }) .catch((error: Error) => { $toast.error('Error at stopping simulator') console.error('Error at stopping simulator:', error) }) - .finally(() => { - getSimulatorState() - }) } diff --git a/ui/web/src/views/NotFoundView.vue b/ui/web/src/views/NotFoundView.vue index a87072aa..7f800e80 100644 --- a/ui/web/src/views/NotFoundView.vue +++ b/ui/web/src/views/NotFoundView.vue @@ -1,4 +1,8 @@ - +
IdentifierStatusTransactionATG StartedActions + Identifier + + Status + + Transaction + + ATG Started + + Actions +
NameStartedSupervision UrlWebSocket StateRegistration StatusTemplateVendorModelFirmwareActionsConnector(s) + Name + + Started + + Supervision Url + + WebSocket State + + Registration Status + + Template + + Vendor + + Model + + Firmware + + Actions + + Connector(s) +