module.exports = {
  env: {
    browser: true,
    es2021: true,
    'vue/setup-compiler-macros': true
  },
  extends: [
    'plugin:vue/essential',
    'airbnb-base',
    'plugin:prettier/recommended',
    'plugin:import/recommended'
  ],

  parserOptions: {
    ecmaVersion: 'latest',
    parser: '@typescript-eslint/parser',
    sourceType: 'module'
  },
  plugins: ['vue', '@typescript-eslint'],

  overrides: [
    {
      files: ['*.vue'],
      rules: {
        indent: 'off'
      }
    }
  ],

  settings: {
    'import/resolver': {
      alias: {
        map: [['@components', './src/components']]
      }
    }
  },

  rules: {
    'vue/no-multiple-template-root': 0,
    'vue/script-indent': ['error', 2, { baseIndent: 1 }],
    'no-console': 0,
    'no-plusplus': 0,
    'import/no-extraneous-dependencies': [
      'error',
      {
        devDependencies: ['**/*.test.ts', '**/*.test.js', 'vite.config.ts']
      }
    ],

    'vue/multi-word-component-names': 0,
    'no-underscore-dangle': 0
  }
}
