JSDoc compatibility: support prettier-ignore inside multi-line/JSDoc comment?
See original GitHub issuePrettier 1.14.3 Playground link
I value human readability, so I often adjust the position of the colon and the position of the comment.
/**
* Constants of ranking
*/
// prettier-ignore
export const RankingConstant = {
KEY_DAILY_RANKING : 'DAILY_RANKING', // Key of daily ranking
KEY_WEEKLY_RANKING : 'WEEKLY_RANKING', // Key of weekly ranking
KEY_MONTHLY_RANKING: 'MONTHLY_RANKING', // Key of monthly ranking
LIMIT_OF_PAGE : 50, // Limit of page
MAX_PAGE : 100, // Max page
};
Problem
I can adjust it using prettier-ignore
comment, but the way to write single-line comments under multi-line comments is ugly and It may affect JSDoc (unconfirmed though).
Expect
Could you please write like this?
/**
* Constants of ranking
* prettier-ignore
*/
or
/**
* Constants of ranking
* @prettier-ignore
*/
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
JSDoc Reference - TypeScript: Documentation
The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >What is the correct way to write multi-line code in JSDoc ...
So I wonder what is the correct way to write multi-line code in comment? Update 2020/9/25. I can confirm this problem doesn't exist...
Read more >jsdoc | Yarn - Package Manager
An API documentation generator for JavaScript. Want to contribute to JSDoc? Please read CONTRIBUTING.md . Installation and Usage. JSDoc supports stable versions ...
Read more >Type-safe JavaScript code with JsDoc - Prisma
JsDoc is compatible with both JavaScript and TypeScript. ... JavaScript's primitive type types are supported in JsDocs.
Read more >NetSuite Applications Suite - SuiteScript 2.x JSDoc Validation
The JSDoc tags are added to the comment blocks, and they are used to ... Some of these tags are required in each...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks!
Closing as per https://github.com/prettier/prettier/pull/5748#pullrequestreview-191924898