Skip to content

Configuration

@masumdev/tscheck can be configured using JSON, YAML, or TypeScript configuration files.

When no explicit configuration file path is passed via -c or --config, tscheck automatically searches the current working directory for:

  1. .tscheckrc.json / tscheck.config.json
  2. .tscheckrc.yaml / tscheck.config.yaml / .tscheckrc.yml / tscheck.config.yml
  3. tscheck.config.ts / tscheck.config.js / tscheck.config.mjs

Configuration Formats

Full schema autocompletion in VS Code, Cursor, and Zed via $schema:

{
"$schema": "https://raw.githubusercontent.com/masumrpg/react-native-library/main/packages/tscheck/schema.json",
"rootDir": ".",
"workspaces": ["packages/*", "apps/*"],
"exclude": ["node_modules", "dist", "build", ".expo", ".turbo", ".temp"],
"rules": {
"deprecated": true,
"unused": true,
"noExplicitAny": true,
"circular": true
},
"reporters": {
"outputDir": ".temp/tscheck",
"json": true,
"markdown": true,
"html": true,
"ai": true,
"serve": false,
"open": false,
"port": 5500,
"editor": "vscode",
"githubAnnotations": false
},
"failOnWarning": false
}

Tip: You can also use the local package path: "$schema": "node_modules/@masumdev/tscheck/schema.json".


Inline Comment Suppression

You can selectively disable inspections for individual lines or blocks of code using comment annotations:

// 1. Ignore next line for a specific rule
// tscheck-ignore-next-line any
const rawData: any = JSON.parse(response);
// 2. Ignore multiple rules on next line
// tscheck-ignore-next-line any, deprecated
const result: any = legacyHelper();
// 3. Ignore all rules on next line
// tscheck-ignore-next-line
const oldItem: any = oldApi();
// 4. Block-level suppression
/* tscheck-disable any */
const a: any = 1;
const b: any = 2;
/* tscheck-enable any */

Supported Rule Keywords in Comments

  • deprecated
  • unused
  • any / noExplicitAny
  • circular
  • all

Configuration Options Reference

rootDir

  • Type: string
  • Default: "." (resolved to process.cwd())

workspaces

  • Type: string[]
  • Default: ["packages/*", "apps/*"] (or fallback to root tsconfig.json)

exclude

  • Type: string[]
  • Default: ["node_modules", "dist", "build", ".expo", ".turbo", ".temp"]

staged

  • Type: boolean
  • Default: false

since

  • Type: string
  • Example: "main" or "HEAD~1"

fix

  • Type: boolean
  • Default: false

format

  • Type: "pretty" | "json" | "github" | "ai"
  • Default: "pretty"

serve

  • Type: boolean
  • Default: true (starts local HTTP report server after audit)

open

  • Type: boolean
  • Default: false

port

  • Type: number
  • Default: 5500

editor

  • Type: "vscode" | "cursor" | "antigravity" | "windsurf" | "zed" | "webstorm" | "sublime" | "vscode-insiders"
  • Default: "vscode"

reporters

  • Type: object
    • outputDir?: string (Default: ".temp/tscheck"): Destination folder for generated reports.
    • json?: boolean (Default: true): Generates audit-report.json.
    • markdown?: boolean (Default: true): Generates audit-report.md.
    • html?: boolean (Default: true): Generates interactive audit-report.html with real-time search, filters, dark/light theme, and clickable editor links.
    • ai?: boolean (Default: true): Generates token-efficient audit-report.ai.md.
    • githubAnnotations?: boolean (Default: false): Emits GitHub Actions workflow annotations.