Merge dependabot/npm_and_yarn/types/node-20.8.10 into combined-prs-branch
[e-mobility-charging-stations-simulator.git] / ui / web / .eslintrc.js
index ac050cf54ff52b8ed552b07a18b62faaf02e991e..d82d3c5f6ef9cc228dcb52606aedad0e61433f8b 100644 (file)
@@ -1,3 +1,4 @@
+const { env } = require('node:process');
 const { defineConfig } = require('eslint-define-config');
 
 module.exports = defineConfig({
@@ -7,24 +8,39 @@ module.exports = defineConfig({
     node: true,
   },
 
+  plugins: ['import'],
+
   extends: [
     'eslint:recommended',
+    'plugin:import/recommended',
     'plugin:vue/vue3-recommended',
-    '@vue/eslint-config-typescript/recommended',
     '@vue/eslint-config-prettier',
+    '@vue/eslint-config-typescript/recommended',
   ],
 
+  settings: {
+    'import/resolver': {
+      typescript: {
+        project: './tsconfig.json',
+      },
+    },
+  },
+
   parserOptions: {
     ecmaVersion: 'latest',
-    ecmaFeatures: {
-      jsx: true,
-    },
   },
 
   rules: {
-    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
-    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'no-console': env.NODE_ENV === 'production' ? 'warn' : 'off',
+    'no-debugger': env.NODE_ENV === 'production' ? 'warn' : 'off',
     'vue/require-v-for-key': 'off',
     'vue/multi-word-component-names': 'off',
+    'sort-imports': [
+      'error',
+      {
+        ignoreDeclarationSort: true,
+      },
+    ],
+    'import/order': 'error',
   },
 });