A8000
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
797 B

8 months ago
8 months ago
  1. module.exports = {
  2. env: {
  3. browser: true,
  4. es2021: true,
  5. },
  6. extends: [
  7. 'eslint:recommended',
  8. 'plugin:@typescript-eslint/recommended', // 如果使用 TypeScript
  9. 'plugin:vue/vue3-recommended', // 如果使用 Vue 3
  10. ],
  11. parserOptions: {
  12. ecmaVersion: 12,
  13. sourceType: 'module',
  14. },
  15. rules: {
  16. // 你可以在这里添加或修改 ESLint 规则
  17. '@typescript-eslint/no-unused-vars': ['error', {
  18. args: 'none', // 不检查函数参数是否被使用
  19. vars: 'exceptDestructuring', // 检查所有变量是否被使用
  20. varsIgnorePattern: '^_', // 忽略以 "_" 开头的变量
  21. argsIgnorePattern: '^_', // 忽略以 "_" 开头的参数
  22. destructuredArrayIgnorePattern: '^_' // 忽略以 "_" 开头的解构数组成员
  23. }],
  24. },
  25. };