microsoft / microsoft/TypeScript

Support max-line-length in organize imports

Open
#22,991 38 comments 74 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: Formatter Domain: LS: Organize Imports Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Referenced in https://github.com/Microsoft/TypeScript/issues/22974

By the way, I ran "organize imports" on about 800 files. Works really well other than this problem and it puts imports that were previously on multiple lines onto one... so that will break my linting rule for "max-line-length". Luckily it's easy to write a script to investigate and break them back onto multiple lines 😄

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the organize imports entry point and review the referenced TypeScript issue for the expected max-line-length behavior. Trace where imports are regrouped and formatted, then verify that the configured line limit is respected without collapsing previously multiline imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.