Skip to content

Commit 688490d

Browse files
jackjocrossgaearon
authored andcommitted
Add CircleCI support to 15-stable (#8778)
* devDependencies: add core-js and es6-symbol polyfill for tests * Update Flow and fix issues (#8006) * Add npm v4.0.0 support (#8082) * Add support for node v7 (#8135) * Upgrade ESLint and dependencies, fix new lint errors, switch Travis to Yarn (#8309) * Update ESLint to 3.10.2 Also pull in fbjs for extending properly, per @zpao. This also disables consistent-return, which has about 80 failing cases in React currently. If we'd like to turn this back on, we should do it separately and fix all the call sites properly (rather than just adding 'return undefined;' everywhere, which adds no value. Fixes to all existing lint errors plus an update for yarn.lock to follow. * Update yarn.lock after the eslint update. * Fix all new eslint failures Unfortunately I had to add three eslint-disable-next-line instances. All have explanations inline. * Switch Travis to use yarn instead of npm * Update all Jest packages to 17.x (#8327) * Update all Jest packages to 17.x, cache babel-jest transforms * Remove the caching Looking at the other builds it doesn't seem to actually be that necessary. The bottleneck is executors, not build time. * Remove unnecessary package, fix fiber test runner * Regenerate yarn lockfile * Update Flow to 0.37.0 (#8608) Nothing really changes. * Update to Jest 18 (#8621) * mockImpl -> mockImplementation D4329549 * Fixed linting errors * circle.yml and circleci scripts * Update Flow and fix issues (#8006) * Fixed flow errors * Updated shrinkwrap * Removed unnecessary change * Added jest --runInBand flag * Removed ReactDOMFiber changes
1 parent ef96e59 commit 688490d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+752
-1490
lines changed

.eslintrc.js

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,50 @@ const WARNING = 1;
33
const ERROR = 2;
44

55
module.exports = {
6-
parser: 'babel-eslint',
7-
8-
extends: './node_modules/fbjs-scripts/eslint/.eslintrc.js',
6+
extends: 'fbjs',
97

108
plugins: [
119
'react',
1210
'react-internal',
1311
],
1412

15-
ecmaFeatures: {
16-
modules: false
17-
},
18-
1913
// We're stricter than the default config, mostly. We'll override a few rules
2014
// and then enable some React specific ones.
2115
rules: {
2216
'accessor-pairs': OFF,
2317
'brace-style': [ERROR, '1tbs'],
2418
'comma-dangle': [ERROR, 'always-multiline'],
25-
'consistent-return': ERROR,
19+
'consistent-return': OFF,
2620
'dot-location': [ERROR, 'property'],
2721
'dot-notation': ERROR,
2822
'eol-last': ERROR,
2923
'eqeqeq': [ERROR, 'allow-null'],
3024
'indent': [ERROR, 2, {SwitchCase: 1}],
3125
'jsx-quotes': [ERROR, 'prefer-double'],
26+
'keyword-spacing': [ERROR, {after: true, before: true}],
3227
'no-bitwise': OFF,
3328
'no-inner-declarations': [ERROR, 'functions'],
3429
'no-multi-spaces': ERROR,
3530
'no-restricted-syntax': [ERROR, 'WithStatement'],
3631
'no-shadow': ERROR,
3732
'no-unused-expressions': ERROR,
3833
'no-unused-vars': [ERROR, {args: 'none'}],
39-
'quotes': [ERROR, 'single', 'avoid-escape'],
40-
'space-after-keywords': ERROR,
34+
'quotes': [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true }],
4135
'space-before-blocks': ERROR,
4236
'space-before-function-paren': [ERROR, {anonymous: 'never', named: 'never'}],
43-
'space-before-keywords': ERROR,
44-
'strict': [ERROR, 'global'],
4537

4638
// React & JSX
4739
// Our transforms set this automatically
48-
'react/display-name': OFF,
4940
'react/jsx-boolean-value': [ERROR, 'always'],
5041
'react/jsx-no-undef': ERROR,
5142
// We don't care to do this
5243
'react/jsx-sort-prop-types': OFF,
53-
'react/jsx-sort-props': OFF,
5444
'react/jsx-uses-react': ERROR,
55-
'react/jsx-uses-vars': ERROR,
56-
// It's easier to test some things this way
57-
'react/no-did-mount-set-state': OFF,
58-
'react/no-did-update-set-state': OFF,
59-
// We define multiple components in test files
60-
'react/no-multi-comp': OFF,
61-
'react/no-unknown-property': OFF,
45+
'react/no-is-mounted': OFF,
6246
// This isn't useful in our test code
63-
'react/prop-types': OFF,
6447
'react/react-in-jsx-scope': ERROR,
6548
'react/self-closing-comp': ERROR,
6649
// We don't care to do this
67-
'react/sort-comp': OFF,
6850
'react/wrap-multilines': [ERROR, {declaration: false, assignment: false}],
6951

7052
// CUSTOM RULES

.flowconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
<PROJECT_ROOT>/.*/__tests__/.*
88

99
# Ignore Docs
10+
<PROJECT_ROOT>/docs/.*
1011
<PROJECT_ROOT>/.*/docs/.*
1112

1213
[include]
1314

1415
[libs]
15-
./node_modules/fbjs/flow/lib
16+
./node_modules/fbjs/flow/lib/dev.js
1617
./flow
1718

1819
[options]
@@ -28,10 +29,11 @@ suppress_type=$FlowFixMe
2829
suppress_type=$FixMe
2930
suppress_type=$FlowExpectedError
3031

31-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-1]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)
32-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-1]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)?:? #[0-9]+
32+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)
33+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)?:? #[0-9]+
3334
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
3435
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
3536

3637
[version]
37-
^0.31.0
38+
^0.37.0
39+

circle.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
general:
3+
branches:
4+
ignore:
5+
- gh-pages
6+
7+
machine:
8+
timezone: America/Los_Angeles
9+
node:
10+
version: 6
11+
ruby:
12+
version: 2.2.3
13+
environment:
14+
TRAVIS_REPO_SLUG: facebook/react
15+
16+
dependencies:
17+
pre:
18+
# This is equivalent to $TRAVIS_COMMIT_RANGE
19+
# Need to figure out how to bail early if this is a "docs only" build
20+
- echo $CIRCLE_COMPARE_URL | cut -d/ -f7
21+
override:
22+
- bundle install --gemfile=docs/Gemfile --deployment --path=vendor/bundle --jobs=3 --retry=3
23+
- npm install
24+
- scripts/circleci/set_up_github_keys.sh
25+
post:
26+
# - npm ls --depth=0
27+
cache_directories:
28+
- docs/vendor/bundle
29+
- .grunt # Show size comparisons between builds
30+
- ~/react-gh-pages # docs checkout
31+
32+
test:
33+
override:
34+
- ./scripts/circleci/test_entry_point.sh:
35+
parallel: true
36+
37+
deployment:
38+
staging:
39+
branch: /.*/
40+
commands:
41+
- ./scripts/circleci/upload_build.sh
42+
- ./scripts/circleci/build_gh_pages.sh

grunt/tasks/jest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ function run(done, coverage) {
77
grunt.log.writeln('running jest');
88

99
var args = [
10-
path.join('node_modules', 'jest', 'bin', 'jest'),
10+
path.join('node_modules', 'jest-cli', 'bin', 'jest'),
11+
'--runInBand',
1112
];
1213
if (coverage) {
1314
args.push('--coverage');

0 commit comments

Comments
 (0)