cancel
Showing results for 
Search instead for 
Did you mean: 

ESLint rule require-jsdoc isn't working properly in Multi-cloud WebIDE

UxKjaer
Product and Topic Expert
Product and Topic Expert

I've tried to use the eslint rule require-jsdoc in the multi-cloud WebIDE. However it doesn't seem to work properly. I think this is due to the way we write javascript in UI5. If i write a native javascript function, then the rule picks it up.

Below picture is my function in a SAPUI5 Controller JS file, which isn't picked up. The error you see below is for the myfunction in the test.js file, which is a native Javascript function.

Accepted Solutions (1)

Accepted Solutions (1)

Hi JaKob,

Actually it works as expected. Eslint "require-jsdoc" rule works on following options:

"require":{"FunctionDeclaration":true,"MethodDefinition":false,"ClassDeclaration":false,"ArrowFunctionExpression":false}

https://eslint.org/docs/rules/require-jsdoc

In your case the function is not from type of "FunctionDeclaration" but from type of "property".

You can easily check it with: https://eslint.org/parser/

Thanks,

Alex

UxKjaer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Alex,

Is there any way to. Change that behaviour for the rule. Please correct me if I am. Wrong, but as I see it right now it is pretty much unusable.

Answers (0)