Files
test-repo/changelog_unreleased/javascript/18540.md
T
fisker Cheungandautofix-ci[bot] 68861ae531 Fix dangling comment detection in function parameters and call arguments (#18540)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-29 19:52:29 +08:00

488 B

Fix comment print for parenthesized callee (#18540 by @fisker)

// Input
const a = (
  	function(){}
  	/* comment for callee */
  )(),
  b = (
    function(){}
  )(/* comment for call */)

// Prettier stable
const a = (function () {})(),
  /* comment for callee */
  b = (function () {})(/* comment for call */);

// Prettier main
const a = (
    function () {}
    /* comment for callee */
  )(),
  b = (function () {})(/* comment for call */);