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:
.tscheckrc.json/tscheck.config.json.tscheckrc.yaml/tscheck.config.yaml/.tscheckrc.yml/tscheck.config.ymltscheck.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".
Configure cleanly with YAML syntax and yaml-language-server schema integration:
# yaml-language-server: $schema=https://raw.githubusercontent.com/masumrpg/react-native-library/main/packages/tscheck/schema.jsonrootDir: .workspaces: - packages/* - apps/*exclude: - node_modules - dist - build - .expo - .turbo - .temprules: deprecated: true unused: true noExplicitAny: true circular: truereporters: outputDir: .temp/tscheck json: true markdown: true html: true ai: true port: 5500 editor: vscodefailOnWarning: falseUse defineConfig() for type-safety and JSDoc metadata in TypeScript:
import { defineConfig } from "@masumdev/tscheck";
export default defineConfig({ rootDir: process.cwd(), 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, editor: "vscode", }, failOnWarning: false,});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 anyconst rawData: any = JSON.parse(response);
// 2. Ignore multiple rules on next line// tscheck-ignore-next-line any, deprecatedconst result: any = legacyHelper();
// 3. Ignore all rules on next line// tscheck-ignore-next-lineconst 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
deprecatedunusedany/noExplicitAnycircularall
Configuration Options Reference
rootDir
- Type:
string - Default:
"."(resolved toprocess.cwd())
workspaces
- Type:
string[] - Default:
["packages/*", "apps/*"](or fallback to roottsconfig.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:
objectoutputDir?: string(Default:".temp/tscheck"): Destination folder for generated reports.json?: boolean(Default:true): Generatesaudit-report.json.markdown?: boolean(Default:true): Generatesaudit-report.md.html?: boolean(Default:true): Generates interactiveaudit-report.htmlwith real-time search, filters, dark/light theme, and clickable editor links.ai?: boolean(Default:true): Generates token-efficientaudit-report.ai.md.githubAnnotations?: boolean(Default:false): Emits GitHub Actions workflow annotations.
Author & Monorepo Links
- Author: Ma’sum
- Repository: GitHub Repository
- Docs Portal: https://react-native-library-docs.vercel.app/