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

Definition for rule 'jsdoc/newline-after-description' #1031

Closed
kle-pra opened this issue Apr 19, 2023 · 5 comments
Closed

Definition for rule 'jsdoc/newline-after-description' #1031

kle-pra opened this issue Apr 19, 2023 · 5 comments
Labels

Comments

@kle-pra
Copy link

kle-pra commented Apr 19, 2023

With "eslint-plugin-jsdoc": "43.0.6" there seems to be an error with this rule and linting:

Example:

/home/user/project/frontend/src/polyfills.ts
  1:1  error  Definition for rule 'jsdoc/newline-after-description' was not found  jsdoc/newline-after-description

To pass linting I had to turn off the rule off in eslintrc.json: "jsdoc/newline-after-description": "off",

Environment

npm: '9.5.1',
node: '18.16.0'

and:

"eslint": "^8.38.0",
"eslint-plugin-jsdoc": "43.0.6"

@brettz9
Copy link
Collaborator

brettz9 commented Apr 19, 2023

The rule was removed. Are you relying on a config which uses it?

@brettz9
Copy link
Collaborator

brettz9 commented Apr 19, 2023

I.e., what exactly does your .eslintrc or eslint.config.js file look like?

@kle-pra
Copy link
Author

kle-pra commented Apr 19, 2023

I see, I missed that.
Yes, config is extending from angular's eslint but it seems they are aware already:
angular-eslint/angular-eslint#1353

Thank you.

@HitkoDev
Copy link

HitkoDev commented May 4, 2023

For anyone else looking for a solution to this, see https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v42.0.0

legobeat added a commit to legobeat/eslint-config that referenced this issue May 15, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to legobeat/eslint-config that referenced this issue May 15, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
@danvk
Copy link

danvk commented Jun 8, 2023

If it helps anyone else… I used to have {'jsdoc/newline-after-description': 'error'} in my .eslintrc. After upgrading I have:

{
  'jsdoc/tag-lines': [
    'error',
    'any',
    {
      startLines: 1,
    },
  ],
}

and I believe these are equivalent? The docs for the tag-lines rule are quite hard to follow since there are no tags to speak of in the context of newline-after-description.

update upon further reflection, I don't think these are equivalent. I rarely use tags. I mostly want to enforce that JSDoc comments have a one-line description on the first line, followed by a blank, then a longer description if necessary:

/**
 * one-line description goes here.
 *
 * longer description goes here.
 * probably spans many lines.
 * may or may not include any tags.
 */

In particular I want to disallow comments like this:

/**
 * just a long description across many lines
 * with no attempt made to write a one-line summary.
 */

This behavior was enforced with jsdoc/newline-after-description': 'error' but this last form is allowed with 'jsdoc/tag-lines': [ 2, 'any', { startLines: 1 } ]. Is it possible to keep the old behavior with the new rule for JSDoc comments that don't have tags?

legobeat added a commit to legobeat/eslint-config that referenced this issue Jun 14, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to legobeat/eslint-config that referenced this issue Jul 10, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to legobeat/eslint-config that referenced this issue Jul 12, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to legobeat/eslint-config that referenced this issue Jul 12, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to legobeat/eslint-config that referenced this issue Jul 12, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to legobeat/eslint-config that referenced this issue Jul 18, 2023
Will be causing error starting with eslint-plugin-jsdoc@43

gajus/eslint-plugin-jsdoc#1031
legobeat added a commit to MetaMask/eslint-config that referenced this issue Jul 18, 2023
Txabox added a commit to MailOnline/eslint-config-mailonline that referenced this issue Apr 25, 2024
…emoved

as seen here: gajus/eslint-plugin-jsdoc#1031

BREAKING CHANGE: remove "jsdoc/newline-after-description" rule

Issues: MOL-29362
carpasse pushed a commit to MailOnline/eslint-config-mailonline that referenced this issue May 2, 2024
…emoved

as seen here: gajus/eslint-plugin-jsdoc#1031

BREAKING CHANGE: remove "jsdoc/newline-after-description" rule

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

No branches or pull requests

4 participants