Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Rule idea: No useless JSDoc block tags #833

Open
xxluke opened this issue Mar 4, 2019 · 1 comment
Open

Rule idea: No useless JSDoc block tags #833

xxluke opened this issue Mar 4, 2019 · 1 comment

Comments

@xxluke
Copy link

xxluke commented Mar 4, 2019

I want to request a feature.

In TypeScript you can use JSDoc:

/**
 * Gets the weekday for a given date
 * @param date
 * @param {Language} language
 * @param format Possible formats are "long" and "short"
 * @returns {string}
 */
function getWeekday(date: Date, language: Language, format: Format): string {
    return '...';
}

In TypeScript the types are already declared in the method declaration, so @param and @request don't provide any additional information, when they don't have a description (like format in the example).

There should be either all or none @param tags, so in the example they should persist, but the @returns tag should be removed. Additionally, it is possible to remove {Language} which you can do to avoid having to change it twice when you refactor.

@vilchik-elena
Copy link
Contributor

Thanks for idea, we will consider it when doing next sprint

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants