Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New linter rules erase some JSDoc formatting #398

Open
5 tasks done
andretchen0 opened this issue May 2, 2024 · 2 comments
Open
5 tasks done

New linter rules erase some JSDoc formatting #398

andretchen0 opened this issue May 2, 2024 · 2 comments

Comments

@andretchen0
Copy link
Contributor

andretchen0 commented May 2, 2024

Problem

A linter rule added in #388 erases valid Markdown.

Italics

This is an italicized word in valid Markdown in a JSDoc.

/**
 * *italic*
 **/
Screenshot 2024-05-02 at 23 01 10

Linted:

/**
 * italic*
 **/
Screenshot 2024-05-02 at 23 02 12

Bulleted lists

This is a bulleted list in valid Markdown in a JSDoc.

/**
 * * list item 1
 * * list item 2
 * * list item 3
 **/
Screenshot 2024-05-02 at 23 03 16

Linted:

/**
 * list item 1
 * list item 2
 * list item 3
 **/
Screenshot 2024-05-02 at 23 03 50

Solution

  • Change this setting: "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":true}]
  • Revert the incorrectly linted changes.

See also

Steps to reproduce

  • Add this to a Cientos component:
/**
 * * list item 1
 * * list item 2
 * * list item 3
 **/
interface List {}
  • Save
  • Run pnpm run lint --fix
  • The result will be:
/**
 * list item 1
 * list item 2
 * list item 3
 **/
interface List {}

Code of Conduct

@alvarosabu
Copy link
Member

alvarosabu commented May 3, 2024

Hi @andretchen0 thanks for raising this, we could change this setting directly on https://github.com/Tresjs/eslint-config so the whole ecosystem is protected against the issue, wdyt?

@andretchen0
Copy link
Contributor Author

Hi @andretchen0 thanks for raising this, we could change this setting directly on https://github.com/Tresjs/eslint-config so the whole ecosystem is protected against the issue, wdyt?

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants