module.exports = {
    "env": {
        "browser": true,
        "es2021": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:@typescript-eslint/recommended",
        "plugin:vue/vue3-essential",
        'vue-global-api',
        "@vue/eslint-config-typescript"
    ],
    "overrides": [
        {
            "env": {
                "node": true
            },
            "files": [
                ".eslintrc.{js,cjs}"
            ],
            "parserOptions": {
                "sourceType": "script"
            }
        }
    ],
    "root": true,
    "parserOptions": {
        "ecmaVersion": "latest",
        "parser": "@typescript-eslint/parser",
        "sourceType": "module"
    },
    "plugins": [
        "@typescript-eslint",
        "vue"
    ],
    "rules": {
        "vue/multi-word-component-names": 'off',
         // 使用索引签名定义任意对象键，只允许使用Record类型，type Foo = Record<string, unknown>;
        "@typescript-eslint/consistent-indexed-object-style": "error",
        // 禁止重复导入。
        "no-duplicate-imports": "error",
        // 句尾禁止分号
        "semi": ["error", "never"],
        // 强制使用单引号
        // 统一使用单引号
        "quotes": 'off',
        "@typescript-eslint/quotes": ["error", "single"],
    }
}
