mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
Merge pull request #1909 from storybooks/lint-fix
Run `eslint --fix` on master
This commit is contained in:
commit
3468f58be4
@ -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());
|
||||
|
6
app/react-native/src/server/addons.js
vendored
6
app/react-native/src/server/addons.js
vendored
@ -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/')();
|
||||
|
@ -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/')();
|
||||
|
@ -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(',');
|
||||
|
@ -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(',');
|
||||
|
@ -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 />);
|
||||
|
||||
|
@ -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 });
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user