Ben Alpert
11a693c310
Merge pull request #3549 from spicyj/trans-sync
...
Sync transforms from internal
2015-03-30 14:15:09 -07:00
Ben Alpert
800cd6c208
Merge pull request #3445 from mihaip/master
...
Use full chain of member expressions when generating display names.
2015-03-30 11:46:54 -07:00
Ben Alpert
15bb82a355
Sync transforms from internal
2015-03-30 11:43:26 -07:00
Jason Miller and Paul O’Shannessy
21f93caf99
Put comma after any non-comments, non-whitespace in JSXEspression
...
Fixes #1673
Closes #3129
2015-03-20 10:27:21 -07:00
Mihai Parparita
0eec4a74c1
Use full chain of member expressions when generating display names.
...
Assumed to be namespaced names (with the exception of "exports", which is
special-cased).
2015-03-19 16:46:55 -07:00
Paul O’Shannessy
01863ff3ec
[lint] fix errors from new test
2015-03-03 11:23:45 -08:00
Paul O’Shannessy
dbc7178e3b
Sync out another jsx transform test.
...
We added this test internally and it never got added here. We haven't broken it
with any transforms *yet* but it's still good to actually run all of our tests
here too.
2015-03-03 10:40:07 -08:00
Paul O’Shannessy
d449c2ad51
XJS -> JSX
...
Part 1: change all of our methods and AST node types.
Part 2: Rename files so there is no trace of XJS
2015-02-27 18:23:18 -08:00
Artem Nezvigin
fd1e31e958
Add support for jstransform es6-call-spread
2015-02-22 11:57:06 -08:00
Paul O’Shannessy
0273666485
Expose --target flag on jsx executable
...
Valid values are 'es3' and 'es5'.
es3: perform reserved words quoting, don't use defineProperty
es5: default, don't do the above, class methods non-enumerable
2015-02-20 13:37:42 -08:00
Paul O’Shannessy
8ee3e773ba
Merge pull request #3209 from chicoxyzzy/eslint-everywhere
...
lint from root
2015-02-19 20:59:44 -08:00
Paul O’Shannessy
3bd949bf1a
Fix long lines in vendor/fbtransform/visitors
...
I meant to do this with #3206 but forgot to add them.
2015-02-19 18:43:06 -08:00
chico
d38b7df015
lint vendor/*.js
2015-02-20 04:37:45 +03:00
Paul O’Shannessy
95cfd63b52
Merge pull request #3191 from zpao/jsxtransformer-use-shared-code
...
Use same pathways for browser transforms as we use in react-tools
2015-02-19 16:09:41 -08:00
Paul O’Shannessy
6ba67bca76
Lint vendor/fbtransform as well
2015-02-19 15:26:27 -08:00
Paul O’Shannessy
fd31c79206
Use same pathways for browser transforms as we use in react-tools
...
This makes sure we can use the same options everywhere, even from react-rails,
without having to specify each one separately in JSXTransformer as well.
2015-02-18 21:40:16 -08:00
Henry Zhu
d137fd9514
lint: remove spaces from object braces
2015-02-19 00:10:31 -05:00
Henry Zhu
c92112feb9
lint whitespace
...
- use spaces
- remove space before paren in function
- remove space before colon in object
2015-02-14 11:12:18 -05:00
Jim
25891bdee6
Expecting transform not to throw. Removed meaningless comment.
2015-02-02 12:19:47 -08:00
Rick Beerendonk
25bf96424f
Update copyright headers for 2015
2015-01-31 20:18:25 +01:00
Paul O’Shannessy
b290e3653e
Merge pull request #2765 from zpao/jsxtransformerlinenumber
...
Check for lineNumber support before using it
2015-01-22 12:58:51 -08:00
Jim
8b3debf1e8
Removed unknown tag warning/whitelist.
2015-01-09 11:46:47 -08:00
Paul O’Shannessy
8c02ec3922
Check for lineNumber support before using it
2014-12-22 13:43:59 -08:00
Paul O’Shannessy
db5135a114
Revert "Remove fbtransform/syntax.js"
2014-11-25 16:42:20 -08:00
Paul O’Shannessy
eb2455586a
Remove fbtransform/syntax.js
...
This was a file we probably never should have synced out in the first
place. We don't use it and it provides the same basic functionality that
bin/jsx provides.
2014-11-25 15:34:28 -08:00
Gabe Levi
deddc662bc
Update stripTypes transform to use fixed up jstransform transform
2014-11-14 18:25:11 -08:00
Paul O’Shannessy
878ebbd55b
Fixing some newline-preserving issues
...
Done internally as part of
https://github.com/facebook/jstransform/commit/f9836a39126675fd37b40a3598c539b50a1ec69b
2014-11-05 10:36:22 -08:00
Paul O’Shannessy
141807ef94
Merge pull request #2224 from zertosh/remove-esprima-fb-dep
...
Remove esprima-fb and use Syntax from jstransform
2014-11-04 14:38:09 -08:00
Andres Suarez
bf821afde0
Remove esprima-fb and use Syntax from jstransform
2014-11-04 17:10:12 -05:00
Cheng Lou
84a154045c
Use double quote for transformed displayName and data-*
...
JSX currently transforms everything to double quote except these two. This way, it's at least consistent and will satisfy half of the people who do put a strict quotation linting on their project.
Test: `jest`, check the double quoted transformed `data-bla="something"`.
2014-10-31 15:49:24 -04:00
Martin Jul
768d20667a
Added missing semicolons identified by using grunt jshint:project.
2014-10-23 09:54:13 +02:00
Sebastian Markbage
8210beeef4
Hide Object.assign polyfill behind a module
...
Because the JS community's polyfilling infrastructure sucks and we'll
have to fix it for them before we require this.
JSX spread uses React.__spread
(which might get special behavior for key/ref, not sure yet)
This never uses the native implementation and throws for prototype chains.
Once the native implementations are faster, we'll start using them.
2014-10-16 09:21:10 -07:00
Paul O’Shannessy
4dcc1161fa
Update @emails in react-displayName-test
2014-10-13 12:56:02 -07:00
Paul O’Shannessy
dcf415c2b9
BSD + PATENTS
2014-10-10 13:34:07 -07:00
Paul O’Shannessy
cf5fea4616
JSXTransformer: don't look for docblock
2014-10-10 11:45:52 -07:00
Sebastian Markbage and Paul O’Shannessy
c4658c1728
Update React JSX Transforms
...
* Extract JSXDOM into separate transform
* Rename lower case variables in JSX to upper case
* Drop React.DOM docblock, use string tags instead
2014-10-07 10:48:57 -07:00
Paul O’Shannessy
7339f8b7b8
Merge pull request #2149 from imcotton/jsx-reduce-warning
...
Reduce unnecessary warning while including JSX transformer in browser
2014-09-23 13:34:10 -07:00
Paul O’Shannessy
79ca0c7fd2
Merge pull request #1848 from fgnass/master
...
add picture element and related attributes
2014-09-08 16:23:39 -07:00
Paul O’Shannessy
ea76f9bf63
Merge pull request #2116 from spicyj/nl-jsx-spread
...
Add newline before JSX spread when appropriate
2014-09-05 14:34:54 -07:00
jeffmo
808730df59
Add support for a --strip-types flag to bin/jsx
2014-09-05 16:28:46 -04:00
Cotton Hou
6294d7aacc
Reduce unnecessary warning while including JSX transformer in browser
2014-09-05 07:15:39 +08:00
Paul O’Shannessy
59324ab6d5
Merge pull request #2117 from spicyj/jest-vendor
...
Include vendor/ when running jest tests
2014-08-30 12:55:20 -07:00
Ben Alpert
9f4ae415e2
Enable ES7 spread transform when using --harmony
...
Test Plan: `echo "var o = {...x};" | bin/jsx --harmony` outputs `var o = Object.assign({},x);`.
2014-08-30 01:10:21 -07:00
Ben Alpert
1ba022b1ea
Include vendor/ when running jest tests
...
Now the two transform tests get run alongside the React core tests.
Test Plan: jest
2014-08-30 01:08:57 -07:00
Ben Alpert
cc9735f889
Add newline before JSX spread when appropriate
...
Previously, we were losing the newline before a JSX spread attribute which would cause the lines to not match up; this fixes the problem.
2014-08-30 01:04:19 -07:00
Paul O’Shannessy
2058ad99be
Sync out latest JSX transforms
...
The biggest change: instead of calling functions directly, we now use
React.createElement to wrap.
The other big change: this removes the need for the @jsx pragma.
Instead we'll parse everything, assume React is in scope,
and only look for the actual XJS parts in the AST (as opposed to only
runing the transform when @jsx was specified in the docblock).
Note: this is actually a series of commits internally and should have
been syned out in pieces over the past several weeks.
2014-08-20 00:27:38 -07:00
Paul O’Shannessy
d9a053d287
Don't force sourcemaps on for JSXTransformer APIs
...
In case somebody doesn't want sourcemaps (eg, react-rails) or r.js
2014-08-15 17:51:41 -07:00
Paul O’Shannessy
d970dc45d9
Merge pull request #1826 from syranide/jsxasync
...
JSXTransformer respects async attribute
2014-08-14 15:13:04 -07:00
Paul O’Shannessy
d7f21d760b
Update recast to 0.6, update constants.js
...
I dropped the part of constants.js that we weren't using (namely the
part where we insert constants) but left it open to do that. It should
be trivial, we just aren't using it.
Fixes #1824
2014-08-14 11:14:20 -07:00
Andreas Svensson
079400c2a6
JSXTransformer respects async attribute
...
Conflicts:
vendor/browser-transforms.js
2014-08-14 10:00:27 +02:00