Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
John Rodriguez authored and John Rodriguez committed May 18, 2017
1 parent 01f480a commit ad6fdf2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addons/storyshots/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const babel = require('babel-core');

function hasDependency(pkg, dependency) {
return (pkg.devDependencies && pkg.devDependencies[dependency]) ||
(pkg.dependencies && pkg.dependencies[dependency]) ||
(pkg.name === dependency);
(pkg.dependencies && pkg.dependencies[dependency]) ||
pkg.name === dependency;
}

const pkg = readPkgUp.sync().pkg;
Expand Down
7 changes: 5 additions & 2 deletions packages/storyshots/stories/__test__/storyshots.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import initStoryshots from '../../src';
import path from 'path';

function createNodeMock (element) {
function createNodeMock(element) {
if (element.type === 'input') {
return { scrollWidth: 123 };
}
return null;
}

initStoryshots({ rendererOptions: { createNodeMock }, configPath: path.resolve(__dirname, '../../.storybook') });
initStoryshots({
rendererOptions: { createNodeMock },
configPath: path.resolve(__dirname, '../../.storybook'),
});
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ComponentWithRef extends React.Component {
}

ComponentWithRef.propTypes = {
onLoad: PropTypes.func
onLoad: PropTypes.func,
};

export default ComponentWithRef;

0 comments on commit ad6fdf2

Please sign in to comment.