+require('@rushstack/eslint-patch/modern-module-resolution')
const { env } = require('node:process')
const { defineConfig } = require('eslint-define-config')
root: true,
env: {
- node: true,
+ node: true
},
- plugins: ['import'],
+ plugins: ['simple-import-sort'],
extends: [
'eslint:recommended',
'plugin:import/recommended',
+ 'plugin:import/typescript',
'plugin:vue/vue3-recommended',
- '@vue/eslint-config-prettier',
'@vue/eslint-config-typescript/recommended',
+ '@vue/eslint-config-prettier'
],
settings: {
'import/resolver': {
typescript: {
- project: './tsconfig.json',
- },
- },
+ project: './tsconfig.json'
+ }
+ }
},
parserOptions: {
- ecmaVersion: 'latest',
+ sourceType: 'module',
+ ecmaVersion: 'latest'
},
rules: {
'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',
- },
+ 'simple-import-sort/imports': 'error',
+ 'simple-import-sort/exports': 'error',
+ 'vue/multi-word-component-names': 'off'
+ }
})