Skip to content

Don't re-write import * as ... from ... #662

Closed
@fvictorio

Description

@fvictorio

This

import * as Bar from "./Bar.sol";

is re-written as

import "./Bar.sol" as Bar;

Those two statements are (I think?) semantically equivalent, but I think this is too opinionated. We should keep in mind that prettier solidity is not only being used by smart contract developers. For example, @OmarTawfik is considering using it to generate snippets in an upcoming solidity specification, and re-writes like this one make it impossible to use for that use case.

We could have an option for this, but I think at this point everyone knows I really, really don't like adding new options 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions