Skip to content

Run Code Actions On Save: Organize Imports #49961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DMEvans opened this issue May 16, 2018 · 2 comments
Closed

Run Code Actions On Save: Organize Imports #49961

DMEvans opened this issue May 16, 2018 · 2 comments
Assignees
Labels
upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@DMEvans
Copy link

DMEvans commented May 16, 2018

Issue Type: Bug

I've used the new feature to clean up my imports introduced in VSCode 1.23.1 and it's been very helpful for cleaning up dead references.

"[typescript]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},

However, it's causing lint errors in our angular projects because my company has a policy in our tslint.json that lines must be less than 140 characters. When VSCode organizes the imports it ignores this restriction and places all imported classes for a given namespace in a single line.

import { Component, OnInit, TemplateRef, ViewChild, Blah, Blah, Blah, Blah, Blah, Blah, Blah, Blah, Blah, Blah, Blah, Blah, Blah } from '@angular/core';

VS Code version: Code 1.23.1 (d0182c3, 2018-05-10T17:11:17.614Z)
OS version: Windows_NT x64 6.1.7601

Extensions (13)
Extension Author (truncated) Version
ng-template Ang 0.1.9
path-intellisense chr 1.4.2
githistory don 0.4.1
EditorConfig Edi 0.12.1
prettier-vscode esb 1.3.1
angular-essentials joh 0.3.2
Angular2 joh 6.1.1
vscode-github Kni 0.28.1
mssql ms- 1.3.1
csharp ms- 1.15.2
team ms- 1.133.0
debugger-for-chrome msj 4.4.3
angular2-inline nat 0.0.17

(1 theme extensions excluded)

@vscodebot
Copy link

vscodebot bot commented May 16, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@mjbvz
Copy link
Collaborator

mjbvz commented May 16, 2018

Duplicate of microsoft/TypeScript#22991

@mjbvz mjbvz marked this as a duplicate of microsoft/TypeScript#22991 May 16, 2018
@mjbvz mjbvz closed this as completed May 16, 2018
@mjbvz mjbvz self-assigned this May 16, 2018
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 16, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants