128bff5f0f6df12a76f1dc511d32b4f5b1b21b87
[e-mobility-charging-stations-simulator.git] / ui / web / .eslintrc.cjs
1 require('@rushstack/eslint-patch/modern-module-resolution')
2 const { env } = require('node:process')
3 const { defineConfig } = require('eslint-define-config')
4
5 module.exports = defineConfig({
6 root: true,
7
8 env: {
9 node: true
10 },
11
12 plugins: ['import'],
13
14 extends: [
15 'eslint:recommended',
16 'plugin:import/recommended',
17 'plugin:vue/vue3-recommended',
18 '@vue/eslint-config-typescript/recommended',
19 '@vue/eslint-config-prettier'
20 ],
21
22 settings: {
23 'import/resolver': {
24 typescript: {
25 project: './tsconfig.json'
26 }
27 }
28 },
29
30 parserOptions: {
31 ecmaVersion: 'latest'
32 },
33
34 rules: {
35 'no-console': env.NODE_ENV === 'production' ? 'warn' : 'off',
36 'no-debugger': env.NODE_ENV === 'production' ? 'warn' : 'off',
37 'vue/require-v-for-key': 'off',
38 'vue/multi-word-component-names': 'off',
39 'sort-imports': [
40 'error',
41 {
42 ignoreDeclarationSort: true
43 }
44 ],
45 'import/order': 'error'
46 }
47 })