{
  "root": true,
  "rules": {
    //强制使用单引号
    "quotes": ["error", "single"],
    //强制不使用分号结尾
    "semi": ["error", "never"],
    // 允许使用{}
    "@typescript-eslint/ban-types": [
      "error",
      {
        "extendDefaults": true,
        "types": {
          "{}": false
        }
      }
    ],
    // 允许any
    "@typescript-eslint/no-explicit-any": "off"
  },
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": "latest",
    "sourceType": "module"
  },
  "extends": [
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:prettier/recommended"
  ],
  "overrides": [
    {
      "files": ["src/*.ts"],
      "env": { "browser": true }
    },
    {
      "files": ["./vite.config.ts"],
      "env": { "node": true }
    },
    {
      "files": ["scripts/*.js"],
      "env": { "node": true },
      "parser": "espree"
    },
    {
      "files": ["src/**/*.vue"],
      "parser": "vue-eslint-parser",
      "globals": {
        "defineOptions": "writable"
      },
      "extends": ["plugin:vue/vue3-recommended", "plugin:prettier/recommended"],
      "env": { "browser": true },
      "parserOptions": {
        "parser": "@typescript-eslint/parser"
      },
      "rules": {
        "vue/multi-word-component-names": 0
      }
    }
  ]
}
