ts全局d.ts文件与eslint冲突

1,430 阅读1分钟
  • vue3,vite中声明全局接口,使用声明接口时eslint报错
  • ESLint: '****' is not defined.(no-undef)
// eslintrc.js中配置
overrides: [
    {
        files: [
            '*.ts', '*.tsx', '*.vue'
        ],
        rules: { 'no-undef': 'off' }
    }
]