Skip to content

comment.placement is undefined when printing after 3.9.0. #19515

Description

@Janther

Environments:

  • Prettier Version: 3.9.4
  • Running Prettier via: API
  • Runtime: Node 24
  • Operating System: macOS
  • Prettier plugins (if any): prettier-plugin-solidity

Expected behavior:

when printing we ask comment.placement === 'ownLine' expecting a comment.placement to be a string.

Actual behavior:

comment.placement is undefined.

The interesting thing is that the value is still there after running addTrailingComment() so it must be deleted at some other moment.

I'd like to know if this behaviour is expected from now on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiIssues with Prettier's Application Programming Interfacearea:plugin api

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions