tsconfig-inspect
is a CLI tool designed to provide an enhanced view of the TypeScript configuration options, offering
deeper insights than the standard --showConfig
parameter. It allows users to inspect the tsconfig file more
thoroughly, including defaults and more complex dependencies.
- Custom Path Specification: Specify the path to your tsconfig file.
- View Default Options: Choose whether to display unchanged default options.
- Resolve Included Files: Option to display files resolved by the tsconfig.
{
"compilerOptions": {
"target": "NodeNext"
}
}
tsc --showConfig | tsconfig-inspect |
{
"module": "nodenext",
"target": "esnext",
"moduleResolution": "nodenext",
"moduleDetection": "force",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"useDefineForClassFields": true
} |
{
"incremental": false,
"target": "esnext",
"useDefineForClassFields": true,
"moduleDetection": "force",
"module": "nodenext",
"moduleResolution": "nodenext",
"resolvePackageJsonExports": true,
"resolvePackageJsonImports": true,
"resolveJsonModule": false,
"allowJs": false,
"declaration": false,
"declarationMap": false,
"newLine": "lf",
"preserveConstEnums": false,
"isolatedModules": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": false,
"strictNullChecks": false,
"strictFunctionTypes": false,
"strictBindCallApply": false,
"strictPropertyInitialization": false,
"noImplicitThis": false,
"useUnknownInCatchVariables": false,
"alwaysStrict": false,
"charset": "utf8",
"importsNotUsedAsValues": "remove",
"jsxFactory": "React.createElement",
"jsxFragmentFactory": "React.Fragment",
"jsxImportSource": "react",
"reactNamespace": "React",
"pretty": true
} |
Before you can use tsconfig-inspect
, make sure you have Node.js installed on your machine. You can then install the
tool via npm or yarn:
npm install -g tsconfig-inspect
# or
yarn global add tsconfig-inspect
To use tsconfig-inspect
, run the following command in your terminal:
tsconfig-inspect [options]
--path <value>
: The path to the tsconfig file to inspect. Defaults to./tsconfig.json
.--defaults <value>
: Enable or disable showing unchanged default settings (true/false
). Default istrue
.--showFiles <value>
: Enable or disable showing resolved included files (true/false
). Default istrue
.
Inspect the tsconfig.json
in the current path
tsconfig-inspect
Inspect a Specific tsconfig File
tsconfig-inspect --path /path/to/your/tsconfig.json
Hide Default Options
tsconfig-inspect --defaults false
Disable Resolved Files Display
tsconfig-inspect --showFiles false
Contributions are always welcome! Please read the contributing guidelines before starting.
tsconfig-inspect
is released under the MIT License.