Skip to content

Declare each parameter, modifier, and return value on its own line #454

@yosriady

Description

@yosriady

How do I configure the plugin to declare each parameter, modifier, and return value on its own line? For example:

function foo(
  address[] bars
)
  external
  myModifier(_bars.length, msg.sender)
  returns (
    address baz,
    bool bam
  )
{
...
}

Currently, if you run prettier, it'll format the above to a single line:

function foo(address[] bars) external myModifier(_bars.length, msg.sender) returns (address baz,	bool bam) {
...
}

Here is my .prettierrc:

{
  "arrowParens": "avoid",
  "bracketSpacing": true,
  "endOfLine":"auto",
  "printWidth": 120,
  "singleQuote": false,
  "tabWidth": 2,
  "trailingComma": "all",
  "overrides": [
    {
      "files": "*.sol",
      "options": {
        "tabWidth": 2
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions