Home

Awesome

About Build Status GNU ELPA MELPA

Improved JavaScript editing mode for GNU Emacs (description here).

For some of the latest changes, see latest user-visible changes.

Installation

The stable versions are hosted at GNU ELPA (<kbd>M-x list-packages</kbd>).

You can also install the latest development version from MELPA.

Requirements

Emacs 24.1+ and cl-lib (either built-in or installed from GNU ELPA).

React and JSX

The currently recommended solution is to install Emacs 27 (you can build from source or e.g. install a snapshot from a PPA) and use js-mode as the major mode. To make use of the JS2 AST and the packages that integrate with it, we recommend js2-minor-mode. See the corresponding instructions in the Commentary.

js-mode in Emacs 27 includes full support for syntax highlighting and indenting of JSX syntax.

rjsx-mode is an alternative option which comes with certain tradeoffs.

Bugs

Please report other problems at http://github.com/mooz/js2-mode/issues.

Contributing

js2-mode is subject to the same copyright assignment policy as Emacs itself, org-mode, CEDET and other packages in GNU ELPA.

Any legally significant contributions can only be accepted after the author has completed their paperwork. Please ask for the request form, and we'll send it to you.

See Also

Some third-party modes that use the generated syntax tree: