Vercel Doctor

कॉन्फ़िगरेशन

rules, files को ignore करने और behavior customize करने के लिए config file के साथ Vercel Doctor कॉन्फ़िगर करें।

Vercel Doctor zero configuration के साथ बॉक्स से बाहर काम करता है। जब behavior को customize करने की जरूरत हो, तो आप config file जोड़ सकते हैं।

Config file

अपने प्रोजेक्ट root में vercel-doctor.config.json बनाएं:

{
  "ignore": {
    "rules": ["vercel-doctor/nextjs-link-prefetch-default"],
    "files": ["src/generated/**"]
  }
}

वैकल्पिक रूप से, अपने package.json में "vercelDoctor" key जोड़ें:

{
  "vercelDoctor": {
    "ignore": {
      "rules": ["knip/exports"],
      "files": ["src/generated/**"]
    }
  }
}

अगर दोनों मौजूद हैं, तो vercel-doctor.config.json को प्राथमिकता मिलती है।

Options

KeyTypeDefaultविवरण
ignore.rulesstring[][]Suppress करने के लिए rule IDs, plugin/rule format में
ignore.filesstring[][]Skip करने के लिए file paths के Glob patterns
lintbooleantrueBilling lint rules enable या disable करें
deadCodebooleantrueDead code detection enable या disable करें
verbosebooleanfalseप्रति rule file paths और line numbers दिखाएं
diffboolean | stringfalseDiff mode enable करें या base branch pin करें

Rules ignore करना

Rule IDs के लिए plugin/rule format उपयोग करें:

{
  "ignore": {
    "rules": [
      "vercel-doctor/nextjs-image-missing-sizes",
      "vercel-doctor/vercel-large-static-asset",
      "knip/exports"
    ]
  }
}

सभी available rule IDs के लिए Rules पेज देखें।

Files ignore करना

स्कैनिंग से exclude करने के लिए Glob patterns उपयोग करें:

{
  "ignore": {
    "files": ["src/generated/**", "**/*.stories.tsx", "scripts/**"]
  }
}

CLI overrides

CLI flags हमेशा config file values पर प्राथमिकता लेते हैं। उदाहरण के लिए, command line पर --verbose config file में "verbose": false को override करता है।

पूर्ण उदाहरण

{
  "ignore": {
    "rules": [
      "vercel-doctor/vercel-consider-bun-runtime",
      "vercel-doctor/vercel-avoid-platform-cron"
    ],
    "files": ["src/generated/**", "e2e/**"]
  },
  "lint": true,
  "deadCode": true,
  "verbose": false,
  "diff": "main"
}
Edit on GitHub

Last updated on

On this page