Skip to content

Allow parentheses when JSDoc to allow intellisense #14227

@EloB

Description

@EloB

Prettier 2.8.3
Playground link

--parser babel

Input:

module.exports = /** @satisfies {Record<string, string>} */ ({
  hello: 1337,
});

Output:

module.exports = /** @satisfies {Record<string, string>} */ {
  hello: 1337,
};

Expected behavior:
Keep those parentheses to not break intellisense.

module.exports = /** @satisfies {Record<string, string>} */ ({
  hello: 1337,
});

Here is an example of using @satisfies jsdoc. microsoft/TypeScript#51753

prettier

Metadata

Metadata

Assignees

Labels

lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:needs discussionIssues needing discussion and a decision to be made before action can be takentype:typecheckingIssues and PRs related to using TypeScript's JSDoc syntax to typecheck the codebase

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions