mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #65798 Fix prettier command to not expand in 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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user