-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Expected behavior
The plugin shouldn't show missing param and return types for a function in TypeScript.
Param and return types are usually inferred from the function itself when IntelliSense is
provided and I often read that it could cause issues if you redefine them again in the JSDoc.
Actual behavior
It shows that there are missing param and return types for a function
ESLint Config
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"prefer-const": "warn",
"no-empty-function": "warn",
"no-unused-vars": "off"
}
}ESLint sample
/**
* Returns true if the backend is successfully connected.
*
* @returns True if the backend is online
*/
function getIsOnline(): boolean {
return isOnline;
}Results in:
Missing JSDoc @returns type.
Environment
- Node version: v15.4.0
- ESLint version v7.16.0
eslint-plugin-jsdocversion: v30.7.9