An open API service indexing awesome lists of open source software.

https://github.com/activeguild/tsconf-checker

Validate the tsconfig.json file used in the typescript file and display a warning.
https://github.com/activeguild/tsconf-checker

Last synced: 6 months ago
JSON representation

Validate the tsconfig.json file used in the typescript file and display a warning.

Awesome Lists containing this project

README

          

tsconf-checker ⚡ Welcome 😀


GitHub Actions status

# tsconf-checker

Validate the tsconfig.json file used in the typescript file and display a warning.

Supports TypeScript version 4.4.x.

## Usage

For example, if the following tsconfig.json file exists.

```json
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"baseUrl": "./src",
"resolveJsonModule": true,
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"strictFunctionTypes": true,
"skipLibCheck": true
}
}
```

```bash
npx tsconf-checker index.ts
```

or

```
npm i -D tsconf-checker
```

```check.ts
#!/usr/bin/env node
import { checkTsconf } from 'tsconf-checker';

checkTsconf('index.ts');
```

A warning is displayed as shown below.

```bash
Warning: strictFunctionTypes is implicitly true because 'strict' option is true.
Warning: 'skipLibCheck' option is officially recommended to be false.
Warning: 'esModuleInterop' option is officially recommended to be false.
Warning: 'forceConsistentCasingInFileNames' option is officially recommended to be false.
```

## Principles of conduct

Please see [the principles of conduct](https://github.com/activeguild/tsconf-checker/blob/master/.github/CONTRIBUTING.md) when building a site.

## License

This library is licensed under the [MIT license](https://github.com/activeguild/tsconf-checker/blob/master/LICENSE).