Skip to content

Support line length #23381

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
mjbvz opened this issue Apr 12, 2018 · 2 comments
Closed

Support line length #23381

mjbvz opened this issue Apr 12, 2018 · 2 comments
Labels
Domain: Formatter The issue relates to the built-in formatter Duplicate An existing issue was already created Suggestion An idea for TypeScript

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 12, 2018

From @MichaelRBond on April 11, 2018 17:47

Issue Type: Bug

If imports are broken up across multiple lines, to honor tslint line length limits, running Organize Imports will merge imports onto a single line causing a tslint error.

Reproduce:

  • split imports across multiple lines
  • run Organize Imports

Expected result:

  • import lines do not exceed TSLint line length

VS Code version: Code 1.22.1 (950b8b0d37a9b7061b6f0d291837ccc4015f5ecd, 2018-04-06T00:21:13.607Z)
OS version: Darwin x64 17.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (8 x 2800)
Load (avg) 4, 4, 5
Memory (System) 16.00GB (0.45GB free)
Process Argv /Applications/Visual Studio Code.app/Contents/MacOS/Electron -psn_0_3691397
Screen Reader no
VM 0%
Extensions (25)
Extension Author (truncated) Version
vscode-markdownlint Dav 0.14.1
todo-tree Gru 0.0.31
JSDocTagComplete Hoo 0.0.2
vscode-todo Mat 0.8.0
vscode-docker Pet 0.0.26
cform aws 0.0.10
solargraph cas 0.15.0
tslint eg2 1.0.28
json-tools eri 1.0.2
vscode-emacs hir 0.1.1
ruby-linter hoo 1.0.0
terraform mau 0.0.23
prettify-json moh 0.0.3
python ms- 2018.3.1
azure-account ms- 0.4.0
dust nem 0.0.1
Ruby reb 0.18.0
java red 0.22.0
vscode-icons rob 7.22.0
code-spell-checker str 1.6.6
vscode-java-debug vsc 0.8.0
vscode-java-pack vsc 0.3.0
vscode-java-test vsc 0.5.0
vscode-maven vsc 0.6.0
vscode-todo-highlight way 0.5.12

(1 theme extensions excluded)

Copied from original issue: microsoft/vscode#47679

@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 12, 2018

Moving upstream to get more feedback

I know that we do not use tslint rules for formatting but we can see if there should be a TS option for import line length or if we should at least preserve new lines in existing imports

@mhegazy mhegazy changed the title Import orginization doesn't honor tslint line length rules Support line length Apr 12, 2018
@mhegazy mhegazy added Suggestion An idea for TypeScript Domain: Formatter The issue relates to the built-in formatter labels Apr 12, 2018
@mjbvz mjbvz added the Duplicate An existing issue was already created label Apr 17, 2018
@mjbvz
Copy link
Contributor Author

mjbvz commented Apr 17, 2018

Duplicate of #22991

@mjbvz mjbvz marked this as a duplicate of #22991 Apr 17, 2018
@mjbvz mjbvz closed this as completed Apr 17, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Formatter The issue relates to the built-in formatter Duplicate An existing issue was already created Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants