Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run eslint --fix on master #1909

Merged
merged 2 commits into from
Sep 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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