lint whitespace , trailing comma

This commit is contained in:
Henry Zhu
2015-02-13 23:13:47 -05:00
parent 5126cee0f5
commit e2a57920da
12 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ describe('update', function() {
expect(update([1, 4, 3], {$splice: [[1, 1, 2]]})).toEqual([1, 2, 3]);
expect(update.bind(null, [], {$splice: 1})).toThrow(
'Invariant Violation: update(): expected spec of $splice to be an ' +
'array of arrays; got 1. Did you forget to wrap your parameters in an '+
'array of arrays; got 1. Did you forget to wrap your parameters in an ' +
'array?'
);
expect(update.bind(null, [], {$splice: [1]})).toThrow(
+1 -1
View File
@@ -41,7 +41,7 @@ describe('findDOMNode', function() {
});
it('findDOMNode should reject unmounted objects with render func', function() {
expect(function() {React.findDOMNode({render: function(){}});})
expect(function() {React.findDOMNode({render: function() {}});})
.toThrow('Invariant Violation: Component (with keys: render) ' +
'contains `render` method but is not mounted in the DOM'
);
@@ -213,7 +213,7 @@ describe('ReactDOMComponent', function() {
var genMarkup;
function quoteRegexp(str) {
return (str+'').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
return (str + '').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
}
beforeEach(function() {
@@ -266,7 +266,7 @@ describe('ReactDOMComponent', function() {
var genMarkup;
function quoteRegexp(str) {
return (str+'').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
return (str + '').replace(/([.?*+\^$\[\]\\(){}|-])/g, "\\$1");
}
beforeEach(function() {
@@ -491,7 +491,7 @@ describe('ReactDOMComponent', function() {
var ReactTestUtils = require('ReactTestUtils');
spyOn(console, 'warn');
ReactTestUtils.renderIntoDocument(<div onScroll={function(){}} />);
ReactTestUtils.renderIntoDocument(<div onScroll={function() {}} />);
expect(console.warn.calls.length).toBe(1);
expect(console.warn.mostRecentCall.args[0]).toBe(
'Warning: This browser doesn\'t support the `onScroll` event'
@@ -623,8 +623,8 @@ describe('ReactCompositeComponent', function() {
expect(console.warn.argsForCall.length).toBe(1);
expect(console.warn.argsForCall[0][0]).toBe(
'Warning: owner-based and parent-based contexts differ '+
'(values: `bar` vs `undefined`) for key (foo) '+
'Warning: owner-based and parent-based contexts differ ' +
'(values: `bar` vs `undefined`) for key (foo) ' +
'while mounting Component (see: http://fb.me/react-context-by-parent)'
);
@@ -109,7 +109,7 @@ describe('ReactCompositeComponentNestedState-state', function() {
[ 'setState-args', 'dark blue', 'green' ],
[ 'render', 'light green', 'green' ],
[ 'parent-after-setState', 'green' ],
[ 'after-setState', 'light green', 'green' ],
[ 'after-setState', 'light green', 'green' ]
]);
});
});
@@ -192,7 +192,7 @@ function verifyDomOrderingAccurate(parentInstance, statusDisplays) {
var statusDisplayNodes = containerNode.childNodes;
var i;
var orderedDomIds = [];
for (i=0; i < statusDisplayNodes.length; i++) {
for (i = 0; i < statusDisplayNodes.length; i++) {
orderedDomIds.push(ReactMount.getID(statusDisplayNodes[i]));
}
+1 -1
View File
@@ -13,7 +13,7 @@
var React = require('React');
var ReactTestUtils = require('ReactTestUtils');
var reactComponentExpect= require('reactComponentExpect');
var reactComponentExpect = require('reactComponentExpect');
var TestComponent = React.createClass({
render: function() {
+2 -2
View File
@@ -14,7 +14,7 @@
var React = require('React');
var ReactTestUtils = require('ReactTestUtils');
var reactComponentExpect= require('reactComponentExpect');
var reactComponentExpect = require('reactComponentExpect');
/**
@@ -34,7 +34,7 @@ var ClickCounter = React.createClass({
render: function() {
var children = [];
var i;
for (i=0; i < this.state.count; i++) {
for (i = 0; i < this.state.count; i++) {
children.push(
<div
className="clickLogDiv"
+1 -1
View File
@@ -170,7 +170,7 @@ var ReactTestUtils = {
var all =
ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className);
if (all.length !== 1) {
throw new Error('Did not find exactly one match '+
throw new Error('Did not find exactly one match ' +
'(found: ' + all.length + ') for class:' + className
);
}
+2 -2
View File
@@ -3,14 +3,14 @@
if (typeof console == 'undefined') {
this.console = {
error: function(e){
error: function(e) {
postMessage(JSON.stringify({
type: 'error',
message: e.message,
stack: e.stack
}));
},
log: function(message){
log: function(message) {
postMessage(JSON.stringify({
type: 'log',
message: message
+1 -1
View File
@@ -78,7 +78,7 @@ var hasUndefinedStringKey = [
var hasPositiveNumericKey = [
{uniqueID: 'notANumber', data: []},
{uniqueID: '5', data: []},
{uniqueID: 'notAnotherNumber',data: []}
{uniqueID: 'notAnotherNumber', data: []}
];
var hasZeroStringKey = [
@@ -351,7 +351,7 @@ describe('traverseAllChildren', function() {
return {
next: function() {
if (i++ < 3) {
return { value: <div key={'#'+i} />, done: false };
return { value: <div key={'#' + i} />, done: false };
} else {
return { value: undefined, done: true };
}
@@ -402,7 +402,7 @@ describe('traverseAllChildren', function() {
return {
next: function() {
if (i++ < 3) {
return { value: ['#'+i, <div />], done: false };
return { value: ['#' + i, <div />], done: false };
} else {
return { value: undefined, done: true };
}