Configuration
@masumdev/tscheck exclusively uses type-safe TypeScript/JavaScript configuration (tscheck.config.ts, tscheck.config.js, tscheck.config.mjs, tscheck.config.cjs).
When no explicit configuration file path is passed via -c or --config, tscheck automatically searches the current directory and walks up the directory tree to discover:
tscheck.config.tstscheck.config.jstscheck.config.mjstscheck.config.cjs
TypeScript Configuration (tscheck.config.ts)
Use the defineConfig() helper with the Editor Enum for compile-time type validation, autocompletion, and JSDoc tooltips:
import { defineConfig, Editor } from "@masumdev/tscheck";
export default defineConfig({ rootDir: process.cwd(), workspaces: ["packages/*", "apps/*"], exclude: ["node_modules", "dist", "build", ".expo", ".turbo", ".temp"], editor: Editor.CURSOR, // VSCODE, CURSOR, ANTIGRAVITY, WINDSURF, ZED, WEBSTORM, SUBLIME rules: { deprecated: true, unused: true, noExplicitAny: true, circular: true, }, reporters: { outputDir: ".temp/tscheck", json: true, markdown: true, html: true, ai: true, }, 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/