| 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: ['simple-import-sort'], |
| 13 | |
| 14 | extends: [ |
| 15 | 'eslint:recommended', |
| 16 | 'plugin:import/recommended', |
| 17 | 'plugin:import/typescript', |
| 18 | 'plugin:vue/vue3-recommended', |
| 19 | '@vue/eslint-config-typescript/recommended', |
| 20 | '@vue/eslint-config-prettier' |
| 21 | ], |
| 22 | |
| 23 | settings: { |
| 24 | 'import/resolver': { |
| 25 | typescript: { |
| 26 | project: './tsconfig.json' |
| 27 | } |
| 28 | } |
| 29 | }, |
| 30 | |
| 31 | parserOptions: { |
| 32 | sourceType: 'module', |
| 33 | ecmaVersion: 'latest' |
| 34 | }, |
| 35 | |
| 36 | rules: { |
| 37 | 'no-console': env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 38 | 'no-debugger': env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 39 | 'simple-import-sort/imports': 'error', |
| 40 | 'simple-import-sort/exports': 'error', |
| 41 | 'vue/multi-word-component-names': 'off' |
| 42 | } |
| 43 | }) |