mooz/js-doc

Function doc always inserted at beginning of file

Opened this issue · 2 comments

Running spacemacs & 25.2.2.

When I run the command js-doc-insert-function-doc or js-doc-insert-function-doc-snippet these snippets are always inserted at the beginning of the file.

The following code should reproduce this issue:

function myTestFunction(paramA, paramB)) {
}

const myTestFunctionTwo = (paramA, paramB) => {
}

When entering either function and running the above commands, the doc snippet will always be added at the top of the file.

This is likely a spacemacs issue, as it's fixed on their develop, but not working on the old master.

I am experiencing the same issue in vanilla emacs. Each of my files contains one exported class and no matter where I run the command to insert the doc comment, it is added to the beginning of the file.