Skip to content

Commit

Permalink
Merge pull request #1909 from storybooks/lint-fix
Browse files Browse the repository at this point in the history
Run `eslint --fix` on master
  • Loading branch information
Hypnosphi authored Sep 28, 2017
2 parents 2f16928 + a9c143b commit 3468f58
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 33 deletions.
3 changes: 2 additions & 1 deletion addons/storyshots/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const pkg = readPkgUp.sync().pkg;

const hasDependency = name =>
(pkg.devDependencies && pkg.devDependencies[name]) ||
(pkg.dependencies && pkg.dependencies[name]) || fs.existsSync(path.join('node_modules', name, 'package.json'));
(pkg.dependencies && pkg.dependencies[name]) ||
fs.existsSync(path.join('node_modules', name, 'package.json'));

export default function testStorySnapshots(options = {}) {
addons.setChannel(createChannel());
Expand Down
6 changes: 2 additions & 4 deletions app/react-native/src/server/addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ import deprecate from 'util-deprecate';
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';

deprecate(
() => {},
'@storybook/react-native/addons is deprecated. See https://storybook.js.org/addons/using-addons/'
)();
deprecate(() => {},
'@storybook/react-native/addons is deprecated. See https://storybook.js.org/addons/using-addons/')();
6 changes: 2 additions & 4 deletions app/react/addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ import deprecate from 'util-deprecate';
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';

deprecate(
() => {},
'@storybook/react/addons is deprecated. See https://storybook.js.org/addons/using-addons/'
)();
deprecate(() => {},
'@storybook/react/addons is deprecated. See https://storybook.js.org/addons/using-addons/')();
6 changes: 2 additions & 4 deletions app/react/src/server/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import path from 'path';
import fs from 'fs';
import deprecate from 'util-deprecate';

const fallbackHeadUsage = deprecate(
() => {},
'Usage of head.html has been deprecated. Please rename head.html to preview-head.html'
);
const fallbackHeadUsage = deprecate(() => {},
'Usage of head.html has been deprecated. Please rename head.html to preview-head.html');

export function parseList(str) {
return str.split(',');
Expand Down
6 changes: 2 additions & 4 deletions app/vue/src/server/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import path from 'path';
import fs from 'fs';
import deprecate from 'util-deprecate';

const fallbackHeadUsage = deprecate(
() => {},
'Usage of head.html has been deprecated. Please rename head.html to preview-head.html'
);
const fallbackHeadUsage = deprecate(() => {},
'Usage of head.html has been deprecated. Please rename head.html to preview-head.html');

export function parseList(str) {
return str.split(',');
Expand Down
11 changes: 5 additions & 6 deletions examples/cra-kitchen-sink/src/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ storiesOf('AddonInfo.DocgenButton', module).addWithInfo('DocgenButton', 'Some De
<DocgenButton onClick={action('clicked')} label="Docgen Button" />
));

storiesOf(
'AddonInfo.FlowTypeButton',
module
).addWithInfo('FlowTypeButton', 'Some Description', () => (
<FlowTypeButton onClick={action('clicked')} label="Flow Typed Button" />
));
storiesOf('AddonInfo.FlowTypeButton', module).addWithInfo(
'FlowTypeButton',
'Some Description',
() => <FlowTypeButton onClick={action('clicked')} label="Flow Typed Button" />
);

storiesOf('App', module).add('full app', () => <App />);

Expand Down
8 changes: 3 additions & 5 deletions lib/ui/example/client/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ export default class ReactProvider extends Provider {
inp = i;
}}
value={
this.api.getQueryParam('text') === undefined ? (
'ONE'
) : (
this.api.getQueryParam('text')
)
this.api.getQueryParam('text') === undefined
? 'ONE'
: this.api.getQueryParam('text')
}
onChange={() => {
this.api.setQueryParams({ text: inp.value });
Expand Down
10 changes: 5 additions & 5 deletions lib/ui/src/modules/ui/components/left_panel/text_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ export default class TextFilter extends React.Component {
/>
</div>
{this.state.query &&
this.state.query.length && (
<button style={clearButtonStyle} onClick={this.fireOnClear} className="clear">
×
</button>
)}
this.state.query.length && (
<button style={clearButtonStyle} onClick={this.fireOnClear} className="clear">
×
</button>
)}
</div>
);
}
Expand Down

0 comments on commit 3468f58

Please sign in to comment.