Search code examples
typescriptwebstorm

WebStorm Angular code arrangement - put decorated variables after non decorated


I'm trying to configure arrangement rules so class local variables are put before input variables. Kinda sort them like this:

private x;
public y;
@Input private z;
@Input public q;

But I can't find any information how to achieve that. Has anyone encountered the same impediment and found a solution to it?

Ex. transform this:

export class TestComponent {
    private options;
    public loading;

    @Input()
    public data;
    @Input()
    private elementId;
}

into this:

export class TestComponent {
    private options;

    public loading;

    @Input()
    private elementid;

    @Input()
    public data;
}

but all I managed to achieve is this:

export class TestComponent {
    private options;
    @Input()
    private elementId;

    @Input()
    public data;
    public loading;
}

Solution

  • Not currently possible; please vote for WEB-29658 and linked tickets to be notified on any progress with this feature