-
- Notifications
You must be signed in to change notification settings - Fork 168
Closed
Labels
Description
- Title:
require-paramfixer inserts new tags inside preceding@exampleblocks - Expected behavior: Running
eslint --fixon a docblock with multiple@exampletags followed by@paramtags should insert any missing params alongside the existing@paramblock (i.e., after the examples). - Actual behavior: The fixer inserts the missing
@paramlines inside the first@examplefence, so every run adds another copy. The resulting docblock moves the@paramblock above the@examples and the examples keep accumulating duplicate@paramlines.
// eslint.config.mjs (minimal) import { jsdoc, getJsdocProcessorPlugin } from 'eslint-plugin-jsdoc'; import tsParser from 'typescript-eslint'; export default [ jsdoc({ config: 'flat/requirements-typescript-error' }), { files: ['**/*.ts'], languageOptions: { parser: tsParser.parser }, plugins: { examples: getJsdocProcessorPlugin({ parser: tsParser.parser }) }, processor: 'examples/examples', }, { files: ['**/*.md/*.ts'], languageOptions: { parser: tsParser.parser }, rules: { 'jsdoc/require-param': 'error' }, }, ];/** * @example * ```ts * app.use(checkResourceOwnership({ entryPoint: 'seller_product' })); * ``` * * @example * ```ts * app.use(checkResourceOwnership({ entryPoint: 'service_zone' })); * ``` * * @param options - configuration * @param options.entryPoint * @param options.filterField * @param options.paramIdField */ export const checkResourceOwnership = ({ entryPoint, filterField, paramIdField, resourceId = () => '' }) => {};Running eslint --fix repeatedly places the missing options.resourceId tag inside the example block each time.
- Node version: 24.6.0
- ESLint version: 9.34.0
eslint-plugin-jsdocversion: 59.0.1 (patched locally via portal resolution)