import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'

export default [
  {
    name: 'app/files-to-lint',
    files: ['**/*.{ts,mts,tsx,vue}']
  },

  {
    name: 'app/files-to-ignore',
    ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**']
  },

  ...pluginVue.configs['flat/essential'],
  ...vueTsEslintConfig(),
  skipFormatting,

  {
    name: 'app/rules',
    rules: {
      'vue/multi-word-component-names': 0,
      'vue/no-setup-props-destructure': ['off'],
      'no-undef': 'error',
      'no-case-declarations': 0
    },
    extends: ['./.eslintrc-auto-import.json']
  }
]
