该包统一了所有 TanStack 项目共享的 ESLint 配置。它被设计为与框架无关,不包含任何特定于框架的插件。
import { tanstackConfig } from '@tanstack/eslint-config'
// 或
import { tanstackConfig } from '@tanstack/config/eslint'
export default [
...tanstackConfig,
{
// 自定义规则写在此处
},
]
import { tanstackConfig } from '@tanstack/eslint-config'
// 或
import { tanstackConfig } from '@tanstack/config/eslint'
export default [
...tanstackConfig,
{
// 自定义规则写在此处
},
]
您可以通过运行 pnpm dlx @eslint/config-inspector 或浏览源代码来查看启用的规则。每条规则都附有注释说明其被包含在共享配置中的原因。
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.