angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open czimmons opened this issue 9 years ago • 2 comments

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.

czimmons avatar Jun 12 '17 17:06 czimmons

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.

filipesilva avatar Jun 21 '17 09:06 filipesilva

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.