---
jsApi: true
title: "[F] checkFormatCadl"

---
```ts
checkFormatCadl(code, prettierConfig?): Promise<boolean>
```

## Parameters

| Parameter | Type |
| :------ | :------ |
| `code` | `string` |
| `prettierConfig`? | `Options` |

## Returns

`Promise`<`boolean`\>

## Deprecated

use checkFormatTypeSpec
