Merge pull request #1909 from storybooks/lint-fix

Run `eslint --fix` on master
This commit is contained in:
Filipp Riabchun 2017-09-29 02:26:17 +03:00 committed by GitHub
commit 3468f58be4
8 changed files with 23 additions and 33 deletions

View File

@ -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());

View File

@ -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/')();

View File

@ -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/')();

View File

@ -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(',');

View File

@ -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(',');

View File

@ -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 />);

View File

@ -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 });

View File

@ -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>
);
}