dprint-plugin-typescript icon indicating copy to clipboard operation
dprint-plugin-typescript copied to clipboard

Option to add spaces around elements of arrays and indices

Open Auxx opened this issue 3 years ago • 0 comments

Right now dprint-plugin-typescript only has an option to add/remove spaces inside object declarations (spaceSurroundingProperties), but array formatting is completely ignored. IntelliJ/WebStorm has two settings: Within index access brackets and Within array brackets.

Within index access brackets formatting example:

listOfItems[ 1 ]
// or
listOfItems[1]

Within array brackets formatting example:

const listOfItems = [ 'apple', 'pear' ];
// or
const listOfItems = ['apple', 'pear'];

It would be great to have these options in dprint-plugin-typescript as well.

Auxx avatar Sep 09 '21 23:09 Auxx