angular / angular-cli

CLI tool for Angular
https://cli.angular.dev
MIT License
26.78k stars 11.98k forks source link

ng lint -fix doesn't work transforming single quotes to double quotes #6647

Closed czimmons closed 7 years ago

czimmons commented 7 years ago

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.1.1 node: 6.9.1 os: win32 x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @angular/core: 4.1.3 @angular/forms: 4.1.3 @angular/http: 4.1.3 @angular/platform-browser: 4.1.3 @angular/platform-browser-dynamic: 4.1.3 @angular/router: 4.1.3 @angular/cli: 1.1.1 @angular/compiler-cli: 4.1.3

Repro steps.

ng lint -fix

The log given by the failure.

examples of lines with single quotes:

Before: import { ModalComponent } from 'ng2-bs3-modal/ng2-bs3-modal';
@ViewChild('modal') modal: ModalComponent;
After: import { ModalComponent } from"ng2-bs3-modal/ng2-bs3-modal"; ";"; @ViewChild"modal"; )";; modal: ModalComponent;

In my tslint.json: "quotemark": [ true, "double" ],

Desired functionality.

Single quotes are replaced with double quotes.

Mention any other details that might be useful.

I am using Visual Studio 2015 to edit typescript. After running ng lint -fix the Visual Studio "Inconsistent Line Endings" window appears and asks if I want to normalize line endings.

filipesilva commented 7 years ago

It sounds like tslint tried to do something but failed. Please open this issue in https://github.com/palantir/tslint instead, the CLI just calls tslint for this functionality.

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.