X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ui%2Fweb%2F.eslintrc.js;h=18ddac2e27d121107056d3fec33985934490b85c;hb=ac1495b44b6764e485337d393ce9c0328e4e8f76;hp=e048f31854a26eb416dde9665f0b14cd61369e74;hpb=ebbfbf1c01e010d051956867484b74a94237f546;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/.eslintrc.js b/ui/web/.eslintrc.js index e048f318..18ddac2e 100644 --- a/ui/web/.eslintrc.js +++ b/ui/web/.eslintrc.js @@ -1,17 +1,30 @@ -module.exports = { +const { defineConfig } = require('eslint-define-config'); + +module.exports = defineConfig({ root: true, env: { node: true, }, + plugins: ['import'], + extends: [ - 'plugin:vue/vue3-essential', 'eslint:recommended', - '@vue/eslint-config-typescript/recommended', + 'plugin:import/recommended', + 'plugin:vue/vue3-recommended', '@vue/eslint-config-prettier', + '@vue/eslint-config-typescript/recommended', ], + settings: { + 'import/resolver': { + typescript: { + project: './tsconfig.json', + }, + }, + }, + parserOptions: { ecmaVersion: 'latest', }, @@ -21,14 +34,12 @@ module.exports = { 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'vue/require-v-for-key': 'off', 'vue/multi-word-component-names': 'off', - }, - - overrides: [ - { - files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'], - env: { - mocha: true, + 'sort-imports': [ + 'error', + { + ignoreDeclarationSort: true, }, - }, - ], -}; + ], + 'import/order': 'error', + }, +});