-
-
Notifications
You must be signed in to change notification settings - Fork 74
New: Implements JSX syntax (fixes #18) #28
Conversation
|
LGTM |
| "jsx/namespaced-attribute-and-value-inserted", // https://github.com/Microsoft/TypeScript/issues/7411 | ||
| "jsx/namespaced-name-and-attribute", // https://github.com/Microsoft/TypeScript/issues/7411 | ||
| "jsx/test-content", // https://github.com/Microsoft/TypeScript/issues/7471 | ||
| "jsx/multiple-blank-spaces" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not had chance to report this one yet (jsx/multiple-blank-spaces), but might be another bug with some internal TypeScript utilities. The body of the AST is correct, but we cannot currently populate tokens array properly because of the issue.
|
This looks really good. The only thing I think is missing is that it appears the parser will always parse JSX syntax. We may want to ensure that |
|
Sorry if I am missing something obvious, but wouldn't the changes I made in You can try creating and running an If Again, if I am missing something else, please let me know and I will fix it! |
|
All that ends up doing is changing the filename passed at https://github.com/eslint/typescript-eslint-parser/pull/28/files#diff-09461573a85e2d94f056dd6814769042R117 I'm not sure changing that filename is the same as enabling/disabling JSX support. Are you? |
|
As well using it to determine that filename, we are using
...so that is both aspects covered, right? |
|
Oh, oops! Sorry, my Lyme brain must be getting to me. This looks good! |
New: Implements JSX syntax (fixes #18)
|
I just pushed a new version with this fix. |
@nzakas would be great to get your feedback on this!
Note: I added
lodash.unescapeas a dependency to ensure that HTML entities in JSX tags are decoded appropriately. Now that lodash is entirely modular, I felt that it was more prudent to include a micro-dependency than reinvent the wheel.