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

jsdoc dependency rules changed #50452

Closed
kkmuffme opened this issue May 8, 2023 · 9 comments · Fixed by #53629
Closed

jsdoc dependency rules changed #50452

kkmuffme opened this issue May 8, 2023 · 9 comments · Fixed by #53629
Assignees
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress [Tool] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended

Comments

@kkmuffme
Copy link
Contributor

kkmuffme commented May 8, 2023

Description

jsdoc/newline-after-description was removed by jsdoc but is used here producing an error:

Definition for rule 'jsdoc/newline-after-description' was not found

See https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v42.0.0

There is a new default in jsdoc/tag-lines which does the same thing, which means removing this rule should be sufficient.

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

This package v14.5.0, jsdoc v42.0.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@gziolo gziolo added [Type] Bug An existing feature does not function as intended Good First Issue An issue that's suitable for someone looking to contribute for the first time [Tool] ESLint plugin /packages/eslint-plugin labels May 9, 2023
@ksharma20
Copy link

Can I pick this one, @gziolo?
I'm a newcomer and would require a little overview of what must be done!

@gziolo
Copy link
Member

gziolo commented May 11, 2023

Can I pick this one, @gziolo?
I'm a newcomer and would require a little overview of what must be done!

Sure, that would be great. Thank you for volunteering @ksharma20!

I guess we need to update the code in two places.

We need to change the existing ESLint config for JSDoc and the rule mentioned is listed in this line (there might be more places):

'jsdoc/newline-after-description': 'error',

We would also need to upgrade to the latest version the package with the JSDoc rules listed here:

"eslint-plugin-jsdoc": "^39.6.9",

@ksharma20
Copy link

Great, that's really helpful & appreciated! Thank you.
Please assign me to this task @gziolo

@gziolo gziolo added the [Status] In Progress Tracking issues with work in progress label May 11, 2023
@ksharma20
Copy link

ksharma20 commented May 11, 2023

Hey @gziolo, should I change 'jsdoc/tag-lines': 'off' to 'jsdoc/tag-lines': 'error' to turn on tag-lines as well ??? in below line?

'jsdoc/tag-lines': 'off',

I have removed the below line. Is it okay?

'jsdoc/newline-after-description': 'error',

And Upgraded jsdoc to v42.0.0 (reference line below), or show I take it to the latest v44.2.2?

"eslint-plugin-jsdoc": "^39.6.9",

I'm not sure what else needs to be changed!
Please let me know If anything else is also needed to be done.
Or any resource reference to go through before.

Thank you in advance! 🤗

@gziolo
Copy link
Member

gziolo commented May 11, 2023

BREAKING CHANGE:

  1. Removes jsdoc/newline-after-description rule in favor of jsdoc/tag-lines with option startLines: 0 for "never" and startLines: 1 for "always". Defaults now to startLines: 0
  2. Removes dropEndLines: true from jsdoc/tag-lines in favor of option endLines: 0
  3. Drops jsdoc/tag-lines rule's noEndLines: true in favor of applyToEndTag: false

The changelog for the package contains all recommendations.

v44.2.2?

Yes, the latest version would be the preferred one.

@ksharma20
Copy link

Appreciated. Thank you, sir. 🤗
I just had a little hard time understanding changelogs because I have never used jsdoc.

@ksharma20
Copy link

So, now my final changes are:

1.) Version Upgrade
"eslint-plugin-jsdoc": "^44.2.3"

2.) Removing Line
'jsdoc/newline-after-description': 'error'

3.) Modifying Line

'jsdoc/tag-lines': [
  'error', 
    {
      startLines: 0,
      endLines: 0,
      applyToEndTag: false,
    }
]

Are these the only changes required @gziolo ?

@gziolo
Copy link
Member

gziolo commented May 12, 2023

I haven't tested it, but it might be it code-wise. There will be some changes to the lock file after npm install, and it would be great to add a changelog entry for the modified package.

@gziolo
Copy link
Member

gziolo commented Aug 14, 2023

I opened #53629 to bring the work started by @ksharma20 to the finish line. It also will unblock usage with Node 20.

@gziolo gziolo self-assigned this Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress [Tool] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants