gajus / eslint-plugin-jsdoc

JSDoc specific linting rules for ESLint.
Other
1.09k stars 157 forks source link

Blank line between JSDoc and function means JSDoc @params not checked #1133

Closed yphoenix closed 1 year ago

yphoenix commented 1 year ago

Expected behavior

/**
 * @param {string} arg42
 */

function foo(arg99)
{
}

  NN:1   error  Missing JSDoc @param "arg99" declaration          jsdoc/require-param
  NN:1   error  Expected @param names to be "arg99". Got "arg42"  jsdoc/check-param-names
  NN:14  error  'arg99' is defined but never used                 no-unused-vars

Actual behavior

  44:14  error  'arg99' is defined but never used  no-unused-vars

If I remove the blank line between the end of the JSDoc and the function everything works as expected.

Environment

brettz9 commented 1 year ago

You can increase settings' maxLines:

{
  settings: {
    jsdoc: {
      maxLines: 100
    }
  }
}

Closing as that should resolve but feel free to comment further as necessary.