Skip to content

tag-lines should support startLines for tags groups #1102

@mvorisek

Description

@mvorisek
class FormService {
    /**
     * Validate a field using defined validation rules.
     *
     * @param   {$}             $form
     * @param   {string}        fieldName
     *
     * @returns {false}
     */
    validateField($form, fieldName) {
        return false
    }
}

Motivation

Our projects are mostly based on PHP where our coding style is to separate same phpdoc tags with a new line, ie. 1 empty line between params and return phpdoc.

To be consistent, we want the same style for JS too.

Current behavior

It seems startLines cannot be defined for specific tags.

Desired behavior

I would expect config like, ie. startLines in tags -> returns, to be possible:

'jsdoc/tag-lines': ['error', 'never', {
    startLines: 1,
    tags: {
        returns: { startLines: 1 },
    },
}],

and keep the empty line between @param and @returns in the code example above.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions