Config
Sadrazam loads config from either:
sadrazam.jsonpackage.json#sadrazam
Example
Section titled “Example”Create a config file interactively:
sadrazam initThe init flow asks for reporter, scan mode, finding focus, noise exclusions, ignored packages, and optional custom scan inputs before writing sadrazam.json.
Validate an existing config:
sadrazam doctordoctor checks unsupported reporters, finding types, plugin keys, and stale allowlist, ignore, and catalog entries.
{ "reporter": "json", "maxShowIssues": 10, "production": false, "strict": false, "exclude": ["missing"], "ignorePackages": ["$packages:ignored"], "allowUnusedDependencies": [], "allowUnusedDevDependencies": ["typescript"], "allowMissingPackages": [], "allowMisplacedDevDependencies": [], "catalog": { "packages": { "ignored": ["react"] }, "entryFiles": { "bootstrap": ["scripts/bootstrap.ts"] } }, "inputs": { "entryFiles": ["$entryFiles:bootstrap"] }, "plugins": { "vite": true, "jest": false, "playwright": { "config": "config/playwright.config.ts", "entry": "integration/**/*.spec.ts" } }, "preprocessors": { "packagePatterns": ["@types/*"], "filePatterns": ["src/generated/*"], "exportPatterns": ["src/lib.ts: ignored*"] }, "jsdocTags": { "ignoreExports": ["sadrazam-ignore", "sadrazam-keep"] }, "workspace": ["packages/web"], "ai": { "provider": "openai", "model": "gpt-4.1" }}CLI flags override config values.
Supported Rule Keys
Section titled “Supported Rule Keys”ignorePackagesallowUnusedDependenciesallowUnusedDevDependenciesallowMissingPackagesallowMisplacedDevDependenciesmaxShowIssuescatalog.packagescatalog.entryFilesinputs.entryFilesinputs.packageNamesplugins.<name>plugins.<name>.configplugins.<name>.entrypreprocessors.packagePatternspreprocessors.filePatternspreprocessors.exportPatternsjsdocTags.ignoreExports
Catalog references can be used inside rule and input arrays with $packages:<name> and $entryFiles:<name>.
Plugin Configuration
Section titled “Plugin Configuration”Sadrazam automatically enables built-in plugin analysis from package declarations, scripts, and known config files. Plugin config can force-enable a plugin, disable one, or override its config and entry files:
{ "plugins": { "vite": true, "jest": false, "playwright": { "config": "config/playwright.config.ts", "entry": ["integration/**/*.spec.ts"] }, "github-actions": { "config": ".github/workflows/*.yml" }, "gitlab-ci": { "config": ".gitlab-ci.yml" }, "circleci": { "config": ".circleci/config.yml" }, "azure-pipelines": { "config": "azure-pipelines.yml" }, "bitbucket-pipelines": { "config": "bitbucket-pipelines.yml" }, "nx": { "config": "nx.json" }, "turbo": { "config": "turbo.json" }, "babel": { "config": ["babel.config.json", ".babelrc"] }, "lint-staged": { "config": ".lintstagedrc.json" }, "docker": { "config": ["Dockerfile", "docker-compose.yml"] } }}Supported built-in plugins currently cover Astro, Azure Pipelines, Babel, Bitbucket Pipelines, CircleCI, Commitlint, Cypress, Docker, ESLint, GitHub Actions, GitLab CI, Husky, Jest, Lerna, lint-staged, Next, Nx, Playwright, pnpm workspace, PostCSS, Prettier, Rollup, Rush, Storybook, SvelteKit, Tailwind, Turbo, TypeScript, Vite, Vitest, and webpack.