此包统一了所有 TanStack 项目中使用的共享 ESLint 配置。它被设计为框架无关的,并且不包含任何特定于框架的插件。
import { tanstackConfig } from '@tanstack/eslint-config'
// OR
import { tanstackConfig } from '@tanstack/config/eslint'
export default [
...tanstackConfig,
{
// Custom rules go here
},
]
import { tanstackConfig } from '@tanstack/eslint-config'
// OR
import { tanstackConfig } from '@tanstack/config/eslint'
export default [
...tanstackConfig,
{
// Custom rules go here
},
]
您可以通过运行 pnpm dlx @eslint/config-inspector 来检查启用的规则,或者通过浏览 此处 的源代码。每个规则都有一个注释解释了为什么它包含在共享配置中。
您的每周 JavaScript 新闻。每周一免费发送给超过 10 万名开发者。