js2-mode icon indicating copy to clipboard operation
js2-mode copied to clipboard

A bunch of fixes for `export` nodes

Open mishoo opened this issue 1 year ago • 2 comments

js2-visit-extern-binding will now walk the bindings in proper order (left-to-right) both for import and export parents. Previously, the walker would descend into the right node first for export, with the visible bug that js2-node-at-point would not find the foo name in this case:

export { |foo as bar };

Other small fixes:

  • do not extend the boundary of the foo name node in a case like this:

    export default foo     ;
    
  • include the semicolon when printing nodes like the above

  • fix a bunch of warnings related to length of docstrings; also type of a defcustom.

  • minor cleanups

mishoo avatar Sep 09 '24 20:09 mishoo

Hi! Thanks for this.

Could you add a few more tests? The js2-deftest-parse macro should at least help exercise the change in the printing behavior.

dgutov avatar Sep 10 '24 21:09 dgutov

Could you add a few more tests? The js2-deftest-parse macro should at least help exercise the change in the printing behavior.

Yep, that's why I marked it as draft, but I didn't get to it yet... hopefully this week.

mishoo avatar Sep 18 '24 06:09 mishoo