Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#65798 Fix prettier command to not expand i…
Browse files Browse the repository at this point in the history
…n shell by @mstoykov

* Fix prettier command to not expand in shell

The previous prettier command was expanded by the shell used which might differ from how it will be expanded by prettier.

Which effectively means it won't go through all subdirectories.

* Make the changes in the translated README files
  • Loading branch information
mstoykov authored Jun 19, 2023
1 parent af927d0 commit 23abe47
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ Se un file non è nè testato nè riferito nell'`index.d.ts`, aggiungilo in un f
#### Errori comuni

* Inanzitutto segui i consigli nel [manuale](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).
* Formattazione: Usa 4 spazi. Prettier è abilitato su questa repo, quindi puoi eseguire `npm run prettier -- --write path/to/package/**/*.ts`. [Quando usi le assertion](https://github.com/SamVerschueren/tsd#assertions), aggiungi `// prettier-ignore` per marcare le linee di codice da escludere quando si fa la formattazione:
* Formattazione: Usa 4 spazi. Prettier è abilitato su questa repo, quindi puoi eseguire `npm run prettier -- --write 'path/to/package/**/*.ts'`. [Quando usi le assertion](https://github.com/SamVerschueren/tsd#assertions), aggiungi `// prettier-ignore` per marcare le linee di codice da escludere quando si fa la formattazione:

```tsx
// prettier-ignore
Expand Down
2 changes: 1 addition & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ DefinitelyTyped 外のモジュールに依存しないパッケージについ
#### よくあるミス

* はじめに、[ハンドブック](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html)に記載されているアドバイスに従ってください。
* フォーマットについて: 4個のスペースを使ってください。このレポジトリでは Prettier がセットアップされているので、 `npm run prettier -- --write path/to/package/**/*.ts` で実行できます。[アサーションを使用している場合](https://github.com/SamVerschueren/tsd#assertions)`// prettier-ignore` を使ってその行をフォーマット対象から除外してください。
* フォーマットについて: 4個のスペースを使ってください。このレポジトリでは Prettier がセットアップされているので、 `npm run prettier -- --write 'path/to/package/**/*.ts'` で実行できます。[アサーションを使用している場合](https://github.com/SamVerschueren/tsd#assertions)`// prettier-ignore` を使ってその行をフォーマット対象から除外してください。
```tsx
// prettier-ignore
// @ts-expect-error
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ If a file is neither tested nor referenced in `index.d.ts`, add it to a file nam
#### Common mistakes

* First, follow advice from the [handbook](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).
* Formatting: Use 4 spaces. Prettier is set up on this repo, so you can run `npm run prettier -- --write path/to/package/**/*.ts`. [When using assertions](https://github.com/SamVerschueren/tsd#assertions), add `// prettier-ignore` exclusion to mark line(s) of code as excluded from formatting:
* Formatting: Use 4 spaces. Prettier is set up on this repo, so you can run `npm run prettier -- --write 'path/to/package/**/*.ts'`. [When using assertions](https://github.com/SamVerschueren/tsd#assertions), add `// prettier-ignore` exclusion to mark line(s) of code as excluded from formatting:
```tsx
// prettier-ignore
// @ts-expect-error
Expand Down
2 changes: 1 addition & 1 deletion README.pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ Se um arquivo não for testado nem referenciado no `index.d.ts`, adicione-o em u
#### Erros comuns

* Primeiro, siga as instruções do [manual](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).
* Formatação: Use 4 espaços. O Prettier está configurado neste repositório, então você pode executar `npm run prettier -- --write path/to/package/**/*.ts`. [Se estiver usando asserções](https://github.com/SamVerschueren/tsd#assertions), adicione a tag de exclusão `// prettier-ignore` para marcar linhas de código como exclusas da formatação:
* Formatação: Use 4 espaços. O Prettier está configurado neste repositório, então você pode executar `npm run prettier -- --write 'path/to/package/**/*.ts'`. [Se estiver usando asserções](https://github.com/SamVerschueren/tsd#assertions), adicione a tag de exclusão `// prettier-ignore` para marcar linhas de código como exclusas da formatação:
```tsx
// prettier-ignore
// @ts-expect-error
Expand Down
2 changes: 1 addition & 1 deletion README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ const enum Enum { Two } // eslint-disable-line no-const-enum
#### 常见错误

* 首先,请遵循[手册](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html)的建议。
* 格式化:使用 4 个空格。 该仓库已经设置了 Prettier,因此你只需要运行 `npm run prettier -- --write path/to/package/**/*.ts`。[使用断言时](https://github.com/SamVerschueren/tsd#assertions),添加 `// prettier-ignore` 将这几行标记为不需要格式化的代码:
* 格式化:使用 4 个空格。 该仓库已经设置了 Prettier,因此你只需要运行 `npm run prettier -- --write 'path/to/package/**/*.ts'`。[使用断言时](https://github.com/SamVerschueren/tsd#assertions),添加 `// prettier-ignore` 将这几行标记为不需要格式化的代码:
```tsx
// prettier-ignore
// @ts-expect-error
Expand Down

0 comments on commit 23abe47

Please sign in to comment.