Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work for variation of function declaration styles. Eg JSX/React/class style functions #12

Open
vladp opened this issue May 12, 2016 · 0 comments

Comments

@vladp
Copy link

vladp commented May 12, 2016

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.

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

No branches or pull requests

1 participant