on 09-18-2017 11:50 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.