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 bd7b71f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions addons/storyshots/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ let configPath;
const babel = require('babel-core');

function hasDependency(pkg, dependency) {
return (pkg.devDependencies && pkg.devDependencies[dependency]) ||
(pkg.dependencies && pkg.dependencies[dependency]) ||
(pkg.name === dependency);
return (
(pkg.devDependencies && pkg.devDependencies[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 bd7b71f

Please sign in to comment.