Skip to content

Suppress indentation when inserting newline after ''' #3780

@bsutton

Description

@bsutton

The lint
leading_newlines_in_multiline_strings Start multiline strings with a newline.

tells us to place a new line after '''

  const sql = '''select *
from...
''';

The fix is easy. Just insert the cursor after the first set of ''' and hit return.

The problem is the resulting indentation is:

  const sql = '''
  select *
from...
''';

Note the two spaces before select.

Instead the indent should place select hard against the left hand border.

  const sql = '''
select *
from...
''';

The current method results in a changing of the format of the string (it goes from having no leading spaces to having two leading spaces).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions