Skip to content

Commit

Permalink
docs: mention both eslint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
innocenzi committed Apr 7, 2022
1 parent a54720a commit de8cb0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/laravel/executing-the-transform-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ php artisan typescript:transform --output=types.d.ts

This file will be stored in the resource's path of your Laravel application.

It is also possible to automatically format the generated TypeScript with prettier:
It is also possible to automatically format the generated TypeScript with Prettier, ESLint, or a custom formatter:

```bash
php artisan typescript:transform --format
Expand Down
6 changes: 3 additions & 3 deletions docs/laravel/installation-and-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ return [
'writer' => Spatie\TypeScriptTransformer\Writers\TypeDefinitionWriter::class,

/*
* The generated TypeScript file can be formatted. We ship a Prettier formatter
* out of the box: `PrettierFormatter` but you can also implement your own one.
* The generated TypeScript will not be formatted when no formatter was set.
* The generated TypeScript file can be formatted. We ship two formatters by
* default: a Prettier and an ESLint one. You can also implement your own.
* The generated TypeScript will not be formatted if none is configured.
*/

'formatter' => null,
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/formatters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Formatters
weight: 7
---

This output file with all the transformed types can be formatted using tools like Prettier. We ship a Prettier formatter by default with the package, which will run Prettier after the output file is generated. you can configure it as such:
This output file with all the transformed types can be formatted using tools like Prettier. We ship an ESLint and a Prettier formatter, which will run after the output file is generated. For instance, you can configure the Prettier formatter as such:

```php
$config = TypeScriptTransformerConfig::create()
Expand Down

0 comments on commit de8cb0c

Please sign in to comment.