dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Option to add spaces around elements of arrays and indices
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.