Commit Graph

207 Commits

Author SHA1 Message Date
Paul O’Shannessy
ecb34de574 Upgrade ESLint, fix code 2015-08-10 17:04:29 -07:00
Paul O’Shannessy
3f6bca7b16 0.14.0-beta3 2015-08-03 14:24:24 -07:00
Paul O’Shannessy
681bbb629f 0.14.0-beta2 2015-07-30 21:29:09 -07:00
Paul O’Shannessy
e9c53364e5 Update fbjs dependency 2015-07-30 21:28:11 -07:00
Paul O’Shannessy
d982d5e153 Move react-tools from root.
ReactTools is deprecated, it doesn't belong at the root of the project. We'll remove it after 0.14 but for now this moves it so that it's contained and not intermixed with the rest of the project. The currect behavior of copying src/ into the package is maintained.
2015-07-30 10:15:36 -07:00
Jim
6296d1cad2 Removed npm run jest script. Users can use npm test instead. 2015-07-27 16:03:59 -07:00
Paul O’Shannessy
be5c09c24d Update fbjs dependency
- remove a file that got moved over there
- update for renamed babel transform
2015-07-27 13:37:48 -07:00
Paul O’Shannessy
83c88578e9 Replace grunt-jest with our own runner
This gives us more control
2015-07-23 17:52:58 -07:00
Paul O’Shannessy
1d0c1b1817 Use fbjs package from npm, gulp
This reworks a few things in building and distributing React. The biggest change is using fbjs to share dependencies with other libraries. We're also using Gulp for some build steps.
2015-07-23 15:48:02 -07:00
Paul O’Shannessy
458714ab2f Lock typescript dep at 1.4 2015-07-23 12:49:21 -07:00
Paul O’Shannessy
ecb4433cc9 Upgrade babel, babel-eslint; remove babel-core dep 2015-07-21 17:23:52 -07:00
Paul O’Shannessy
ce8a152c49 Lock babel @ 5.6.x.
5.7 and 5.8 are having big issues with linting
2015-07-21 12:20:39 -07:00
Ben Alpert
06304d59de Upgrade eslint
Fixes #4428.
2015-07-20 08:37:47 -07:00
Paul O’Shannessy
5da408297f Remove in-browser unit testing
Rely on jest for now until we get a better and less hacky solution to running tests in the browser, probably a totally different test suite with different behavior/goals.
2015-07-17 00:13:16 -07:00
Paul O’Shannessy
91a87174bc Use more specific ignore pattern for jest
TravisCI clones into /home/travis/build/facebook/react, which /build/ matches so we never ran any of our tests.
2015-07-14 18:28:30 -07:00
Benjamin Woodruff
fc0b42dc07 Run eslint tests with jest
Turns out eslint-tester works with jest (!)

We take advantage of this internally at FB, so we'll do it here too.

Fixes #4328
2015-07-09 15:59:59 -07:00
Ben Alpert
b4e74e38e4 Bump version to beta1 2015-07-03 10:46:35 +02:00
Ben Alpert
33d5201a94 Finish addons packaging
- Add missing object-assign dependency
- Add batchedUpdates to ReactDOMClient, rename the two addons to `unstable_`
- Delete react/addons/* (leaving react/addons with a slightly updated warning)
- Add README.md, LICENSE, PATENTS to each addons package
2015-07-02 23:33:16 +02:00
Baraa Hamodi
c1ec407bd9 More conservative dependency update. 2015-06-26 18:37:15 -07:00
Paul O’Shannessy
ddac9473ca npm script to run lint only on changed files 2015-06-16 11:24:02 -07:00
Paul O’Shannessy
b4b542303d Update jest to latest 2015-06-11 11:01:00 -07:00
Benjamin Woodruff
f27d130323 Merge pull request #4040 from PiPeep/eslint-updates
Update eslint-related dependencies
2015-06-08 13:00:13 -07:00
Benjamin Woodruff
52eca1eb69 Update eslint-related dependencies
- babel-eslint ^3.1.14 fixes babel/babel-eslint#120
- babel updated from ^5.3.3 to ^3.5.5, which changes stuff, I guess
- eslint updated from ^0.21.2 to ^0.22.1, which makes `no-shadow` also
  check class declarations
2015-06-08 08:41:13 -07:00
Benjamin Woodruff
30cce21ae6 Load custom eslint rules as plugin, w/o --rulesdir
This allows us to load the eslint rules without requiring command-line
arguments, which avoids breaking editors with eslint plugins.

https://github.com/eslint/eslint/issues/2180#issuecomment-87722150
2015-06-04 17:04:45 -07:00
Benjamin Woodruff
40eb94d13e Roll back to babel-eslint 3.1.9
spicyj noticed newer versions of babel-eslint seemed not to error on
no-unused-vars, and I was able to repro. It seems like something broke
between 3.1.9 and 3.1.10. (Smaller repro case and babel-eslint bug
report to come)

His commit failed on travis, but not on his local machine:
https://travis-ci.org/facebook/react/jobs/65468729
2015-06-04 15:43:41 -07:00
Ben Alpert
b1538e36e3 Fix npm run lint
Broke in #4021.
2015-06-04 13:20:42 -07:00
Benjamin Woodruff
c04a9e632c Enable react/wrap-multilines eslint rule
Multiline jsx literals in a return should be paren-wrapped.
2015-06-04 09:44:47 -07:00
Paul O’Shannessy
6b79977c31 Merge pull request #3416 from koba04/remove-jshint
Remove the codes relating to jshint
2015-06-03 19:45:51 -07:00
Toru Kobayashi
ce46068def Remove the codes relating to jshint 2015-06-04 09:32:37 +09:00
Benjamin Woodruff
17e7046754 Add custom eslint rule for warning and invariant
See #2869

Checks that the *second* argument of warning and invariant are a literal
string, or a concatination of literal strings, and that the number of
arguments is correct based on the number of %s substrings.

This commit also fixes a few places where the existing code had broken
error messages!

The rule itself is pretty straightforward, although adding the tests
ended up being a bit painful, as eslint-tester depends on mocha, and
therefore needs to be run in a separate grunt task.
2015-06-03 17:19:32 -07:00
Benjamin Woodruff
21ca3f732f Enable linting for __tests__
Closes #3971.

> After #3968, the next thing we should do is start linting our tests.
> Historically we've ignored them due to lack of parser compatibility.
> But that shouldn't be a problem anymore. We may want to integrate
> https://www.npmjs.com/package/eslint-plugin-react to more aggressively
> lint our JSX in tests.

I understand this diff touches a lot of stuff, so I tried to keep it to
a near-minimal set of changes to make eslint happy.
2015-06-01 16:01:03 -07:00
Benjamin Woodruff
58fb322e21 Use babel-eslint and update eslint
-   Removes esprima-fb dependency
-   Tightens up eslintrc with some minor rules we were pretty-much
    following anyways.
-   Adds pretty colors to the `grunt lint` output
-   Breaks block-scoped-var :(
2015-05-28 09:42:55 -07:00
Ben Alpert
8471cc5f47 0.14.0-alpha3 2015-05-27 16:47:35 -07:00
Paul O’Shannessy
02f1626725 Better invariant / warning replacement 2015-05-21 19:20:56 -07:00
Paul O’Shannessy
b687a22953 0.14.0-alpha2 2015-05-20 13:37:42 -07:00
Paul O’Shannessy
76d016c6f1 Use Babel to transform JS in docs, update other calls 2015-05-13 15:26:23 -07:00
Paul O’Shannessy
b258d34c73 Don't run non-existant fbtransform tests 2015-05-13 10:52:51 -07:00
Paul O’Shannessy
7839e07231 0.14.0-alpha1 2015-05-10 22:36:50 -07:00
Paul O’Shannessy
64014c4641 Fix esprima-fb dependency 2015-05-10 22:25:08 -07:00
Paul O’Shannessy
2b9a74c0e6 Merge pull request #3777 from zpao/deprecate-react-tools
Deprecate react-tools
2015-05-05 11:06:15 -07:00
Paul O’Shannessy
d2fe87892d Remove transforms from repo, react-tools
Time to just use jstransform.
2015-05-05 10:51:51 -07:00
Ben Alpert
ceb92cd78c Replace vendor/constants recast transform with babel
Built files look the same up to parenthesization and quoting. This only saves 1.5 seconds out of ~20 on a clean build but it's a little simpler.
2015-05-04 17:05:42 -07:00
Ben Alpert
8897b00989 Remove es3ify 2015-05-04 16:13:36 -07:00
Ben Alpert
93a782b40b Use Babel to build React
Size comparison:

```
   raw     gz Compared to master @ 6ed98ec0c8
     =      = build/JSXTransformer.js
-15736  -3247 build/react-with-addons.js
  +287     +7 build/react-with-addons.min.js
-14412  -2887 build/react.js
  +274    +15 build/react.min.js
```

Differences mostly look to be various bits of whitespace that Babel ends up removing during its transforms (https://gist.github.com/spicyj/21ef31f4d95fb7a58daf). In minified files, mostly additions of `"use strict";`.
2015-05-04 14:14:09 -07:00
Ben Alpert
e534e0730e Use local grunt executable on Travis
Builds have been flaky lately. Maybe this will help?
2015-04-28 14:45:55 -07:00
Reed Loden
3e8951e8c7 SSL/TLSize all the things! (convert http:// to https:// where appropriate)
Update links to use https:// where it is supported. There's probably a lot
more that could be fixed, but these are the core ones I found (especially
the download links in order to prevent MITM attacks). Note that there are
some fb.me links that will redirect to http:// even while accessed over
https://, but this seemed like the best way to fix those for now.

NOTE: Only non-third-party files were modified. There are references to
http:// URLs in vendored/third-party files, but seems appropriate to fix
upstream for those rather than editing the files.

Also, copy one image locally to the blog, as it was hotlinking to a site
that did not support https://.

Last, use youtube-nocookie.com instead of youtube.com for video embeds,
as the former doesn't try to set a cookie on load (privacy enhancement).
2015-04-18 16:49:32 -07:00
Paul O’Shannessy
d467b52758 Update uglify dependency
Apparently we needed to get to v2.4.17 to get the fix for #2247. We
shrinkwrapped on the same day but the timing didn't work out so we missed it.
2015-04-13 12:49:45 -07:00
Ben Alpert
0b6c7c29fe Keep docs/js/{react,JSXTransformer}.js in repo
This way we don't need to rebuild them each time for the website.
2015-03-28 14:56:54 -07:00
Ben Alpert
d12c968dec Only run src/ and vendor/fbtransform/ tests in jest
Test Plan: jest
2015-03-25 16:49:01 -07:00
Paul O’Shannessy
e313616be7 Bump version so we can get back to work 2015-03-10 15:06:35 -07:00