Skip to content

Commit

Permalink
fix eslint/flow errors in src
Browse files Browse the repository at this point in the history
  • Loading branch information
sghall committed Mar 24, 2017
1 parent 485d78d commit 77079ec
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/TickGroup/TickGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const propTypes = {
/**
* The number of ticks to render (approximate)
*/
tickCount: PropTypes.number,
tickCount: PropTypes.number, // eslint-disable-line react/no-unused-prop-types
/**
* The component that will be used to render each tick.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/core/dataUpdate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('dataUpdate', () => {

before(() => {
state = { udids: {}, nodes: [] };
update = [1, 2, 3, 4, 5].map((d) => ({x: d, y: d }));
update = [1, 2, 3, 4, 5].map((d) => ({ x: d, y: d }));
removed = new Map();
});

Expand Down
3 changes: 2 additions & 1 deletion src/core/withTransitions/schedule.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// @flow weak
/* eslint no-use-before-define: "off" */
// Apapted from https://github.com/d3/d3-transition/blob/master/src/transition/schedule.js

import { timer, timeout } from 'd3-timer';
import { CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED } from './phases';

export default function(node, ref:string, id:number, timing, tweens, events = {}) {
export default function (node, ref:string, id:number, timing, tweens, events = {}) {
const schedules = node.TRANSITION_SCHEDULES;

if (!schedules) {
Expand Down
1 change: 1 addition & 0 deletions src/core/withTransitions/schedule.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint flowtype/require-valid-file-annotation: "off" */

import { assert } from 'chai';
import schedule from './schedule';
Expand Down
2 changes: 1 addition & 1 deletion src/core/withTransitions/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function transition(config) {
delete transitions.events;

// each event handler should be called only once
Object.keys(events).map((d) => {
Object.keys(events).forEach((d) => {
events[d] = once(events[d]);
});

Expand Down
2 changes: 1 addition & 1 deletion src/core/withTransitions/transition.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import React, { Component } from 'react';
import { assert } from 'chai';
import createMount from 'test/utils/createMount';
import transition from './transition';
import stop from './stop';
import createMount from 'test/utils/createMount';

const DURATION = 500;
const DELAY = 500;
Expand Down
2 changes: 1 addition & 1 deletion src/core/withTransitions/tween.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ export function getInterpolator(attr, value) {
return interpolateString;
}

export default function(name, value) {
export default function (name, value) {
return getTween.call(this, name, getInterpolator(name, value), value);
}
5 changes: 3 additions & 2 deletions src/core/withTransitions/withTransitions.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow weak
/* eslint-env mocha */
/* eslint-env mocha, class-methods-use-this: "off" */
/* eslint class-methods-use-this: "off" */

import React, { Component } from 'react';
import { assert } from 'chai';
Expand All @@ -11,7 +12,7 @@ import withTransitions from './withTransitions';
const props = {
type: APPEAR,
udid: 'unique_id',
node: {x: 10, y: 20 },
node: { x: 10, y: 20 },
removeUDID: () => {},
};

Expand Down

0 comments on commit 77079ec

Please sign in to comment.