avh4 / avh4/elm-format

Automatic fix request: module Path.To.File instead of module Main

Open
#776 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.3k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

I love elm-format, and I'm wondering if it's possible to add one more auto-fix to it. I'm often exposing everything from my lamdera `Types.elm` file, and just deleting the `exposing Types ` line and let elm-format add in the new exports for me. The trouble is that I'm always replacing `Main` to `Types` after.

Would it be possible for elm-format to use the current filename instead of Main when adding that `exposing Main ..` line? I'm sure the intention is just to help getting a blank Elm file compiling, so no worries if its not on the table!

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name a file, test, or entry point. Start by locating the formatter logic that adds `exposing Main ..` to a blank Elm module, then check how the current filename could supply that module name. Done means the generated exposing line uses the filename instead of `Main` without changing other formatting behavior.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.