Organize Imports puts exports on single line

Viewed 581

Settings "source.organizeImports" to true automatically puts exports onto a single line.

export {
    Core,
    TokenSymbol,
    Token,
    TokenType,
    TypeError,
    TOKEN_TYPE_MAP,
    SymbolError,
    VALUE_TOKEN_TYPES
};

is updated to:

export {Core, TokenSymbol, Token, TokenType, TypeError, TOKEN_TYPE_MAP, SymbolError, VALUE_TOKEN_TYPES};

Interestingly enough, it doesn't happen with export default

export default {
    Core,
    SymbolError,
    TOKEN_TYPE_MAP,
    TokenSymbol,
    TokenType,
    TypeError,
    VALUE_TOKEN_TYPES,
};

this stays multi-line.

Btw I'm talking about "code actions on save" if that helps

"editor.codeActionsOnSave": {
    "source.fixAll": true,
    "source.organizeImports": true,
}
VS-Code Version: 1.44.0
Operating System: Ubuntu Linux
0 Answers
Related