does not work for variation of function declaration styles. Eg JSX/React/class style functions
vladp opened this issue · comments
most of my functions are in form
function funcName (attr1, attr2)
{
return attr1;
}
or
var RClassNm = React.CreateClass({
getState: function ()
{
}
});
The js-doc module does not appear to work for any of them.
When I type M-x js-doc-insert-function-doc
I see comments appearing with a body of another function up in the file.
I use emacs 25.0.93.1 Fedora 23 Linux
And I have installed a number of Javascript related helpers that understand Syntax structure of javascript files very well
(setq flycheck-checkers '(javascript-eslint))
;; use eslint with web-mode for jsx files
(flycheck-add-mode 'javascript-eslint 'web-mode)
(flycheck-add-mode 'javascript-eslint 'js2-mode)
(flycheck-add-mode 'javascript-eslint 'js-mode)
;; disable json-jsonlist checking for json files
(setq-default flycheck-disabled-checkers
(append flycheck-disabled-checkers
'(json-jsonlist)))
)
I suspect the regex based methods within js-lint prevent it from working in the above scenarios.