gajus / eslint-plugin-jsdoc

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

:bug: `require-hyphen-before-param-description` removes templates default types #1326

Closed scagood closed 1 week ago

scagood commented 1 week ago

Code sample -- Before '--fix'

/**
 * @template [O=unknown]
 * @param {string} name The name of the thing.
 */
function test(name) {}

Expected behavior -- After '--fix'

/**
 * @template [O=unknown]
 * @param {string} name - The name of the thing.
 */
function test(name) {}

Actual behavior -- After '--fix'

/**
 * @template O
 * @param {string} name - The name of the thing.
 */
function test(name) {}

ESLint Config

import jsdoc from 'eslint-plugin-jsdoc';

export default [
  {
    plugins: { jsdoc },
    rules: {
      'jsdoc/require-hyphen-before-param-description': 'error',
    }
  }
];

Reproduction

To reproduce, click 'Apply Fix' on the src/example.js file.

https://eslint-online-playground.netlify.app/#eNqtUT1PwzAQ/SsnL4GqSRCIpRUSA3sXJIa6Q+pcErfJ2dgOFEX57/gjVGJhYrHu7j3fu3c3MWtEiZdq0D0WJ8s2rFytOMEKnh36YuUQ9runkc6kPumQEF2ZaoDJOiOpnYGqAeG1wxSoBpyPXeexIvBLTs1IwklF4NC6N+k6NbrdTaDfwjRz4vTvqlf+bgZ1PKFwkfz3WGmm9fIhzcbWDG0vyRVCUSPbYohrkoNWxsHJ1kpAY9QAWaLluh9bSXlEsm0wh5fIrbGpxt7B3svDFB6ARLYbmJZW8zoBZuwxlFMGkEW4NPg+SoN596U7pPyIjfJZtJrXaIWROjjKNn4cY5TJlnbeSHwOW+9HV+JcteHeiryVqMFZjR8vqJFqJCHRcnZV58sGQomzcB3r46XzD/jLd2I+3hUPxT1ni/bM5m8vKtSR

github-actions[bot] commented 1 week ago

:tada: This issue has been resolved in version 50.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: