Opened 6 years ago
Last modified 4 years ago
#51990 new defect (bug)
Codemirror does not support JSX by default as mentioned
| Reported by: | webbdeveloper | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | External Libraries | Version: | 5.5.3 |
| Severity: | major | Keywords: | needs-patch reporter-feedback |
| Cc: | Focuses: |
Description (last modified by )
Hi,
I found an issue with the core code.
It is mentioned on this link that the CodeMirror lib will support JSX by default in the editor.
https://make.wordpress.org/core/2017/10/22/code-editing-improvements-in-wordpress-4-9
But when I use JSX mode, I do see an invalid System error in the editor.
Please see this image:
{
indentUnit: 2,
tabSize: 2,
mode: 'jsx'
}
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @webbdeveloper! Welcome to Trac!
I've been trying to reproduce the issue you're describing, but haven't been able to so far.
Can you clarify what you mean by "when I use JSX mode?" Does this mean you are creating your own code editor instance? It looks like there are no warnings thrown when editing a JSX file in the plugin or theme editors, and linting is not enabled.
Core provides csshint, jshint, and htmlhint support. Is it possible jshint is being enabled?