返回博客

ESLint 配置允许使用 any

在使用 TypeScript 的 Vant 项目中,ESLint 插件 `@typescript-eslint/no-explicit-any` 默认禁止使用 `any` 类型。本文介绍如何通过在 ESLint 配置中添加规则 `\"@typescript-eslint/no-explicit-any\": \"off\"` 来解决这个问题,从而允许使用 `any` 类型。