Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit a9056d5

Browse files
committed
use flow + eslint in travis
1 parent aabb9df commit a9056d5

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"setTimeout": false,
4343
"window": false,
4444
"XMLHttpRequest": false,
45+
"performance": false,
4546
},
4647

4748
"rules": {

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
sudo: false
22
install:
33
- npm install
4+
- npm install -g flow-bin
45
language: node_js
56
node_js:
67
- "iojs"
78
script:
9+
- npm run lint
10+
- flow check
811
- npm test

agent/Agent.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ class Agent extends EventEmitter {
234234
if (!component) {
235235
return null;
236236
}
237-
var data = this.elementData.get(id);
238237
var renderer = this.renderers.get(id);
239238
if (this.reactInternals[renderer].getNativeFromReactElement) {
240239
// $FlowFixMe I literally just checked this

agent/dehydrate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function dehydrate(data: Object, cleaned: Array<Array<string>>, path?: Array<str
6262
}
6363
if (Array.isArray(data)) {
6464
// $FlowFixMe path is not undefined.
65-
return data.map((item, i) => sanitize(item, cleaned, path.concat([i]), level + 1));
65+
return data.map((item, i) => dehydrate(item, cleaned, path.concat([i]), level + 1));
6666
}
6767
// TODO when this is in the iframe window, we can just use Object
6868
if (data.constructor && typeof data.constructor === 'function' && data.constructor.name !== 'Object') {

agent/flow.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*
9+
* @flow
10+
*/
11+
'use strict';
112

2-
declare var performance: {
13+
declare var performance: { // eslint-disable-line no-unused-vars
314
now: () => number,
415
};
516

backend/integration/is-travis.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*
9+
*/
10+
'use strict';
111

212
window.IS_TRAVIS = true;
313

0 commit comments

Comments
 (0)