grain icon indicating copy to clipboard operation
grain copied to clipboard

Formatter: Pun aliases when possible

Open ospencer opened this issue 2 years ago • 0 comments

There are many cases, such as include statements, where a user might add/refactor into an alias that's the same as the name of the thing they're aliasing, e.g. from "list" include List as List. It'd be good to have the formatter remove the redundant alias.

One thing to consider: a case like let foo = (param as param) => ... is a typechecking error, but formatting the code would make the error go away. We'll need to decide if this is something acceptable for the formatter to fix.

ospencer avatar Feb 22 '24 04:02 ospencer