Commit | Line | Data |
---|---|---|
66a7748d JB |
1 | const { env } = require('node:process') |
2 | const { defineConfig } = require('eslint-define-config') | |
a0ede750 JB |
3 | |
4 | module.exports = defineConfig({ | |
32de5a57 LM |
5 | root: true, |
6 | ||
7 | env: { | |
a807045b | 8 | node: true, |
32de5a57 LM |
9 | }, |
10 | ||
cbac2373 JB |
11 | plugins: ['import'], |
12 | ||
32de5a57 | 13 | extends: [ |
32de5a57 | 14 | 'eslint:recommended', |
7afb608e | 15 | 'plugin:import/recommended', |
01ff4231 | 16 | 'plugin:vue/vue3-recommended', |
6c1761d4 | 17 | '@vue/eslint-config-prettier', |
a807045b | 18 | '@vue/eslint-config-typescript/recommended', |
32de5a57 LM |
19 | ], |
20 | ||
cbac2373 JB |
21 | settings: { |
22 | 'import/resolver': { | |
23 | typescript: { | |
a807045b JB |
24 | project: './tsconfig.json', |
25 | }, | |
26 | }, | |
cbac2373 JB |
27 | }, |
28 | ||
32de5a57 | 29 | parserOptions: { |
a807045b | 30 | ecmaVersion: 'latest', |
32de5a57 LM |
31 | }, |
32 | ||
33 | rules: { | |
10687422 JB |
34 | 'no-console': env.NODE_ENV === 'production' ? 'warn' : 'off', |
35 | 'no-debugger': env.NODE_ENV === 'production' ? 'warn' : 'off', | |
32de5a57 LM |
36 | 'vue/require-v-for-key': 'off', |
37 | 'vue/multi-word-component-names': 'off', | |
cbac2373 JB |
38 | 'sort-imports': [ |
39 | 'error', | |
40 | { | |
a807045b JB |
41 | ignoreDeclarationSort: true, |
42 | }, | |
cbac2373 | 43 | ], |
a807045b JB |
44 | 'import/order': 'error', |
45 | }, | |
66a7748d | 46 | }) |