Skip to content

Don't create comment map if checkLeadingNewline is disabled #224

@bombsimon

Description

@bombsimon

There's no need to create a comment map for a node in checkBlockLeadingNewline, checkCaseLeadingNewline and checkCommLeadingNewline if checkLeadingNewline will do an early return.

Either duplicate the check, or pass the node needed for the comment map and create the map only if enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions