Skip to content

Sorting breaks wrapped function calls #5

@chazsolo

Description

@chazsolo

First - awesome plugin! It's solved a bunch of problems I had with the StringManipulation plugin and Intellij's native sort.

However, I found that it breaks when there is a function call that is not all on one line. As a contrived example, when sorting the following properties of 'process.env':

new webpack.DefinePlugin({
  'process.env': {
    NODE_ENV: JSON.stringify('development'),
    BASE_URL: JSON.stringify(
      'http://some.url'
    ),
  }
});

The result looks like:

new webpack.DefinePlugin({
  'process.env': {
    BASE_URL: JSON.stringify'http://some.url'
      (
    ),
    NODE_ENV: JSON.stringify('development'),
  }
});

Note the position of the opening ( ends up on the wrong line. However, if I run an "undo" command right after this - the alignment is fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions