ionic-team / ionic-team/ionic-cli

bug: Creating a component adds two spaces before implements OnInit

オープン
#5,105 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
triage
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

Creating a new component with `ionic g c new-component` automatically implements OnInit. While doing this, it adds two spaces before `implements OnInit` instead of one. This is a cli bug and of course a non blocking minor.

### Expected Behavior

Remove the extra space.

### Steps to Reproduce

- `ionic g c new-component`
- check the generated ts file

### Code Reproduction URL

https://github.com

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/kurti/.nvm/versions/node/v22.12.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.4.2
@angular-devkit/build-angular : 19.1.4
@angular-devkit/schematics : 19.1.4
@angular/cli : 19.1.4
@ionic/angular-toolkit : 12.1.1

Capacitor:

Capacitor CLI : 6.2.0
@capacitor/android : 6.2.0
@capacitor/core : 6.2.0
@capacitor/ios : 6.2.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v22.12.0 (/Users/kurti/.nvm/versions/node/v22.12.0/bin/node)
npm : 10.9.0
OS : macOS Unknown

### Additional Information

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。