module.exports = { env: { browser: true, es2021: true, }, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', // 如果使用 TypeScript 'plugin:vue/vue3-recommended', // 如果使用 Vue 3 ], parserOptions: { ecmaVersion: 12, sourceType: 'module', }, rules: { // 你可以在这里添加或修改 ESLint 规则 '@typescript-eslint/no-unused-vars': ['error', { args: 'none', // 不检查函数参数是否被使用 vars: 'exceptDestructuring', // 检查所有变量是否被使用 varsIgnorePattern: '^_', // 忽略以 "_" 开头的变量 argsIgnorePattern: '^_', // 忽略以 "_" 开头的参数 destructuredArrayIgnorePattern: '^_' // 忽略以 "_" 开头的解构数组成员 }], }, };