Skip to content

Commit

Permalink
Revert doc changes and explain JSX options for all emacsen later
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonrayhamilton committed Jun 6, 2019
1 parent 8e2cdd4 commit bb73461
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions js2-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,23 @@

;; (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))

;; Alternatively, you can install it as a minor mode just for JavaScript linting
;; and/or to use packages that integrate with it. (Also, in Emacs 27, the new
;; JSX features added in that release are only accessible within this minor
;; mode. Linting of JSX code is also likely to fail.) To install it as a minor
;; mode:
;; Alternatively, to install it as a minor mode just for JavaScript linting,
;; you must add it to the appropriate major-mode hook. Normally this would be:

;; (add-hook 'js-mode-hook 'js2-minor-mode)

;; You may also want to hook it in for shell scripts running via node.js:

;; (add-to-list 'interpreter-mode-alist '("node" . js2-mode))

;; Use Emacs 27 and want to write JSX? Then use `js2-minor-mode' as described
;; above. Use Emacs 26 or earlier? Then use `js2-jsx-mode':

;; (add-to-list 'auto-mode-alist '("\\.jsx?\\'" . js2-jsx-mode))
;; (add-to-list 'interpreter-mode-alist '("node" . js2-jsx-mode))

;; Note that linting of JSX code may fail in both modes.

;; To customize how it works:
;; M-x customize-group RET js2-mode RET

Expand Down

0 comments on commit bb73461

Please sign in to comment.