ionic-team / ionic-team/ionic-cli

bug: Creating a component adds two spaces before implements OnInit

Đang mở
#5,105 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.