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

Too easy to confuse jsx-mode with a mode for Facebook's JSX #13

Open
winny- opened this issue Aug 11, 2015 · 8 comments
Open

Too easy to confuse jsx-mode with a mode for Facebook's JSX #13

winny- opened this issue Aug 11, 2015 · 8 comments

Comments

@winny-
Copy link

winny- commented Aug 11, 2015

Installed from MELPA, assumed it was for the JSX that extends javascript to support XML literals. Maybe add something to the README and MELPA description that reads like "For JSX, the type-checked Javascipt language"? See also: #10.

@transtone
Copy link

Use emacs's own js-jsx-mode for React's jsx file.

@0x1eef
Copy link

0x1eef commented Dec 11, 2015

for anyone else looking to highlight JSX in context of React I used webmode and this piece of e-lisp to configure it for JSX:

(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
(defadvice web-mode-highlight-part (around tweak-jsx activate)
  (if (equal web-mode-content-type "jsx")
      (let ((web-mode-enable-part-face nil))
        ad-do-it)
    ad-do-it))

@winny-
Copy link
Author

winny- commented Dec 11, 2015

My suggestion is simple: change the MELPA and README.md descriptions to describe what "major mode for JSX" means.

Does it mean JSX the type-checked Javascript language?

Does it mean JSX the extended syntax used by React.js?

Does it mean JSX the "erlang application for consuming, producing and manipulating json"?

Is it something to do with JSX Audio?

Is it something to do with jsx (Java Serialization to XML)?

...

@ibrahima
Copy link

I agree. It seems like this was here before React, but I think most people looking for JSX will be looking for React's JSX, so it would behoove the project owners to at least clarify somewhere that this is not related to React.

@cameron
Copy link

cameron commented Feb 23, 2016

+1 for clarifying language

@e18r
Copy link

e18r commented Apr 13, 2016

@jazzonmymind, thank you so much for your piece of code. However, it only seems to work for .jsx files. Is there any way to make it work for .js files? Changing .jsx$ for .js$ doesn't work. Thanks.

@Wilfred
Copy link

Wilfred commented Nov 13, 2016

Note that there's now a proper major mode for JSX files available on MELPA: https://github.com/felipeochoa/rjsx-mode

abicky added a commit to abicky/melpa that referenced this issue Nov 16, 2019
jsx-mode.el had been created for JSX, an AltJS provided by DeNA,
before JSX, an XML-like syntax extension, provided by Facebook
was released, and I added its recipe by
melpa#1013.
However many people misunderstand that jsx-mode.el is for the XML-like
syntax.
cf. jsx/jsx-mode.el#13

In addition, the AltJS seems to be no longer maintained,
so I think it is better to delete its recipe to avoid misunderstanding.
@abicky
Copy link
Member

abicky commented Nov 16, 2019

I'm sorry for the confusion.

I've changed the title of README by #16.
In addition, I think of deleting its recipe from MELPA (melpa/melpa#6547).

riscy pushed a commit to melpa/melpa that referenced this issue Nov 23, 2019
jsx-mode.el had been created for JSX, an AltJS provided by DeNA,
before JSX, an XML-like syntax extension, provided by Facebook
was released, and I added its recipe by
#1013.
However many people misunderstand that jsx-mode.el is for the XML-like
syntax.
cf. jsx/jsx-mode.el#13

In addition, the AltJS seems to be no longer maintained,
so I think it is better to delete its recipe to avoid misunderstanding.
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

No branches or pull requests

8 participants