此套件統一了所有 TanStack 專案中共享的 ESLint 配置。它被設計為與框架無關,不包含任何特定框架的外掛 (plugins)。
import { tanstackConfig } from '@tanstack/eslint-config'
// OR
import { tanstackConfig } from '@tanstack/config/eslint'
export default [
...tanstackConfig,
{
// 自訂規則放在這裡
},
]
import { tanstackConfig } from '@tanstack/eslint-config'
// OR
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.