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

JSX Documentation #531

Merged
merged 11 commits into from
Jun 6, 2019
Merged

JSX Documentation #531

merged 11 commits into from
Jun 6, 2019

Conversation

jacksonrayhamilton
Copy link
Contributor

Since #523 won’t be merged, and as a follow-up to the changes you’ve made so far, I offer these additional documentation changes to compensate for the halfway-finished state of things.

js2-mode.el Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved

;; (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))

;; Support for JSX is available via the derived mode `js2-jsx-mode'. If you
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we really remove this part, keeping in mind that pre-Emacs 27 it is the way to go?

Thinking more about it, maybe that's also the section that the Emacs 27 JSX instructions should go to instead. The "install it as a minor mode" section above gets too bloated with that extra info. Here, though, you can enumerate the cases. Use Emacs 27? Minor mode is the way to go (a note about linting problems would also be more relevant here). Use Emacs 26 or earlier? Do the stuff below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. The organization and wording needed more massaging. I made this change.

js2-mode.el Show resolved Hide resolved
README.md Outdated

[rjsx-mode](https://github.com/felipeochoa/rjsx-mode/) is an
alternative option which comes with certain tradeoffs.
Until [#527](https://github.com/mooz/js2-mode/issues/527) is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really mind either way, but... should this go into the wiki instead?

This section is getting a bit long, and it's not like all of our users need to read all this.

Also: if #527 is resolved, we'll probably rewrite the whole recommendation, including the use of the minor mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less is more. I’ve removed my changes here.

NEWS.md Outdated Show resolved Hide resolved
@dgutov
Copy link
Collaborator

dgutov commented Jun 6, 2019

Terrific, thank you!

@dgutov dgutov merged commit 999c0e7 into mooz:master Jun 6, 2019
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

Successfully merging this pull request may close these issues.

2 participants