avh4 / avh4/elm-format

Automatic imports

Open
#552 1 comment 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Haskell
Stars
1.3k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

I'd really like to see automatic imports either built into elm-format, or as a stand-alone tool. This means removing unused imports and adding forgotten imports.

On that note, how does everyone else manage imports? Coming from Go, I'm finding using Elm extremely irritating for this particular reason only. For example, I went to refactor a large file into multiple files, and then I had to painstakingly go through each import one by one, adjust, save, read compiler error, adjust, save, read compiler error, etc. to fix the imports across the new and old files. Surely there's a better way to do this?

And on top of that, unless you delete all of your imports and re-import them all manually every time you refactor like this, it's quite easy to leave stale imports behind and you have no way of knowing. Does that impact binary size?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names elm-format but no files, tests, or entry points. Start by clarifying whether the goal is a built-in formatter feature or a standalone import tool, and define how unused and missing imports should be detected. Done should include an agreed scope and behavior for refactoring imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.