Currently, Babel is treating JSXIdentifier, JSXMemberExpression, and JSXEmptyExpression as expressions as well, which means Babel will for example incorrectly allow you to place these anywhere an expression is wanted.
Closes#6851.
* Add JSX Fragments to babel-types
* Support JSX fragments in the transform-react-jsx plugin
* Add tests JSX fragments
* Update helper-builder and transform plugin documentations for jsx fragment
* Add generator for jsx fragments
* Add test for jsx fragment generator
* Split jsx transform example into normal and fragment examples
* Remove unnecessary fields from ElementState in babel-helper-builder-react-jsx
* inline [skip ci]
* Added tests for ifThrowNamespace flag
* JSX transformator could work with XMLNamespaces (ifThrowNamespace flag)
* Use template literal instead
* Attempt to reword the message
* Added docs
* Reworded docs
* Reworded docs
* Fixed missing space in error message
* Initial version
* Replace .includes with .indexOf and better node set to visit
* Alphabetically sort es3 reserved words and make difference helper for readability
* Fix second Array.include error that was not polyfilled
* Move es3 keywords into separate babel-types helper and use in all es3 transforms
* Reference local plugin build directly for tests
* Try relative import for babel-types
* Update to scoped package name and beta 3
* Fix unscoped package import
* Replace local plugin reference with proper plugin name
* Changed updateExpression to report itself as violation instead of its argument
* Update getBindingIdentifiers to work with forXStatement and return proper node as violation
* Updated unaryExpression violation to be consistent with changes.
* babel-types: Add TypeScript definitions
* Add missing builders
* Allow arrow function to have "generator"
* Replace link to resolved issue with comment
* Re-add 'generator' to functionCommon
The elements of the `elements` array should be either `Identifier`, `Pattern` or `RestElement`, but the validator was requiring `Expression`. It happened to work for `Identifier` since an `Identifier` is an `Expression`, but not for the other possible pattern elements.
* Handle arrow function processing via shared API rather than default plugin.
* Fix a few small PR comments.
* Preserve existing spec arrow 'this' rewrites, and support spec in subclass constructors.