From acc053d0f7994f0f73e1a4162b102914de0d9ab0 Mon Sep 17 00:00:00 2001
From: Norbert de Langen
Date: Fri, 14 Apr 2017 09:26:27 +0200
Subject: [PATCH] CHANGE listing so trailing commas are always present && FIX
linting
---
.eslintrc => .eslintrc.js | 19 ++++---
package.json | 8 +--
.../src/components/ActionLogger/index.js | 4 +-
.../src/components/ActionLogger/style.js | 16 +++---
.../src/containers/ActionLogger/index.js | 2 +-
packages/addon-actions/src/manager.js | 2 +-
packages/addon-actions/src/preview.js | 2 +-
packages/addon-comments/src/index.js | 4 +-
.../manager/components/CommentForm/index.js | 4 +-
.../manager/components/CommentForm/style.js | 10 ++--
.../manager/components/CommentItem/index.js | 2 +-
.../manager/components/CommentItem/style.js | 22 ++++----
.../manager/components/CommentList/index.js | 2 +-
.../manager/components/CommentList/style.js | 6 +--
.../manager/components/CommentsPanel/index.js | 2 +-
.../manager/components/CommentsPanel/style.js | 8 +--
.../containers/CommentsPanel/dataStore.js | 10 ++--
.../manager/containers/CommentsPanel/index.js | 8 +--
packages/addon-comments/src/manager/index.js | 2 +-
packages/addon-comments/src/stories/index.js | 18 +++----
.../addon-comments/src/tests/dataStore.js | 14 ++---
packages/addon-graphql/demo/index.js | 14 ++---
.../src/components/FullScreen/style.js | 4 +-
packages/addon-graphql/src/preview.js | 2 +-
packages/addon-info/example/Button.js | 4 +-
packages/addon-info/example/story.js | 22 ++++----
packages/addon-info/src/components/Node.js | 8 +--
.../addon-info/src/components/PropTable.js | 6 +--
packages/addon-info/src/components/PropVal.js | 18 +++----
packages/addon-info/src/components/Props.js | 6 +--
packages/addon-info/src/components/Story.js | 42 +++++++--------
.../src/components/markdown/code.js | 8 +--
.../src/components/markdown/htags.js | 12 ++---
.../src/components/markdown/text.js | 8 +--
packages/addon-info/src/components/theme.js | 2 +-
packages/addon-info/src/index.js | 10 ++--
packages/addon-knobs/example/stories/index.js | 4 +-
packages/addon-knobs/src/KnobManager.js | 4 +-
packages/addon-knobs/src/components/Panel.js | 14 ++---
.../addon-knobs/src/components/PropField.js | 12 ++---
.../addon-knobs/src/components/PropForm.js | 6 +--
.../addon-knobs/src/components/WrapStory.js | 2 +-
.../addon-knobs/src/components/tests/Array.js | 2 +-
.../addon-knobs/src/components/tests/Panel.js | 34 ++++++------
.../addon-knobs/src/components/types/Array.js | 4 +-
.../src/components/types/Boolean.js | 4 +-
.../addon-knobs/src/components/types/Color.js | 18 +++----
.../src/components/types/Date/index.js | 2 +-
.../src/components/types/Number.js | 4 +-
.../src/components/types/Object.js | 6 +--
.../src/components/types/Select.js | 6 +--
.../addon-knobs/src/components/types/Text.js | 4 +-
.../addon-knobs/src/components/types/index.js | 2 +-
packages/addon-knobs/src/index.js | 4 +-
packages/addon-knobs/src/register.js | 2 +-
packages/addon-knobs/src/tests/KnobManager.js | 18 +++----
packages/addon-knobs/src/tests/typescript.js | 2 +-
packages/channel/src/__tests__/index.js | 6 +--
packages/decorator-centered/src/index.js | 2 +-
packages/getstorybook/bin/generate.js | 6 +--
.../getstorybook/generators/METEOR/index.js | 2 +-
.../REACT/template/stories/Button.js | 4 +-
.../REACT/template/stories/Welcome.js | 10 ++--
.../template/storybook/index.android.js | 2 +-
.../template/storybook/index.ios.js | 2 +-
.../storybook/stories/CenterView/style.js | 4 +-
.../storybook/stories/Welcome/index.js | 8 +--
.../template/src/stories/Button.js | 4 +-
.../template/src/stories/Welcome.js | 12 ++---
.../WEBPACK_REACT/template/stories/Button.js | 4 +-
.../WEBPACK_REACT/template/stories/Welcome.js | 12 ++---
packages/getstorybook/lib/project_types.js | 2 +-
.../src/components/Docs/Container/index.js | 4 +-
.../src/components/Docs/Content/index.js | 4 +-
.../src/components/Docs/Nav/dropdown.js | 2 +-
.../src/components/Docs/Nav/index.js | 2 +-
.../src/components/Docs/Navigation/index.js | 4 +-
.../src/components/Docs/Navigation/styles.js | 14 ++---
.../src/components/Docs/index.js | 4 +-
.../src/components/Homepage/Featured/index.js | 2 +-
.../src/components/Homepage/Header/index.js | 4 +-
.../src/components/Homepage/index.js | 16 +++---
.../getstorybookio/src/containers/Docs.js | 4 +-
packages/getstorybookio/src/docs/index.js | 8 +--
.../react-storybook/addons/addon-gallery.js | 2 +-
.../src/docs/react-storybook/addons/api.js | 2 +-
.../react-storybook/addons/introduction.js | 4 +-
.../react-storybook/addons/using-addons.js | 4 +-
.../react-storybook/addons/writing-addons.js | 4 +-
.../basics/exporting-storybook.js | 2 +-
.../src/docs/react-storybook/basics/faq.js | 2 +-
.../react-storybook/basics/introduction.js | 4 +-
.../basics/quick-start-guide.js | 2 +-
.../basics/slow-start-guide.js | 4 +-
.../react-storybook/basics/writing-stories.js | 4 +-
.../configurations/add-custom-head-tags.js | 2 +-
.../configurations/cli-options.js | 2 +-
.../configurations/custom-babel-config.js | 2 +-
.../configurations/custom-webpack-config.js | 2 +-
.../configurations/default-config.js | 2 +-
.../configurations/env-vars.js | 2 +-
.../configurations/serving-static-files.js | 2 +-
.../src/docs/react-storybook/index.js | 18 +++----
.../testing/css-style-testing.js | 2 +-
.../testing/interaction-testing.js | 2 +-
.../react-storybook/testing/manual-testing.js | 2 +-
.../testing/react-ui-testing.js | 2 +-
.../testing/structural-testing.js | 2 +-
.../src/docs/storybook-hub/basics/comments.js | 2 +-
.../storybook-hub/basics/getting-started.js | 2 +-
.../basics/github-pr-integration.js | 2 +-
.../basics/private-or-public-apps.js | 2 +-
.../src/docs/storybook-hub/basics/security.js | 2 +-
.../src/docs/storybook-hub/index.js | 10 ++--
.../management-features/env-variables.js | 2 +-
.../private-npm-packages.js | 2 +-
.../management-features/sharing-storybooks.js | 2 +-
.../management-features/workspaces.js | 2 +-
packages/getstorybookio/src/index.js | 2 +-
packages/getstorybookio/src/lib/highlight.js | 2 +-
packages/getstorybookio/src/stories/data.js | 34 ++++++------
.../getstorybookio/src/stories/designs.js | 26 +++++-----
.../src/stories/implementations.js | 2 +-
.../getstorybookio/src/stories/with_design.js | 18 +++----
.../src/bin/storybook-start.js | 6 +--
.../src/preview/components/StoryView/style.js | 6 +--
.../src/preview/story_kind.js | 2 +-
.../src/preview/story_store.js | 4 +-
.../src/server/config.js | 4 +-
.../src/server/config/babel.js | 10 ++--
.../src/server/config/babel.prod.js | 10 ++--
.../server/config/defaults/webpack.config.js | 24 ++++-----
.../src/server/config/webpack.config.js | 14 ++---
.../src/server/config/webpack.config.prod.js | 22 ++++----
.../src/server/middleware.js | 6 +--
.../demo/src/stories/Button.js | 4 +-
.../demo/src/stories/Welcome.js | 12 ++---
.../react-storybook/scripts/mocha_runner.js | 2 +-
.../src/client/manager/preview.js | 4 +-
.../src/client/manager/provider.js | 2 +-
.../client/preview/__tests__/client_api.js | 32 ++++++------
.../src/client/preview/actions.js | 10 ++--
.../src/client/preview/client_api.js | 6 +--
.../src/client/preview/error_display.js | 8 +--
.../src/client/preview/reducer.js | 6 +--
.../src/client/preview/render.js | 6 +--
.../src/client/preview/story_store.js | 4 +-
.../src/server/__tests__/utils.js | 6 +--
.../src/server/babel_config.js | 2 +-
packages/react-storybook/src/server/build.js | 8 +--
packages/react-storybook/src/server/config.js | 8 +--
.../src/server/config/babel.js | 2 +-
.../src/server/config/babel.prod.js | 2 +-
.../server/config/defaults/webpack.config.js | 28 +++++-----
.../src/server/config/utils.js | 4 +-
.../src/server/config/webpack.config.js | 18 +++----
.../src/server/config/webpack.config.prod.js | 22 ++++----
.../react-storybook/src/server/iframe.html.js | 6 +--
.../react-storybook/src/server/index.html.js | 6 +--
packages/react-storybook/src/server/index.js | 12 ++---
.../react-storybook/src/server/middleware.js | 2 +-
.../react-storybook/src/server/track_usage.js | 6 +--
.../storybook-ui/example/client/preview.js | 6 +--
.../storybook-ui/example/client/provider.js | 22 ++++----
packages/storybook-ui/example/server.js | 2 +-
.../storybook-ui/example/webpack.config.js | 12 ++---
packages/storybook-ui/src/compose.js | 4 +-
packages/storybook-ui/src/context.js | 2 +-
packages/storybook-ui/src/index.js | 2 +-
packages/storybook-ui/src/libs/key_events.js | 2 +-
.../src/modules/api/actions/__tests__/api.js | 52 +++++++++----------
.../src/modules/api/actions/api.js | 12 ++---
.../src/modules/api/actions/index.js | 2 +-
.../modules/api/configs/__tests__/init_api.js | 36 ++++++-------
.../src/modules/api/configs/init_api.js | 2 +-
.../storybook-ui/src/modules/api/index.js | 6 +--
.../shortcuts/actions/__tests__/shortcuts.js | 8 +--
.../src/modules/shortcuts/actions/index.js | 2 +-
.../modules/shortcuts/actions/shortcuts.js | 10 ++--
.../src/modules/shortcuts/index.js | 6 +--
.../src/modules/ui/actions/__tests__/ui.js | 6 +--
.../src/modules/ui/actions/index.js | 2 +-
.../storybook-ui/src/modules/ui/actions/ui.js | 2 +-
.../components/down_panel/__tests__/index.js | 14 ++---
.../modules/ui/components/down_panel/index.js | 2 +-
.../modules/ui/components/down_panel/style.js | 14 ++---
.../ui/components/layout/__tests__/index.js | 8 +--
.../ui/components/layout/dimensions.js | 14 ++---
.../modules/ui/components/layout/hsplit.js | 4 +-
.../src/modules/ui/components/layout/index.js | 28 +++++-----
.../modules/ui/components/layout/vsplit.js | 4 +-
.../components/left_panel/__tests__/index.js | 6 +--
.../left_panel/__tests__/stories.js | 14 ++++-
.../ui/components/left_panel/header.js | 10 ++--
.../modules/ui/components/left_panel/index.js | 6 +--
.../ui/components/left_panel/stories.js | 12 ++---
.../ui/components/left_panel/text_filter.js | 12 ++---
.../src/modules/ui/components/search_box.js | 8 +--
.../modules/ui/components/shortcuts_help.js | 20 +++----
.../src/modules/ui/components/theme.js | 2 +-
.../ui/configs/__tests__/handle_keyevents.js | 24 ++++-----
.../ui/configs/__tests__/handle_routing.js | 24 ++++-----
.../ui/configs/__tests__/init_panels.js | 8 +--
.../src/modules/ui/configs/handle_routing.js | 12 ++---
.../ui/containers/__tests__/down_panel.js | 14 ++---
.../modules/ui/containers/__tests__/layout.js | 4 +-
.../ui/containers/__tests__/left_panel.js | 44 ++++++++--------
.../ui/containers/__tests__/shortcuts_help.js | 8 +--
.../src/modules/ui/containers/down_panel.js | 2 +-
.../src/modules/ui/containers/left_panel.js | 2 +-
.../src/modules/ui/containers/search_box.js | 2 +-
.../modules/ui/containers/shortcuts_help.js | 2 +-
packages/storybook-ui/src/modules/ui/index.js | 4 +-
.../src/modules/ui/libs/__tests__/filters.js | 6 +--
.../ui/libs/__tests__/gen_podda_loader.js | 10 ++--
packages/storyshots/src/index.js | 4 +-
.../storyshots/src/storybook-channel-mock.js | 2 +-
.../stories/directly_required/Button.js | 4 +-
.../stories/required_with_context/Button.js | 4 +-
.../stories/required_with_context/Welcome.js | 10 ++--
220 files changed, 866 insertions(+), 857 deletions(-)
rename .eslintrc => .eslintrc.js (54%)
diff --git a/.eslintrc b/.eslintrc.js
similarity index 54%
rename from .eslintrc
rename to .eslintrc.js
index a8be29392b99..857240134656 100644
--- a/.eslintrc
+++ b/.eslintrc.js
@@ -1,17 +1,17 @@
-{
+module.exports = {
"extends": [
- "./node_modules/eslint-config-airbnb-base/rules/es6.js"
+ "./node_modules/eslint-config-airbnb-base/rules/es6.js",
],
"plugins": [
- "prettier"
+ "prettier",
],
"parser": "babel-eslint",
"parserOptions": {
- "sourceType": "module"
+ "sourceType": "module",
},
"env": {
"es6": true,
- "node": true
+ "node": true,
},
"rules": {
"strict": 0,
@@ -19,11 +19,10 @@
"printWidth": 100,
"tabWidth": 2,
"bracketSpacing": true,
- # "trailingComma": "es5",
- "singleQuote": true
+ "trailingComma": "all",
+ "singleQuote": true,
}],
"quotes": ["warn", "single"],
- "arrow-parens": ["warn", "as-needed"]
- # "comma-dangle": ["warn", "always"]
- }
+ "arrow-parens": ["warn", "as-needed"],
+ },
}
diff --git a/package.json b/package.json
index 9e97e82e8ecb..c9cff6725965 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,13 @@
{
"name": "storybook",
"devDependencies": {
- "babel-eslint": "^7.2.1",
+ "babel-eslint": "^7.2.2",
"eslint": "^3.19.0",
- "eslint-config-airbnb-base": "^11.1.2",
+ "eslint-config-airbnb-base": "^11.1.3",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-prettier": "^2.0.1",
- "lerna": "2.0.0-rc.1",
- "prettier": "^0.22.0"
+ "lerna": "2.0.0-rc.2",
+ "prettier": "^1.1.0"
},
"scripts": {
"postinstall": "lerna bootstrap",
diff --git a/packages/addon-actions/src/components/ActionLogger/index.js b/packages/addon-actions/src/components/ActionLogger/index.js
index 4ecfd31ad1a5..18790dcafa2b 100644
--- a/packages/addon-actions/src/components/ActionLogger/index.js
+++ b/packages/addon-actions/src/components/ActionLogger/index.js
@@ -13,7 +13,7 @@ class ActionLogger extends Component {
() => {
latest.style.borderLeft = borderLeft;
},
- 300
+ 300,
);
}
}
@@ -53,7 +53,7 @@ class ActionLogger extends Component {
ActionLogger.propTypes = {
onClear: PropTypes.func,
- actions: PropTypes.array
+ actions: PropTypes.array,
};
export default ActionLogger;
diff --git a/packages/addon-actions/src/components/ActionLogger/style.js b/packages/addon-actions/src/components/ActionLogger/style.js
index d370a9b8c31f..d82497e1adad 100644
--- a/packages/addon-actions/src/components/ActionLogger/style.js
+++ b/packages/addon-actions/src/components/ActionLogger/style.js
@@ -2,14 +2,14 @@ export default {
wrapper: {
flex: 1,
display: 'flex',
- position: 'relative'
+ position: 'relative',
},
actions: {
flex: 1,
margin: 0,
padding: '8px 2px 20px 0',
overflowY: 'auto',
- color: '#666'
+ color: '#666',
},
action: {
display: 'flex',
@@ -17,21 +17,21 @@ export default {
borderLeft: '5px solid white',
borderBottom: '1px solid #fafafa',
transition: 'all 0.1s',
- alignItems: 'center'
+ alignItems: 'center',
},
countwrap: {
- paddingBottom: 2
+ paddingBottom: 2,
},
counter: {
margin: '0 5px 0 5px',
backgroundColor: '#777777',
color: '#ffffff',
padding: '1px 5px',
- borderRadius: '20px'
+ borderRadius: '20px',
},
inspector: {
flex: 1,
- padding: '0 0 0 5px'
+ padding: '0 0 0 5px',
},
button: {
position: 'absolute',
@@ -44,6 +44,6 @@ export default {
padding: '5px 10px',
borderRadius: '4px 0 0 0',
color: 'rgba(0, 0, 0, 0.5)',
- outline: 'none'
- }
+ outline: 'none',
+ },
};
diff --git a/packages/addon-actions/src/containers/ActionLogger/index.js b/packages/addon-actions/src/containers/ActionLogger/index.js
index 49c70ef1b1a2..a4668784b059 100644
--- a/packages/addon-actions/src/containers/ActionLogger/index.js
+++ b/packages/addon-actions/src/containers/ActionLogger/index.js
@@ -38,7 +38,7 @@ export default class ActionLogger extends React.Component {
render() {
const props = {
actions: this.state.actions,
- onClear: () => this.clearActions()
+ onClear: () => this.clearActions(),
};
return ;
}
diff --git a/packages/addon-actions/src/manager.js b/packages/addon-actions/src/manager.js
index 14c80cc4fff4..4728e7ac6d3d 100644
--- a/packages/addon-actions/src/manager.js
+++ b/packages/addon-actions/src/manager.js
@@ -8,7 +8,7 @@ export function register() {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Action Logger',
- render: () =>
+ render: () => ,
});
});
}
diff --git a/packages/addon-actions/src/preview.js b/packages/addon-actions/src/preview.js
index 963ab29d28b8..a2dfd1b31a0f 100644
--- a/packages/addon-actions/src/preview.js
+++ b/packages/addon-actions/src/preview.js
@@ -16,7 +16,7 @@ export function action(name) {
const randomId = Math.random().toString(16).slice(2);
channel.emit(EVENT_ID, {
id: randomId,
- data: { name, args }
+ data: { name, args },
});
};
diff --git a/packages/addon-comments/src/index.js b/packages/addon-comments/src/index.js
index 99555c12786d..4a7863a01254 100644
--- a/packages/addon-comments/src/index.js
+++ b/packages/addon-comments/src/index.js
@@ -7,7 +7,7 @@ const buttonStyles = {
backgroundColor: '#FFFFFF',
cursor: 'pointer',
fontSize: 15,
- padding: '3px 10px'
+ padding: '3px 10px',
};
const Button = ({ children, onClick, style = {} }) => (
@@ -19,7 +19,7 @@ const Button = ({ children, onClick, style = {} }) => (
Button.propTypes = {
children: PropTypes.string.isRequired,
onClick: PropTypes.func,
- style: PropTypes.object
+ style: PropTypes.object,
};
export default Button;
diff --git a/packages/addon-comments/src/manager/components/CommentForm/index.js b/packages/addon-comments/src/manager/components/CommentForm/index.js
index 9eda02fe05f6..c2259db8fdcb 100644
--- a/packages/addon-comments/src/manager/components/CommentForm/index.js
+++ b/packages/addon-comments/src/manager/components/CommentForm/index.js
@@ -17,7 +17,7 @@ marked.setOptions({
pedantic: false,
sanitize: true,
smartLists: true,
- smartypants: false
+ smartypants: false,
});
export default class CommentForm extends Component {
@@ -85,5 +85,5 @@ export default class CommentForm extends Component {
}
CommentForm.propTypes = {
- addComment: PropTypes.func
+ addComment: PropTypes.func,
};
diff --git a/packages/addon-comments/src/manager/components/CommentForm/style.js b/packages/addon-comments/src/manager/components/CommentForm/style.js
index 3efb44b649f6..99ec998e9ff4 100644
--- a/packages/addon-comments/src/manager/components/CommentForm/style.js
+++ b/packages/addon-comments/src/manager/components/CommentForm/style.js
@@ -7,19 +7,19 @@ const button = {
padding: '7px 15px',
fontSize: 12,
lineHeight: 1,
- color: 'rgba(0, 0, 0, 0.5)'
+ color: 'rgba(0, 0, 0, 0.5)',
};
export default {
wrapper: {
display: 'flex',
alignItems: 'center',
- borderTop: '1px solid rgb(234, 234, 234)'
+ borderTop: '1px solid rgb(234, 234, 234)',
},
submitButton: {
...button,
cursor: 'pointer',
- borderRadius: '0 0 4px 0'
+ borderRadius: '0 0 4px 0',
},
input: {
flex: 1,
@@ -34,6 +34,6 @@ export default {
lineHeight: 1.6,
color: 'rgba(0, 0, 0, 0.8)',
fontFamily: 'sans-serif',
- resize: 'none'
- }
+ resize: 'none',
+ },
};
diff --git a/packages/addon-comments/src/manager/components/CommentItem/index.js b/packages/addon-comments/src/manager/components/CommentItem/index.js
index 88cc0122b7f6..023c451eb9ea 100644
--- a/packages/addon-comments/src/manager/components/CommentItem/index.js
+++ b/packages/addon-comments/src/manager/components/CommentItem/index.js
@@ -74,5 +74,5 @@ export default class CommentItem extends Component {
CommentItem.propTypes = {
deleteComment: PropTypes.func,
comment: PropTypes.object,
- ownComment: PropTypes.bool
+ ownComment: PropTypes.bool,
};
diff --git a/packages/addon-comments/src/manager/components/CommentItem/style.js b/packages/addon-comments/src/manager/components/CommentItem/style.js
index fd3388d98e2f..b27c4942e3af 100644
--- a/packages/addon-comments/src/manager/components/CommentItem/style.js
+++ b/packages/addon-comments/src/manager/components/CommentItem/style.js
@@ -2,28 +2,28 @@ const commentItem = {
display: 'flex',
paddingBottom: '5px',
WebkitFontSmoothing: 'antialiased',
- transition: 'opacity 0.5s'
+ transition: 'opacity 0.5s',
};
export default {
commentItem: {
- ...commentItem
+ ...commentItem,
},
commentItemloading: {
...commentItem,
- opacity: 0.25
+ opacity: 0.25,
},
commentAside: {
- margin: '5px 10px 0 0'
+ margin: '5px 10px 0 0',
},
commentAvatar: {
width: 32,
height: 32,
- borderRadius: 5
+ borderRadius: 5,
},
commentContent: {
position: 'relative',
- flex: 1
+ flex: 1,
},
commentHead: {
//
@@ -33,19 +33,19 @@ export default {
fontSize: 13,
lineHeight: 1,
fontWeight: 'bold',
- marginRight: 5
+ marginRight: 5,
},
commentTime: {
fontFamily: 'sans-serif',
fontSize: 11,
lineHeight: 1,
- color: 'rgb(150, 150, 150)'
+ color: 'rgb(150, 150, 150)',
},
commentText: {
fontFamily: 'sans-serif',
fontSize: 13,
lineHeight: 1.7,
- maxWidth: 650
+ maxWidth: 650,
},
commentDelete: {
fontFamily: 'sans-serif',
@@ -53,6 +53,6 @@ export default {
top: 2,
right: 0,
fontSize: 11,
- color: 'rgb(200, 200, 200)'
- }
+ color: 'rgb(200, 200, 200)',
+ },
};
diff --git a/packages/addon-comments/src/manager/components/CommentList/index.js b/packages/addon-comments/src/manager/components/CommentList/index.js
index b122369052e4..790c659153a5 100644
--- a/packages/addon-comments/src/manager/components/CommentList/index.js
+++ b/packages/addon-comments/src/manager/components/CommentList/index.js
@@ -53,5 +53,5 @@ export default class CommentList extends Component {
CommentList.propTypes = {
comments: PropTypes.array,
user: PropTypes.object,
- deleteComment: PropTypes.func
+ deleteComment: PropTypes.func,
};
diff --git a/packages/addon-comments/src/manager/components/CommentList/style.js b/packages/addon-comments/src/manager/components/CommentList/style.js
index e502e4654f04..8b9aab9d0af1 100644
--- a/packages/addon-comments/src/manager/components/CommentList/style.js
+++ b/packages/addon-comments/src/manager/components/CommentList/style.js
@@ -2,11 +2,11 @@ export default {
wrapper: {
flex: 1,
overflow: 'auto',
- padding: '7px 15px'
+ padding: '7px 15px',
},
noComments: {
fontFamily: 'sans-serif',
fontSize: 13,
- padding: '10px 0'
- }
+ padding: '10px 0',
+ },
};
diff --git a/packages/addon-comments/src/manager/components/CommentsPanel/index.js b/packages/addon-comments/src/manager/components/CommentsPanel/index.js
index f5832a58838c..0c09975c852f 100644
--- a/packages/addon-comments/src/manager/components/CommentsPanel/index.js
+++ b/packages/addon-comments/src/manager/components/CommentsPanel/index.js
@@ -39,5 +39,5 @@ export default class CommentsPanel extends Component {
CommentsPanel.propTypes = {
loading: PropTypes.bool,
user: PropTypes.object,
- appNotAvailable: PropTypes.bool
+ appNotAvailable: PropTypes.bool,
};
diff --git a/packages/addon-comments/src/manager/components/CommentsPanel/style.js b/packages/addon-comments/src/manager/components/CommentsPanel/style.js
index 6f92dfce5ecf..00ca94c7ae17 100644
--- a/packages/addon-comments/src/manager/components/CommentsPanel/style.js
+++ b/packages/addon-comments/src/manager/components/CommentsPanel/style.js
@@ -3,7 +3,7 @@ export default {
flex: 1,
display: 'flex',
flexDirection: 'column',
- position: 'relative'
+ position: 'relative',
},
message: {
flex: 1,
@@ -15,7 +15,7 @@ export default {
fontSize: 11,
letterSpacing: 1,
textDecoration: 'none',
- textTransform: 'uppercase'
+ textTransform: 'uppercase',
},
button: {
textDecoration: 'none',
@@ -24,6 +24,6 @@ export default {
background: 'rgb(240, 240, 240)',
borderRadius: 5,
textTransform: 'none',
- fontSize: 12
- }
+ fontSize: 12,
+ },
};
diff --git a/packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.js b/packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.js
index 7c0523f2ef29..ce21a583dcf5 100644
--- a/packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.js
+++ b/packages/addon-comments/src/manager/containers/CommentsPanel/dataStore.js
@@ -19,7 +19,7 @@ export default class DataStore {
const key = this._getStoryKey(currentStory);
this.cache[key] = {
comments,
- addedAt: Date.now()
+ addedAt: Date.now(),
};
}
@@ -50,7 +50,7 @@ export default class DataStore {
() => {
this._loadUsers().then(() => this._loadComments());
},
- 1000 * 60 // Reload for every minute
+ 1000 * 60, // Reload for every minute
);
}
@@ -97,12 +97,12 @@ export default class DataStore {
this.users = users.reduce(
(newUsers, user) => {
const usersObj = {
- ...newUsers
+ ...newUsers,
};
usersObj[user.id] = user;
return usersObj;
},
- {}
+ {},
);
});
});
@@ -193,7 +193,7 @@ export default class DataStore {
const doc = {
...comment,
...this.currentStory,
- sbProtected: true
+ sbProtected: true,
};
return this.db.getCollection('comments').set(doc);
diff --git a/packages/addon-comments/src/manager/containers/CommentsPanel/index.js b/packages/addon-comments/src/manager/containers/CommentsPanel/index.js
index 703a68cd36db..dcb5ef8d23de 100644
--- a/packages/addon-comments/src/manager/containers/CommentsPanel/index.js
+++ b/packages/addon-comments/src/manager/containers/CommentsPanel/index.js
@@ -14,7 +14,7 @@ export default class Container extends Component {
user: null,
users: [],
comments: [],
- loading: true
+ loading: true,
};
}
@@ -86,7 +86,7 @@ export default class Container extends Component {
const comment = {
text,
time,
- userId: user.id
+ userId: user.id,
};
this.store.addComment(comment);
@@ -103,7 +103,7 @@ export default class Container extends Component {
loading: this.state.loading,
appNotAvailable: this.state.appNotAvailable,
deleteComment: commentId => this.deleteComment(commentId),
- addComment: text => this.addComment(text)
+ addComment: text => this.addComment(text),
};
return ;
@@ -111,5 +111,5 @@ export default class Container extends Component {
}
Container.propTypes = {
- api: PropTypes.object
+ api: PropTypes.object,
};
diff --git a/packages/addon-comments/src/manager/index.js b/packages/addon-comments/src/manager/index.js
index 207bfacdc63f..574d224494c0 100644
--- a/packages/addon-comments/src/manager/index.js
+++ b/packages/addon-comments/src/manager/index.js
@@ -10,7 +10,7 @@ export function init() {
// add 'Comments' panel
addons.addPanel(PANEL_ID, {
title: 'Comments',
- render: () =>
+ render: () => ,
});
});
}
diff --git a/packages/addon-comments/src/stories/index.js b/packages/addon-comments/src/stories/index.js
index 245ebe2741a2..98a7783dfe2c 100644
--- a/packages/addon-comments/src/stories/index.js
+++ b/packages/addon-comments/src/stories/index.js
@@ -7,7 +7,7 @@ import CommentsPanel from '../manager/components/CommentsPanel';
const userObj = {
avatar: 'http://www.gravatar.com/avatar/?d=identicon',
- name: 'User A'
+ name: 'User A',
};
const commentsList = [
@@ -15,29 +15,29 @@ const commentsList = [
loading: false,
user: {
avatar: 'http://www.gravatar.com/avatar/?d=identicon',
- name: 'User A'
+ name: 'User A',
},
time: 'Wed Oct 12 2016 13:36:59 GMT+0530 (IST)',
- text: 'Lorem ipsum dolor sit amet, Ut odio massa, rutrum et purus id.
'
+ text: 'Lorem ipsum dolor sit amet, Ut odio massa, rutrum et purus id.
',
},
{
loading: false,
user: {
avatar: 'http://www.gravatar.com/avatar/?d=identicon',
- name: 'User B'
+ name: 'User B',
},
time: 'Wed Oct 12 2016 13:38:46 GMT+0530 (IST)',
- text: 'Vivamus tortor nisi, efficitur in rutrum ac, tempor et mauris
. In et rutrum enim'
+ text: 'Vivamus tortor nisi, efficitur in rutrum ac, tempor et mauris
. In et rutrum enim',
},
{
loading: true,
user: {
avatar: 'http://www.gravatar.com/avatar/?d=identicon',
- name: 'User C'
+ name: 'User C',
},
time: 'Wed Oct 12 2016 13:38:55 GMT+0530 (IST)',
- text: 'sample comment 3'
- }
+ text: 'sample comment 3',
+ },
];
storiesOf('Button', module)
@@ -47,7 +47,7 @@ storiesOf('Button', module)
const style = {
fontSize: 20,
textTransform: 'uppercase',
- color: '#FF8833'
+ color: '#FF8833',
};
return ;
});
diff --git a/packages/addon-comments/src/tests/dataStore.js b/packages/addon-comments/src/tests/dataStore.js
index d2e9fce6fb44..110de0afed7d 100644
--- a/packages/addon-comments/src/tests/dataStore.js
+++ b/packages/addon-comments/src/tests/dataStore.js
@@ -17,14 +17,14 @@ const myDb = {
},
set() {
return new Promise(dbSetPromiseReturn);
- }
+ },
};
},
persister: {
_getAppInfo() {
return Promise.resolve(true);
- }
- }
+ },
+ },
};
addons.setDatabase(myDb);
@@ -38,14 +38,14 @@ describe('DataStore', () => {
expect(dbGetPromiseReturn.called).to.equal(false);
expect(theStore.currentStory).to.deep.equal({
sbKind: 'Components',
- sbStory: 'CommentList - No Comments'
+ sbStory: 'CommentList - No Comments',
});
});
it('set current user', () => {
theStore.setCurrentUser({
id: 'user-id',
- name: 'user-name'
+ name: 'user-name',
});
expect(theStore.user).to.deep.equal({ id: 'user-id', name: 'user-name' });
@@ -57,7 +57,7 @@ describe('DataStore', () => {
expect(dbGetPromiseReturn.called).to.equal(true);
expect(theStore.currentStory).to.deep.equal({
sbKind: 'Components',
- sbStory: 'CommentList - No Comments'
+ sbStory: 'CommentList - No Comments',
});
});
@@ -65,7 +65,7 @@ describe('DataStore', () => {
const comment = {
text: 'sample comment',
time: 1476435982029,
- userId: 'user-id'
+ userId: 'user-id',
};
theStore.addComment(comment);
diff --git a/packages/addon-graphql/demo/index.js b/packages/addon-graphql/demo/index.js
index b3852a0f68c7..debae1bb27e0 100644
--- a/packages/addon-graphql/demo/index.js
+++ b/packages/addon-graphql/demo/index.js
@@ -14,8 +14,8 @@ const userType = new graphql.GraphQLObjectType({
name: 'User',
fields: {
id: { type: graphql.GraphQLString },
- name: { type: graphql.GraphQLString }
- }
+ name: { type: graphql.GraphQLString },
+ },
});
// Define the schema with one top-level field, `user`, that
@@ -30,7 +30,7 @@ const schema = new graphql.GraphQLSchema({
type: userType,
// `args` describes the arguments that the `user` query accepts
args: {
- id: { type: graphql.GraphQLString }
+ id: { type: graphql.GraphQLString },
},
// The resolve function describes how to "resolve" or fulfill
// the incoming query.
@@ -38,10 +38,10 @@ const schema = new graphql.GraphQLSchema({
// to get the User from `data`
resolve(_, args) {
return data[args.id];
- }
- }
- }
- })
+ },
+ },
+ },
+ }),
});
express().use(cors()).use('/graphql', graphqlHTTP({ schema, pretty: true })).listen(3000);
diff --git a/packages/addon-graphql/src/components/FullScreen/style.js b/packages/addon-graphql/src/components/FullScreen/style.js
index 5001a7e1f9cc..9d36b5a767d9 100644
--- a/packages/addon-graphql/src/components/FullScreen/style.js
+++ b/packages/addon-graphql/src/components/FullScreen/style.js
@@ -4,6 +4,6 @@ export default {
top: 0,
right: 0,
bottom: 0,
- left: 0
- }
+ left: 0,
+ },
};
diff --git a/packages/addon-graphql/src/preview.js b/packages/addon-graphql/src/preview.js
index cda20a3ae1e0..54807c35c078 100644
--- a/packages/addon-graphql/src/preview.js
+++ b/packages/addon-graphql/src/preview.js
@@ -5,7 +5,7 @@ import 'graphiql/graphiql.css';
const FETCH_OPTIONS = {
method: 'post',
- headers: { 'Content-Type': 'application/json' }
+ headers: { 'Content-Type': 'application/json' },
};
function getDefautlFetcher(url) {
diff --git a/packages/addon-info/example/Button.js b/packages/addon-info/example/Button.js
index 1fd1c16b38ca..df7c34c01288 100644
--- a/packages/addon-info/example/Button.js
+++ b/packages/addon-info/example/Button.js
@@ -13,8 +13,8 @@ Object.assign(Button, {
label: PropTypes.string.isRequired,
style: PropTypes.object,
disabled: PropTypes.bool,
- onClick: PropTypes.func
- }
+ onClick: PropTypes.func,
+ },
});
export default Button;
diff --git a/packages/addon-info/example/story.js b/packages/addon-info/example/story.js
index 4021b96fdb7c..e24e26a5b0d8 100644
--- a/packages/addon-info/example/story.js
+++ b/packages/addon-info/example/story.js
@@ -16,7 +16,7 @@ storiesOf('Button').addWithInfo(
Click the "?" mark at top-right to view the info.
- )
+ ),
);
storiesOf('Button').addWithInfo(
@@ -25,7 +25,7 @@ storiesOf('Button').addWithInfo(
This is the basic usage with the button with providing a label to show the text.
`,
() =>
@@ -87,7 +87,7 @@ class ColorType extends React.Component {
ColorType.propTypes = {
knob: PropTypes.object,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
};
ColorType.serialize = function(value) {
diff --git a/packages/addon-knobs/src/components/types/Date/index.js b/packages/addon-knobs/src/components/types/Date/index.js
index 9e72accadfb4..e7ad0197c9e8 100644
--- a/packages/addon-knobs/src/components/types/Date/index.js
+++ b/packages/addon-knobs/src/components/types/Date/index.js
@@ -39,7 +39,7 @@ class DateType extends React.Component {
DateType.propTypes = {
knob: PropTypes.object,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
};
DateType.serialize = function(value) {
diff --git a/packages/addon-knobs/src/components/types/Number.js b/packages/addon-knobs/src/components/types/Number.js
index a59db85276bb..211d9403edbc 100644
--- a/packages/addon-knobs/src/components/types/Number.js
+++ b/packages/addon-knobs/src/components/types/Number.js
@@ -12,7 +12,7 @@ const styles = {
borderRadius: 2,
fontSize: 11,
padding: '5px',
- color: '#444'
+ color: '#444',
};
class NumberType extends React.Component {
@@ -64,7 +64,7 @@ class NumberType extends React.Component {
NumberType.propTypes = {
knob: PropTypes.object,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
};
NumberType.serialize = function(value) {
diff --git a/packages/addon-knobs/src/components/types/Object.js b/packages/addon-knobs/src/components/types/Object.js
index 30c5e36c382a..f08aab7aa0a6 100644
--- a/packages/addon-knobs/src/components/types/Object.js
+++ b/packages/addon-knobs/src/components/types/Object.js
@@ -14,7 +14,7 @@ const styles = {
fontSize: 11,
padding: '5px',
color: '#555',
- fontFamily: 'monospace'
+ fontFamily: 'monospace',
};
class ObjectType extends React.Component {
@@ -42,7 +42,7 @@ class ObjectType extends React.Component {
handleChange(e) {
const { onChange } = this.props;
const newState = {
- jsonString: e.target.value
+ jsonString: e.target.value,
};
try {
@@ -80,7 +80,7 @@ class ObjectType extends React.Component {
ObjectType.propTypes = {
knob: PropTypes.object,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
};
ObjectType.serialize = function(object) {
diff --git a/packages/addon-knobs/src/components/types/Select.js b/packages/addon-knobs/src/components/types/Select.js
index 65e9dc4a97aa..3198f9db9a10 100644
--- a/packages/addon-knobs/src/components/types/Select.js
+++ b/packages/addon-knobs/src/components/types/Select.js
@@ -12,14 +12,14 @@ const styles = {
borderRadius: 2,
fontSize: 11,
padding: '5px',
- color: '#555'
+ color: '#555',
};
class SelectType extends React.Component {
_makeOpt(key, val) {
const opts = {
key,
- value: key
+ value: key,
};
return
;
@@ -53,7 +53,7 @@ class SelectType extends React.Component {
SelectType.propTypes = {
knob: PropTypes.object,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
};
SelectType.serialize = function(value) {
diff --git a/packages/addon-knobs/src/components/types/Text.js b/packages/addon-knobs/src/components/types/Text.js
index f62b722f052b..f1ebb3fb6e5a 100644
--- a/packages/addon-knobs/src/components/types/Text.js
+++ b/packages/addon-knobs/src/components/types/Text.js
@@ -13,7 +13,7 @@ const styles = {
borderRadius: 2,
fontSize: 11,
padding: '5px',
- color: '#555'
+ color: '#555',
};
class TextType extends React.Component {
@@ -34,7 +34,7 @@ class TextType extends React.Component {
TextType.propTypes = {
knob: PropTypes.object,
- onChange: PropTypes.func
+ onChange: PropTypes.func,
};
TextType.serialize = function(value) {
diff --git a/packages/addon-knobs/src/components/types/index.js b/packages/addon-knobs/src/components/types/index.js
index c5f43454a4b4..a74e2459eaa6 100644
--- a/packages/addon-knobs/src/components/types/index.js
+++ b/packages/addon-knobs/src/components/types/index.js
@@ -15,5 +15,5 @@ export default {
object: ObjectType,
select: SelectType,
array: ArrayType,
- date: DateType
+ date: DateType,
};
diff --git a/packages/addon-knobs/src/index.js b/packages/addon-knobs/src/index.js
index 497a6dad48ae..3ee0100bdb25 100644
--- a/packages/addon-knobs/src/index.js
+++ b/packages/addon-knobs/src/index.js
@@ -20,7 +20,7 @@ export function number(name, value, options = {}) {
range: false,
min: 0,
max: 10,
- step: 1
+ step: 1,
};
const mergedOptions = { ...defaults, ...options };
@@ -28,7 +28,7 @@ export function number(name, value, options = {}) {
const finalOptions = {
...mergedOptions,
type: 'number',
- value
+ value,
};
return manager.knob(name, finalOptions);
diff --git a/packages/addon-knobs/src/register.js b/packages/addon-knobs/src/register.js
index e5debc682142..82a6ef9b2617 100644
--- a/packages/addon-knobs/src/register.js
+++ b/packages/addon-knobs/src/register.js
@@ -7,6 +7,6 @@ addons.register('kadirahq/storybook-addon-knobs', api => {
addons.addPanel('kadirahq/storybook-addon-knobs', {
title: 'Knobs',
- render: () =>
+ render: () =>
,
});
});
diff --git a/packages/addon-knobs/src/tests/KnobManager.js b/packages/addon-knobs/src/tests/KnobManager.js
index 2eed7384da9c..7e248d081284 100644
--- a/packages/addon-knobs/src/tests/KnobManager.js
+++ b/packages/addon-knobs/src/tests/KnobManager.js
@@ -16,15 +16,15 @@ describe('KnobManager', () => {
get: () => ({
defaultValue: 'default value',
value: 'current value',
- name: 'foo'
- })
+ name: 'foo',
+ }),
};
});
it('should return the existing knob value when defaults match', () => {
const defaultKnob = {
name: 'foo',
- value: 'default value'
+ value: 'default value',
};
const knob = testManager.knob('foo', defaultKnob);
expect(knob).to.equal('current value');
@@ -34,13 +34,13 @@ describe('KnobManager', () => {
it('should return the new default knob value when default has changed', () => {
const defaultKnob = {
name: 'foo',
- value: 'changed default value'
+ value: 'changed default value',
};
testManager.knob('foo', defaultKnob);
const newKnob = {
...defaultKnob,
- defaultValue: defaultKnob.value
+ defaultValue: defaultKnob.value,
};
expect(testManager.knobStore.set.calledWith('foo', newKnob)).to.equal(true);
@@ -53,7 +53,7 @@ describe('KnobManager', () => {
beforeEach(() => {
testManager.knobStore = {
set: sinon.spy(),
- get: sinon.stub()
+ get: sinon.stub(),
};
testManager.knobStore.get.onFirstCall().returns(undefined);
@@ -63,13 +63,13 @@ describe('KnobManager', () => {
it('should return the new default knob value when default has changed', () => {
const defaultKnob = {
name: 'foo',
- value: 'normal value'
+ value: 'normal value',
};
testManager.knob('foo', defaultKnob);
const newKnob = {
...defaultKnob,
- defaultValue: defaultKnob.value
+ defaultValue: defaultKnob.value,
};
expect(testManager.knobStore.set.calledWith('foo', newKnob)).to.equal(true);
@@ -85,7 +85,7 @@ describe('KnobManager', () => {
const testStory = () =>
Test Content
;
const testContext = {
kind: 'Foo',
- story: 'bar baz'
+ story: 'bar baz',
};
const wrappedStory = testManager.wrapStory(testChannel, testStory, testContext);
const wrapper = shallow(wrappedStory);
diff --git a/packages/addon-knobs/src/tests/typescript.js b/packages/addon-knobs/src/tests/typescript.js
index 4fbe9c79e58c..c8ebe6406be6 100644
--- a/packages/addon-knobs/src/tests/typescript.js
+++ b/packages/addon-knobs/src/tests/typescript.js
@@ -9,7 +9,7 @@ describe('TypeScript definitions', function() {
tt.compileDirectory(
`${__dirname}/../../example/typescript`,
fileName => fileName.match(/\.ts$/),
- () => done()
+ () => done(),
);
});
});
diff --git a/packages/channel/src/__tests__/index.js b/packages/channel/src/__tests__/index.js
index 20984256652e..245f429bbf96 100644
--- a/packages/channel/src/__tests__/index.js
+++ b/packages/channel/src/__tests__/index.js
@@ -76,7 +76,7 @@ describe('Channel', () => {
channel.on('type-2', 22);
const expected = {
'type-1': [11],
- 'type-2': [21, 22]
+ 'type-2': [21, 22],
};
expect(channel._listeners).to.deep.equal(expected);
});
@@ -115,7 +115,7 @@ describe('Channel', () => {
channel.prependListener('type-2', 22);
const expected = {
'type-1': [11],
- 'type-2': [22, 21]
+ 'type-2': [22, 21],
};
expect(channel._listeners).to.deep.equal(expected);
});
@@ -164,7 +164,7 @@ describe('Channel', () => {
channel.on('type-2', 22);
const expected = {
'type-1': [11],
- 'type-2': [21]
+ 'type-2': [21],
};
channel.removeListener('type-2', 22);
expect(channel._listeners).to.deep.equal(expected);
diff --git a/packages/decorator-centered/src/index.js b/packages/decorator-centered/src/index.js
index 125a18aa97bd..2761bdfa615a 100644
--- a/packages/decorator-centered/src/index.js
+++ b/packages/decorator-centered/src/index.js
@@ -8,7 +8,7 @@ const style = {
right: 0,
display: 'flex',
alignItems: 'center',
- justifyContent: 'center'
+ justifyContent: 'center',
};
export default function(storyFn) {
diff --git a/packages/getstorybook/bin/generate.js b/packages/getstorybook/bin/generate.js
index ad0615ab1615..8d4ee4f131b0 100755
--- a/packages/getstorybook/bin/generate.js
+++ b/packages/getstorybook/bin/generate.js
@@ -28,7 +28,7 @@ logger.log(chalk.inverse(`\n ${welcomeMessage} \n`));
const useYarn = Boolean(program.useNpm !== true) && hasYarn();
const npmOptions = {
- useYarn
+ useYarn,
};
const runStorybookCommand = useYarn ? 'yarn run storybook' : 'npm run storybook';
@@ -36,7 +36,7 @@ const runStorybookCommand = useYarn ? 'yarn run storybook' : 'npm run storybook'
// Update notify code.
updateNotifier({
pkg,
- updateCheckInterval: 1000 * 60 * 60 // every hour (we could increase this later on.)
+ updateCheckInterval: 1000 * 60 * 60, // every hour (we could increase this later on.)
}).notify();
let projectType;
@@ -44,7 +44,7 @@ let projectType;
let done = commandLog('Detecting project type');
try {
projectType = detect({
- force: program.force
+ force: program.force,
});
} catch (ex) {
done(ex.message);
diff --git a/packages/getstorybook/generators/METEOR/index.js b/packages/getstorybook/generators/METEOR/index.js
index 491dd20568d3..f6f9a54254f4 100644
--- a/packages/getstorybook/generators/METEOR/index.js
+++ b/packages/getstorybook/generators/METEOR/index.js
@@ -26,7 +26,7 @@ if (fs.existsSync('.babelrc')) {
} else {
babelrc = {
presets: ['es2015', 'es2016', 'react', 'stage-1'],
- plugins: ['babel-root-slash-import']
+ plugins: ['babel-root-slash-import'],
};
packageJson.devDependencies['babel-preset-es2015'] = '^6.9.0';
diff --git a/packages/getstorybook/generators/REACT/template/stories/Button.js b/packages/getstorybook/generators/REACT/template/stories/Button.js
index 2fccb36d61a6..97a2c9f0b552 100644
--- a/packages/getstorybook/generators/REACT/template/stories/Button.js
+++ b/packages/getstorybook/generators/REACT/template/stories/Button.js
@@ -8,7 +8,7 @@ const buttonStyles = {
cursor: 'pointer',
fontSize: 15,
padding: '3px 10px',
- margin: 10
+ margin: 10,
};
const Button = ({ children, onClick }) => (
@@ -19,7 +19,7 @@ const Button = ({ children, onClick }) => (
Button.propTypes = {
children: PropTypes.string.isRequired,
- onClick: PropTypes.func
+ onClick: PropTypes.func,
};
export default Button;
diff --git a/packages/getstorybook/generators/REACT/template/stories/Welcome.js b/packages/getstorybook/generators/REACT/template/stories/Welcome.js
index 6f0ca488aeb7..4e9ee8eb7317 100644
--- a/packages/getstorybook/generators/REACT/template/stories/Welcome.js
+++ b/packages/getstorybook/generators/REACT/template/stories/Welcome.js
@@ -5,18 +5,18 @@ const styles = {
margin: 15,
maxWidth: 600,
lineHeight: 1.4,
- fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif'
+ fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif',
},
logo: {
- width: 200
+ width: 200,
},
link: {
color: '#1474f3',
textDecoration: 'none',
borderBottom: '1px solid #1474f3',
- paddingBottom: 2
+ paddingBottom: 2,
},
code: {
@@ -26,8 +26,8 @@ const styles = {
border: '1px solid #eae9e9',
borderRadius: 4,
backgroundColor: '#f3f2f2',
- color: '#3a3a3a'
- }
+ color: '#3a3a3a',
+ },
};
export default class Welcome extends React.Component {
diff --git a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.android.js b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.android.js
index b36980fe6bef..d83c1a28205e 100644
--- a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.android.js
+++ b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.android.js
@@ -6,7 +6,7 @@ configure(
() => {
require('./stories');
},
- module
+ module,
);
const StorybookUI = getStorybookUI({ port: 7007, host: 'localhost' });
diff --git a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.ios.js b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.ios.js
index b36980fe6bef..d83c1a28205e 100644
--- a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.ios.js
+++ b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/index.ios.js
@@ -6,7 +6,7 @@ configure(
() => {
require('./stories');
},
- module
+ module,
);
const StorybookUI = getStorybookUI({ port: 7007, host: 'localhost' });
diff --git a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/CenterView/style.js b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/CenterView/style.js
index f34efdca9f79..ff347fd9841f 100644
--- a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/CenterView/style.js
+++ b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/CenterView/style.js
@@ -3,6 +3,6 @@ export default {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
- backgroundColor: '#F5FCFF'
- }
+ backgroundColor: '#F5FCFF',
+ },
};
diff --git a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js
index 8c9e331ce277..2305b830c30f 100644
--- a/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js
+++ b/packages/getstorybook/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js
@@ -6,17 +6,17 @@ export default class Welcome extends React.Component {
wrapper: {
flex: 1,
padding: 24,
- justifyContent: 'center'
+ justifyContent: 'center',
},
header: {
fontSize: 18,
- marginBottom: 18
+ marginBottom: 18,
},
content: {
fontSize: 12,
marginBottom: 10,
- lineHeight: 18
- }
+ lineHeight: 18,
+ },
};
showApp(e) {
diff --git a/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Button.js b/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Button.js
index 2fccb36d61a6..97a2c9f0b552 100644
--- a/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Button.js
+++ b/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Button.js
@@ -8,7 +8,7 @@ const buttonStyles = {
cursor: 'pointer',
fontSize: 15,
padding: '3px 10px',
- margin: 10
+ margin: 10,
};
const Button = ({ children, onClick }) => (
@@ -19,7 +19,7 @@ const Button = ({ children, onClick }) => (
Button.propTypes = {
children: PropTypes.string.isRequired,
- onClick: PropTypes.func
+ onClick: PropTypes.func,
};
export default Button;
diff --git a/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js b/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js
index 2bd4462940ce..2b20b2a1b4a4 100644
--- a/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js
+++ b/packages/getstorybook/generators/REACT_SCRIPTS/template/src/stories/Welcome.js
@@ -5,18 +5,18 @@ const styles = {
margin: 15,
maxWidth: 600,
lineHeight: 1.4,
- fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif'
+ fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif',
},
logo: {
- width: 200
+ width: 200,
},
link: {
color: '#1474f3',
textDecoration: 'none',
borderBottom: '1px solid #1474f3',
- paddingBottom: 2
+ paddingBottom: 2,
},
code: {
@@ -26,14 +26,14 @@ const styles = {
border: '1px solid #eae9e9',
borderRadius: 4,
backgroundColor: '#f3f2f2',
- color: '#3a3a3a'
+ color: '#3a3a3a',
},
codeBlock: {
backgroundColor: '#f3f2f2',
padding: '1px 10px',
- margin: '10px 0'
- }
+ margin: '10px 0',
+ },
};
const codeBlock = `
diff --git a/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Button.js b/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Button.js
index 2fccb36d61a6..97a2c9f0b552 100644
--- a/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Button.js
+++ b/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Button.js
@@ -8,7 +8,7 @@ const buttonStyles = {
cursor: 'pointer',
fontSize: 15,
padding: '3px 10px',
- margin: 10
+ margin: 10,
};
const Button = ({ children, onClick }) => (
@@ -19,7 +19,7 @@ const Button = ({ children, onClick }) => (
Button.propTypes = {
children: PropTypes.string.isRequired,
- onClick: PropTypes.func
+ onClick: PropTypes.func,
};
export default Button;
diff --git a/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Welcome.js b/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Welcome.js
index c1a504ea7458..acd48b6409bc 100644
--- a/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Welcome.js
+++ b/packages/getstorybook/generators/WEBPACK_REACT/template/stories/Welcome.js
@@ -5,18 +5,18 @@ const styles = {
margin: 15,
maxWidth: 600,
lineHeight: 1.4,
- fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif'
+ fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif',
},
logo: {
- width: 200
+ width: 200,
},
link: {
color: '#1474f3',
textDecoration: 'none',
borderBottom: '1px solid #1474f3',
- paddingBottom: 2
+ paddingBottom: 2,
},
code: {
@@ -26,12 +26,12 @@ const styles = {
border: '1px solid #eae9e9',
borderRadius: 4,
backgroundColor: '#f3f2f2',
- color: '#3a3a3a'
+ color: '#3a3a3a',
},
note: {
- opacity: 0.5
- }
+ opacity: 0.5,
+ },
};
export default class Welcome extends React.Component {
diff --git a/packages/getstorybook/lib/project_types.js b/packages/getstorybook/lib/project_types.js
index c70204d67c4d..1c3bbe537434 100644
--- a/packages/getstorybook/lib/project_types.js
+++ b/packages/getstorybook/lib/project_types.js
@@ -6,5 +6,5 @@ module.exports = {
REACT_NATIVE: 'REACT_NATIVE',
REACT_PROJECT: 'REACT_PROJECT',
WEBPACK_REACT: 'WEBPACK_REACT',
- ALREADY_HAS_STORYBOOK: 'ALREADY_HAS_STORYBOOK'
+ ALREADY_HAS_STORYBOOK: 'ALREADY_HAS_STORYBOOK',
};
diff --git a/packages/getstorybookio/src/components/Docs/Container/index.js b/packages/getstorybookio/src/components/Docs/Container/index.js
index 504a601ad89b..eb2fbb549ae9 100644
--- a/packages/getstorybookio/src/components/Docs/Container/index.js
+++ b/packages/getstorybookio/src/components/Docs/Container/index.js
@@ -24,7 +24,7 @@ class Container extends React.Component {
sections,
selectedItem,
selectedSectionId,
- selectedItemId
+ selectedItemId,
} = this.props;
const gitHubRepoUrl = 'https://github.com/kadirahq/getstorybook.io';
@@ -87,7 +87,7 @@ Container.propTypes = {
sections: PropTypes.array,
selectedItem: PropTypes.object,
selectedSectionId: PropTypes.string,
- selectedItemId: PropTypes.string
+ selectedItemId: PropTypes.string,
};
export default Container;
diff --git a/packages/getstorybookio/src/components/Docs/Content/index.js b/packages/getstorybookio/src/components/Docs/Content/index.js
index ff6e2be60e6b..2f8d533e87f5 100644
--- a/packages/getstorybookio/src/components/Docs/Content/index.js
+++ b/packages/getstorybookio/src/components/Docs/Content/index.js
@@ -13,7 +13,7 @@ marked.setOptions({
pedantic: false,
sanitize: false,
smartLists: true,
- smartypants: false
+ smartypants: false,
});
const DocsContent = ({ title, content, editUrl }) => (
@@ -34,7 +34,7 @@ const DocsContent = ({ title, content, editUrl }) => (
DocsContent.propTypes = {
title: PropTypes.string,
content: PropTypes.string.isRequired,
- editUrl: PropTypes.string
+ editUrl: PropTypes.string,
};
export default DocsContent;
diff --git a/packages/getstorybookio/src/components/Docs/Nav/dropdown.js b/packages/getstorybookio/src/components/Docs/Nav/dropdown.js
index 7cad4ea8f10a..25b24a07025e 100644
--- a/packages/getstorybookio/src/components/Docs/Nav/dropdown.js
+++ b/packages/getstorybookio/src/components/Docs/Nav/dropdown.js
@@ -58,7 +58,7 @@ Nav.propTypes = {
selectedCatId: PropTypes.string,
sections: PropTypes.array,
selectedSection: PropTypes.string,
- selectedItem: PropTypes.string
+ selectedItem: PropTypes.string,
};
export default Nav;
diff --git a/packages/getstorybookio/src/components/Docs/Nav/index.js b/packages/getstorybookio/src/components/Docs/Nav/index.js
index a118dd08103e..35d8906cd3a1 100644
--- a/packages/getstorybookio/src/components/Docs/Nav/index.js
+++ b/packages/getstorybookio/src/components/Docs/Nav/index.js
@@ -44,7 +44,7 @@ Nav.propTypes = {
selectedCatId: PropTypes.string,
sections: PropTypes.array,
selectedItem: PropTypes.string,
- prefix: PropTypes.string
+ prefix: PropTypes.string,
};
export default Nav;
diff --git a/packages/getstorybookio/src/components/Docs/Navigation/index.js b/packages/getstorybookio/src/components/Docs/Navigation/index.js
index 828d42a3cd60..54c6a91bf3d8 100644
--- a/packages/getstorybookio/src/components/Docs/Navigation/index.js
+++ b/packages/getstorybookio/src/components/Docs/Navigation/index.js
@@ -6,7 +6,7 @@ import { Link } from 'react-router';
class Navigation extends React.Component {
renderHeading(caption) {
const style = {
- ...styles.h3
+ ...styles.h3,
};
return
{caption}
;
@@ -53,7 +53,7 @@ Navigation.propTypes = {
sections: PropTypes.array,
selectedSection: PropTypes.string,
selectedItem: PropTypes.string,
- prefix: PropTypes.string
+ prefix: PropTypes.string,
};
export default Navigation;
diff --git a/packages/getstorybookio/src/components/Docs/Navigation/styles.js b/packages/getstorybookio/src/components/Docs/Navigation/styles.js
index 2400cd2dc990..f1ab365cf157 100644
--- a/packages/getstorybookio/src/components/Docs/Navigation/styles.js
+++ b/packages/getstorybookio/src/components/Docs/Navigation/styles.js
@@ -5,36 +5,36 @@ const styles = {
...theme.base,
...theme.text,
borderRight: '1px solid #ECECEC',
- marginRight: 30
+ marginRight: 30,
},
h3: {
color: '#000',
margin: '25px 0 7px 0',
padding: 0,
- fontSize: 20
+ fontSize: 20,
},
ul: {
margin: 0,
padding: 0,
- listStyle: 'none'
+ listStyle: 'none',
},
li: {
margin: '8px 0',
- lineHeight: '25px'
+ lineHeight: '25px',
},
item: {
...theme.text,
- textDecoration: 'none'
- }
+ textDecoration: 'none',
+ },
};
styles.selectedItem = {
...styles.item,
- fontWeight: 600
+ fontWeight: 600,
};
export default styles;
diff --git a/packages/getstorybookio/src/components/Docs/index.js b/packages/getstorybookio/src/components/Docs/index.js
index e91b1b4007fb..1dcacc043bdf 100644
--- a/packages/getstorybookio/src/components/Docs/index.js
+++ b/packages/getstorybookio/src/components/Docs/index.js
@@ -14,7 +14,7 @@ class Docs extends React.Component {
sections,
selectedItem,
selectedSectionId,
- selectedItemId
+ selectedItemId,
} = this.props;
const selectedCat = categories.find(cat => cat.id === selectedCatId);
@@ -44,7 +44,7 @@ Docs.propTypes = {
sections: PropTypes.array,
selectedItem: PropTypes.object,
selectedSectionId: PropTypes.string,
- selectedItemId: PropTypes.string
+ selectedItemId: PropTypes.string,
};
export default Docs;
diff --git a/packages/getstorybookio/src/components/Homepage/Featured/index.js b/packages/getstorybookio/src/components/Homepage/Featured/index.js
index ac5e71ff9102..f8ee1d736ecf 100644
--- a/packages/getstorybookio/src/components/Homepage/Featured/index.js
+++ b/packages/getstorybookio/src/components/Homepage/Featured/index.js
@@ -42,7 +42,7 @@ class Featured extends React.Component {
}
Featured.propTypes = {
- featuredStorybooks: PropTypes.array
+ featuredStorybooks: PropTypes.array,
};
export default Featured;
diff --git a/packages/getstorybookio/src/components/Homepage/Header/index.js b/packages/getstorybookio/src/components/Homepage/Header/index.js
index 20e8f299fcb0..cbe6288d7b7b 100644
--- a/packages/getstorybookio/src/components/Homepage/Header/index.js
+++ b/packages/getstorybookio/src/components/Homepage/Header/index.js
@@ -6,7 +6,7 @@ import storybookLogo from '../../../design/homepage/storybook-logo.png';
const sections = [
{ id: 'home', caption: 'Home', href: '/' },
- { id: 'docs', caption: 'Docs', href: '/docs' }
+ { id: 'docs', caption: 'Docs', href: '/docs' },
];
class Header extends React.Component {
@@ -49,7 +49,7 @@ class Header extends React.Component {
}
Header.propTypes = {
- currentSection: PropTypes.string
+ currentSection: PropTypes.string,
};
export default Header;
diff --git a/packages/getstorybookio/src/components/Homepage/index.js b/packages/getstorybookio/src/components/Homepage/index.js
index b33437a78fd5..59cfc786e2cb 100644
--- a/packages/getstorybookio/src/components/Homepage/index.js
+++ b/packages/getstorybookio/src/components/Homepage/index.js
@@ -15,28 +15,28 @@ const featuredStorybooks = [
owner: 'https://avatars0.githubusercontent.com/u/698437?v=3&s=200',
storybook: {
name: 'React Dates',
- link: 'http://airbnb.io/react-dates/'
+ link: 'http://airbnb.io/react-dates/',
},
- source: 'https://github.com/airbnb/react-dates'
+ source: 'https://github.com/airbnb/react-dates',
},
{
owner: 'https://avatars3.githubusercontent.com/u/239676?v=3&s=460',
storybook: {
name: 'React Native Web',
- link: 'https://necolas.github.io/react-native-web/storybook'
+ link: 'https://necolas.github.io/react-native-web/storybook',
},
- source: 'https://github.com/necolas/react-native-web'
+ source: 'https://github.com/necolas/react-native-web',
},
{
owner: 'https://avatars1.githubusercontent.com/u/15616844?v=3&s=200',
storybook: {
name: 'React Button',
- link: 'http://kadira-samples.github.io/react-button/'
+ link: 'http://kadira-samples.github.io/react-button/',
},
- source: 'https://github.com/kadira-samples/react-button'
- }
+ source: 'https://github.com/kadira-samples/react-button',
+ },
];
const Homepage = () => (
@@ -53,7 +53,7 @@ const Homepage = () => (
);
Homepage.propTypes = {
- featuredStorybooks: PropTypes.array
+ featuredStorybooks: PropTypes.array,
};
export default Homepage;
diff --git a/packages/getstorybookio/src/containers/Docs.js b/packages/getstorybookio/src/containers/Docs.js
index d421aa276445..abed4004ed3e 100644
--- a/packages/getstorybookio/src/containers/Docs.js
+++ b/packages/getstorybookio/src/containers/Docs.js
@@ -5,7 +5,7 @@ import {
getNavigationData,
getItem,
getFirstItem,
- getFirstItemOfSection
+ getFirstItemOfSection,
} from '../docs';
class DocsContainer extends React.Component {
@@ -32,7 +32,7 @@ class DocsContainer extends React.Component {
sections: getNavigationData(selectedCatId),
selectedItem,
selectedSectionId,
- selectedItemId
+ selectedItemId,
};
return
;
diff --git a/packages/getstorybookio/src/docs/index.js b/packages/getstorybookio/src/docs/index.js
index e37f71cca729..42db8c9ad4ba 100644
--- a/packages/getstorybookio/src/docs/index.js
+++ b/packages/getstorybookio/src/docs/index.js
@@ -1,12 +1,12 @@
const data = {
'react-storybook': {
title: 'React Storybook',
- sections: require('./react-storybook').default
+ sections: require('./react-storybook').default,
},
'storybook-hub': {
title: 'Storybook Hub',
- sections: require('./storybook-hub').default
- }
+ sections: require('./storybook-hub').default,
+ },
};
export function getCategories() {
@@ -16,7 +16,7 @@ export function getCategories() {
catIds.forEach(catId => {
categories.push({
id: catId,
- title: data[catId].title
+ title: data[catId].title,
});
});
diff --git a/packages/getstorybookio/src/docs/react-storybook/addons/addon-gallery.js b/packages/getstorybookio/src/docs/react-storybook/addons/addon-gallery.js
index 7b393851d672..c751ec30fdc3 100644
--- a/packages/getstorybookio/src/docs/react-storybook/addons/addon-gallery.js
+++ b/packages/getstorybookio/src/docs/react-storybook/addons/addon-gallery.js
@@ -77,5 +77,5 @@ export default {
Given possible values for each prop, renders your component with all combinations of prop values. Useful for finding edge cases or just seeing all component states at once.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/addons/api.js b/packages/getstorybookio/src/docs/react-storybook/addons/api.js
index 7ad765da2aea..42efb2a492f9 100644
--- a/packages/getstorybookio/src/docs/react-storybook/addons/api.js
+++ b/packages/getstorybookio/src/docs/react-storybook/addons/api.js
@@ -133,5 +133,5 @@ export default {
~~~js
storybookAPI.onStory((kind, story) => console.log(kind, story));
~~~
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/addons/introduction.js b/packages/getstorybookio/src/docs/react-storybook/addons/introduction.js
index 0c9041eeba5c..15b38201368c 100644
--- a/packages/getstorybookio/src/docs/react-storybook/addons/introduction.js
+++ b/packages/getstorybookio/src/docs/react-storybook/addons/introduction.js
@@ -1,7 +1,7 @@
import { stripIndent } from 'common-tags';
const images = {
- addonActionsDemo: require('./static/addon-actions-demo.gif')
+ addonActionsDemo: require('./static/addon-actions-demo.gif'),
};
export default {
@@ -107,5 +107,5 @@ export default {
* [Using addons](/docs/react-storybook/addons/using-addons)
* [Addon gallery](/docs/react-storybook/addons/addon-gallery)
* [Write your own addon](/docs/react-storybook/addons/writing-addons)
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/addons/using-addons.js b/packages/getstorybookio/src/docs/react-storybook/addons/using-addons.js
index 8779dc6b35a3..6381a99ca90a 100644
--- a/packages/getstorybookio/src/docs/react-storybook/addons/using-addons.js
+++ b/packages/getstorybookio/src/docs/react-storybook/addons/using-addons.js
@@ -2,7 +2,7 @@ import { stripIndent } from 'common-tags';
const images = {
storiesWithoutNotes: require('./static/stories-without-notes.png'),
- storiesWithNotes: require('./static/stories-with-notes.png')
+ storiesWithNotes: require('./static/stories-with-notes.png'),
};
export default {
@@ -67,5 +67,5 @@ export default {
> This particular addon has created a panel in Storybook. Some addons may not create a panel and may use some other Storybook platform features.
>
> So, look at the addon’s own documentation on how to use it.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/addons/writing-addons.js b/packages/getstorybookio/src/docs/react-storybook/addons/writing-addons.js
index 2ec7bcf40d8a..1815444e7891 100644
--- a/packages/getstorybookio/src/docs/react-storybook/addons/writing-addons.js
+++ b/packages/getstorybookio/src/docs/react-storybook/addons/writing-addons.js
@@ -3,7 +3,7 @@ import { stripIndent } from 'common-tags';
const images = {
storybookComponents: require('./static/storybook-components.png'),
storiesWithoutNotes: require('./static/stories-without-notes.png'),
- storiesWithNotes: require('./static/stories-with-notes.png')
+ storiesWithNotes: require('./static/stories-with-notes.png'),
};
export default {
@@ -185,5 +185,5 @@ export default {
Your packaged Storybook addon needed to be written in ES5. If you are using ES6, then you need to transpile it.
In that case, we recommend to use [React CDK](https://github.com/kadirahq/react-cdk) for that.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/basics/exporting-storybook.js b/packages/getstorybookio/src/docs/react-storybook/basics/exporting-storybook.js
index 5a78ccbb0254..46bbb66cedd6 100644
--- a/packages/getstorybookio/src/docs/react-storybook/basics/exporting-storybook.js
+++ b/packages/getstorybookio/src/docs/react-storybook/basics/exporting-storybook.js
@@ -40,5 +40,5 @@ export default {
Additionally, you can deploy Storybook directly into GitHub pages with our [storybook-deployer](https://github.com/kadirahq/storybook-deployer) tool.
Or, you can simply export your storybook into the docs directory and use it as the root for GitHub pages. Have a look at [this guide](https://github.com/blog/2233-publish-your-project-documentation-with-github-pages) for more information.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/basics/faq.js b/packages/getstorybookio/src/docs/react-storybook/basics/faq.js
index 64e6c49970ea..6d8a09828092 100644
--- a/packages/getstorybookio/src/docs/react-storybook/basics/faq.js
+++ b/packages/getstorybookio/src/docs/react-storybook/basics/faq.js
@@ -13,5 +13,5 @@ export default {
~~~
npm test -- --coverage --collectCoverageFrom='["src/**/*.{js,jsx}","!src/**/stories/*"]'
~~~
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/basics/introduction.js b/packages/getstorybookio/src/docs/react-storybook/basics/introduction.js
index 424a1e94d25c..2e9f5efc7335 100644
--- a/packages/getstorybookio/src/docs/react-storybook/basics/introduction.js
+++ b/packages/getstorybookio/src/docs/react-storybook/basics/introduction.js
@@ -1,7 +1,7 @@
import { stripIndent } from 'common-tags';
const images = {
- screenshot: require('./static/screenshot.png')
+ screenshot: require('./static/screenshot.png'),
};
export default {
@@ -21,5 +21,5 @@ export default {
* [React Button](http://kadira-samples.github.io/react-button) - [source](https://github.com/kadira-samples/react-button)
* [Demo of React Dates](http://airbnb.io/react-dates/) - [source](https://github.com/airbnb/react-dates)
* [Demo of React Native Web](http://necolas.github.io/react-native-web/storybook/) - [source](https://github.com/necolas/react-native-web)
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/basics/quick-start-guide.js b/packages/getstorybookio/src/docs/react-storybook/basics/quick-start-guide.js
index 72a667e21df0..61e9d6c39a32 100644
--- a/packages/getstorybookio/src/docs/react-storybook/basics/quick-start-guide.js
+++ b/packages/getstorybookio/src/docs/react-storybook/basics/quick-start-guide.js
@@ -24,5 +24,5 @@ export default {
---
To learn more about what \`getstorybook\` command does, have a look at our [Slow Start Guide](/docs/react-storybook/basics/slow-start-guide).
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/basics/slow-start-guide.js b/packages/getstorybookio/src/docs/react-storybook/basics/slow-start-guide.js
index 03f2cc8b785c..6ab1a9a642b7 100644
--- a/packages/getstorybookio/src/docs/react-storybook/basics/slow-start-guide.js
+++ b/packages/getstorybookio/src/docs/react-storybook/basics/slow-start-guide.js
@@ -1,7 +1,7 @@
import { stripIndent } from 'common-tags';
const images = {
- basicsStories: require('./static/basic-stories.png')
+ basicsStories: require('./static/basic-stories.png'),
};
export default {
@@ -103,5 +103,5 @@ export default {
![](${images.basicsStories})
Now you can change components and write stories whenever you need to. You'll get those changes into Storybook in a snap with the help of Webpack's HMR API.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/basics/writing-stories.js b/packages/getstorybookio/src/docs/react-storybook/basics/writing-stories.js
index 24bb8568dbb9..724779f6e172 100644
--- a/packages/getstorybookio/src/docs/react-storybook/basics/writing-stories.js
+++ b/packages/getstorybookio/src/docs/react-storybook/basics/writing-stories.js
@@ -1,7 +1,7 @@
import { stripIndent } from 'common-tags';
const images = {
- basicsStories: require('./static/basic-stories.png')
+ basicsStories: require('./static/basic-stories.png'),
};
export default {
@@ -146,5 +146,5 @@ export default {
* Have one repo for the theme, and one for the app.
* Have one repo for each UI component and use those in different apps.
* Have a few repos for different kinds of UI components and use them in different apps.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/add-custom-head-tags.js b/packages/getstorybookio/src/docs/react-storybook/configurations/add-custom-head-tags.js
index 4e5df5df57c7..5b67298bf390 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/add-custom-head-tags.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/add-custom-head-tags.js
@@ -18,5 +18,5 @@ export default {
> **Important**
> Storybook will inject these tags to the iframe where your components are rendered. So, these won’t be loaded into the main Storybook UI.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/cli-options.js b/packages/getstorybookio/src/docs/react-storybook/configurations/cli-options.js
index daa8572ca44f..b478a8366630 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/cli-options.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/cli-options.js
@@ -39,5 +39,5 @@ export default {
-c, --config-dir [dir-name] Directory where to load Storybook configurations from
~~~
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/custom-babel-config.js b/packages/getstorybookio/src/docs/react-storybook/configurations/custom-babel-config.js
index 685a15c1a7c7..52635081ef80 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/custom-babel-config.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/custom-babel-config.js
@@ -11,5 +11,5 @@ export default {
Then Storybook will load the Babel configuration only from that file.
> Currently we do not support loading the Babel config from the package.json.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/custom-webpack-config.js b/packages/getstorybookio/src/docs/react-storybook/configurations/custom-webpack-config.js
index 4bc83151ff9b..20a74d51ce9b 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/custom-webpack-config.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/custom-webpack-config.js
@@ -104,5 +104,5 @@ export default {
* Simply import your main Webpack config into Storybook's \`webpack.config.js\` and use the loaders and plugins used in that.
* Create a new file with common Webpack options and use it in both inside the main Webpack config and inside Storybook's \`webpack.config.js\`.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/default-config.js b/packages/getstorybookio/src/docs/react-storybook/configurations/default-config.js
index 97807c6a05ec..13af047981c3 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/default-config.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/default-config.js
@@ -68,5 +68,5 @@ export default {
> Unfortunately, we don't support Meteor packages. If your UI component includes one or more Meteor packages, try to avoid using them in UI components.
> If they are containers, you can use [React Stubber](https://github.com/kadirahq/react-stubber) to use them in Storybook.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/env-vars.js b/packages/getstorybookio/src/docs/react-storybook/configurations/env-vars.js
index df5591b7377d..741982e299d7 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/env-vars.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/env-vars.js
@@ -35,5 +35,5 @@ export default {
* When running \`npm run storybook\`, we set NODE_ENV to 'development'
* When building storybook, we set NODE_ENV to 'production'
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/configurations/serving-static-files.js b/packages/getstorybookio/src/docs/react-storybook/configurations/serving-static-files.js
index bc3e95ab6313..65fb756384b7 100644
--- a/packages/getstorybookio/src/docs/react-storybook/configurations/serving-static-files.js
+++ b/packages/getstorybookio/src/docs/react-storybook/configurations/serving-static-files.js
@@ -75,5 +75,5 @@ export default {
If you load static content via importing, this is automatic and you do not have to do anything.
If you are using a static directory, then you need to use _relative paths_ to load images.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/index.js b/packages/getstorybookio/src/docs/react-storybook/index.js
index cddba3bd67e8..dba7c086415f 100644
--- a/packages/getstorybookio/src/docs/react-storybook/index.js
+++ b/packages/getstorybookio/src/docs/react-storybook/index.js
@@ -8,8 +8,8 @@ export default [
require('./basics/slow-start-guide').default,
require('./basics/writing-stories').default,
require('./basics/exporting-storybook').default,
- require('./basics/faq').default
- ]
+ require('./basics/faq').default,
+ ],
},
{
id: 'configurations',
@@ -21,8 +21,8 @@ export default [
require('./configurations/add-custom-head-tags').default,
require('./configurations/serving-static-files').default,
require('./configurations/env-vars').default,
- require('./configurations/cli-options').default
- ]
+ require('./configurations/cli-options').default,
+ ],
},
{
id: 'testing',
@@ -32,8 +32,8 @@ export default [
require('./testing/structural-testing').default,
require('./testing/interaction-testing').default,
require('./testing/css-style-testing').default,
- require('./testing/manual-testing').default
- ]
+ require('./testing/manual-testing').default,
+ ],
},
{
id: 'addons',
@@ -43,7 +43,7 @@ export default [
require('./addons/using-addons').default,
require('./addons/addon-gallery').default,
require('./addons/writing-addons').default,
- require('./addons/api').default
- ]
- }
+ require('./addons/api').default,
+ ],
+ },
];
diff --git a/packages/getstorybookio/src/docs/react-storybook/testing/css-style-testing.js b/packages/getstorybookio/src/docs/react-storybook/testing/css-style-testing.js
index d243708d0912..e230d9dce2a8 100644
--- a/packages/getstorybookio/src/docs/react-storybook/testing/css-style-testing.js
+++ b/packages/getstorybookio/src/docs/react-storybook/testing/css-style-testing.js
@@ -32,5 +32,5 @@ export default {
It will be hard to use all the frameworks we've [mentioned](/docs/react-storybook/testing/react-ui-testing#3-css-style-testing), but we'll be able to use frameworks which are based on URL as the input source. (Such as [BackstopJS](https://github.com/garris/BackstopJS) and [Gemini](https://github.com/gemini-testing/gemini))
> In the future we are also planning to smooth this process with the help of [StoryShots](https://github.com/storybooks/storyshots).
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/testing/interaction-testing.js b/packages/getstorybookio/src/docs/react-storybook/testing/interaction-testing.js
index 4b1053dd3ce7..23eb7d5241e0 100644
--- a/packages/getstorybookio/src/docs/react-storybook/testing/interaction-testing.js
+++ b/packages/getstorybookio/src/docs/react-storybook/testing/interaction-testing.js
@@ -18,5 +18,5 @@ export default {
With that, you can write test specs directly inside stories.
Additionally, you also can use your CI server to run those tests.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/testing/manual-testing.js b/packages/getstorybookio/src/docs/react-storybook/testing/manual-testing.js
index 65bec91f0f3d..afd4e023f01e 100644
--- a/packages/getstorybookio/src/docs/react-storybook/testing/manual-testing.js
+++ b/packages/getstorybookio/src/docs/react-storybook/testing/manual-testing.js
@@ -20,5 +20,5 @@ export default {
> We will be releasing it in the first week of October.
> Join our [Newsletter](http://tinyletter.com/storybooks) or [Slack Team](https://storybooks-slackin.herokuapp.com/) to get updates.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/testing/react-ui-testing.js b/packages/getstorybookio/src/docs/react-storybook/testing/react-ui-testing.js
index 2e050a6f5b3e..36bf6ece4619 100644
--- a/packages/getstorybookio/src/docs/react-storybook/testing/react-ui-testing.js
+++ b/packages/getstorybookio/src/docs/react-storybook/testing/react-ui-testing.js
@@ -77,5 +77,5 @@ export default {
* [Interaction Testing with Specs Addon](/docs/react-storybook/testing/interaction-testing)
* [Storybook as the Base for CSS/Style Testing](/docs/react-storybook/testing/css-style-testing)
* [Storybook for Manual UI Testing](/docs/react-storybook/testing/manual-testing)
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/react-storybook/testing/structural-testing.js b/packages/getstorybookio/src/docs/react-storybook/testing/structural-testing.js
index 40ce10445420..9cc039e6670f 100644
--- a/packages/getstorybookio/src/docs/react-storybook/testing/structural-testing.js
+++ b/packages/getstorybookio/src/docs/react-storybook/testing/structural-testing.js
@@ -61,5 +61,5 @@ export default {
StoryShots also comes with a few important [productive features](https://github.com/storybooks/storyshots#key-features) that can be customized. Have a look at the StoryShots [repo](https://github.com/storybooks/storyshots) for more information.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/basics/comments.js b/packages/getstorybookio/src/docs/storybook-hub/basics/comments.js
index f82f6e2f9b98..c2eedb52df18 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/basics/comments.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/basics/comments.js
@@ -39,5 +39,5 @@ export default {
* Make sure you are on the correct branch.
Then you'll be able to access these comments. You'll be asked to login to storybook Hub, if needed, right from your comments panel.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/basics/getting-started.js b/packages/getstorybookio/src/docs/storybook-hub/basics/getting-started.js
index 5a41d302fc22..f5c55c712b07 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/basics/getting-started.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/basics/getting-started.js
@@ -53,5 +53,5 @@ export default {
You can also access these storybooks, right next to your PR.
![Access Storybooks via GitHub PR](${storybooksViaPRImage})
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/basics/github-pr-integration.js b/packages/getstorybookio/src/docs/storybook-hub/basics/github-pr-integration.js
index a79aee1bfbc2..a5f318f0b40f 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/basics/github-pr-integration.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/basics/github-pr-integration.js
@@ -21,5 +21,5 @@ export default {
![Storybooks via GitHub Deploy Link](${githubPRDeployLinkImage})
You can access all these storybooks by visiting your app's page on Storybook Hub as well. We arrange them according to your branches.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/basics/private-or-public-apps.js b/packages/getstorybookio/src/docs/storybook-hub/basics/private-or-public-apps.js
index fb7f3dc58d68..155bd764a7f4 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/basics/private-or-public-apps.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/basics/private-or-public-apps.js
@@ -20,5 +20,5 @@ export default {
> Anyway, since your GitHub repo is private, no one in the public will be able to see your storybooks, unless you share them.
Additionally, our storybook URLs are hard to guess. (They carried an UUID)
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/basics/security.js b/packages/getstorybookio/src/docs/storybook-hub/basics/security.js
index 6417db96aae6..8af8748bca5e 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/basics/security.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/basics/security.js
@@ -59,5 +59,5 @@ export default {
## TALK TO US
If you need more information or have found a vulnerability, email us at [storybooks@kadira.io](mailto:storybooks@kadira.io). We're happy to talk with you.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/index.js b/packages/getstorybookio/src/docs/storybook-hub/index.js
index a42818a50a49..68e659709d9e 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/index.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/index.js
@@ -7,8 +7,8 @@ export default [
require('./basics/github-pr-integration').default,
require('./basics/comments').default,
require('./basics/private-or-public-apps').default,
- require('./basics/security').default
- ]
+ require('./basics/security').default,
+ ],
},
{
@@ -18,7 +18,7 @@ export default [
require('./management-features/workspaces').default,
require('./management-features/sharing-storybooks').default,
require('./management-features/env-variables').default,
- require('./management-features/private-npm-packages').default
- ]
- }
+ require('./management-features/private-npm-packages').default,
+ ],
+ },
];
diff --git a/packages/getstorybookio/src/docs/storybook-hub/management-features/env-variables.js b/packages/getstorybookio/src/docs/storybook-hub/management-features/env-variables.js
index fc41e8e850b6..ce0e6649f371 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/management-features/env-variables.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/management-features/env-variables.js
@@ -20,5 +20,5 @@ export default {
Then you could set environment variables like this:
![Set Environment Varibles](${envVarsImage})
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/management-features/private-npm-packages.js b/packages/getstorybookio/src/docs/storybook-hub/management-features/private-npm-packages.js
index 2fba92483554..fbb1cdf35892 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/management-features/private-npm-packages.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/management-features/private-npm-packages.js
@@ -31,5 +31,5 @@ export default {
~~~sh
SB_SSHKEY
~~~
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/management-features/sharing-storybooks.js b/packages/getstorybookio/src/docs/storybook-hub/management-features/sharing-storybooks.js
index 62f16590fbce..5ba2733d158f 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/management-features/sharing-storybooks.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/management-features/sharing-storybooks.js
@@ -19,5 +19,5 @@ export default {
For private apps, any collaborator in your workspace could access storybooks for that app.
You can easily add or remove collaborators by visiting your [workspace](https://hub.getstorybook.io/workspaces).
- `
+ `,
};
diff --git a/packages/getstorybookio/src/docs/storybook-hub/management-features/workspaces.js b/packages/getstorybookio/src/docs/storybook-hub/management-features/workspaces.js
index f4b9eb532d55..1fca227a0f3a 100644
--- a/packages/getstorybookio/src/docs/storybook-hub/management-features/workspaces.js
+++ b/packages/getstorybookio/src/docs/storybook-hub/management-features/workspaces.js
@@ -14,5 +14,5 @@ export default {
You'll have access to more workspaces as you are added as a collaborator. Then you can see apps from those workspaces as well.
> Currently, we don't allow the creation of additional workspaces. But we'll be adding that feature soon.
- `
+ `,
};
diff --git a/packages/getstorybookio/src/index.js b/packages/getstorybookio/src/index.js
index e08bb90c9741..833e6f2ef02f 100644
--- a/packages/getstorybookio/src/index.js
+++ b/packages/getstorybookio/src/index.js
@@ -15,5 +15,5 @@ ReactDOM.render(
,
- document.getElementById('root')
+ document.getElementById('root'),
);
diff --git a/packages/getstorybookio/src/lib/highlight.js b/packages/getstorybookio/src/lib/highlight.js
index ce7494f91a8c..70ce9b5b0fb1 100644
--- a/packages/getstorybookio/src/lib/highlight.js
+++ b/packages/getstorybookio/src/lib/highlight.js
@@ -29,7 +29,7 @@ class Highlight extends React.Component {
}
Highlight.propTypes = {
- children: PropTypes.string
+ children: PropTypes.string,
};
export default Highlight;
diff --git a/packages/getstorybookio/src/stories/data.js b/packages/getstorybookio/src/stories/data.js
index 5fc18698910d..12b910fccd92 100644
--- a/packages/getstorybookio/src/stories/data.js
+++ b/packages/getstorybookio/src/stories/data.js
@@ -2,12 +2,12 @@ export const docsData = {
categories: [
{
id: 'cat-1',
- title: 'CAT 1'
+ title: 'CAT 1',
},
{
id: 'cat-2',
- title: 'CAT 2'
- }
+ title: 'CAT 2',
+ },
],
sections: [
{
@@ -16,8 +16,8 @@ export const docsData = {
items: [
{ id: 'getting-started', title: 'Getting Started' },
{ id: 'writing-stories', title: 'Writing Stories' },
- { id: 'build-as-a-static-app', title: 'Build as a Static App' }
- ]
+ { id: 'build-as-a-static-app', title: 'Build as a Static App' },
+ ],
},
{
id: 'configurations',
@@ -25,9 +25,9 @@ export const docsData = {
items: [
{ id: 'default-config', title: 'Default Config' },
{ id: 'webpack', title: 'Webpack' },
- { id: 'babel', title: 'Babel' }
- ]
- }
+ { id: 'babel', title: 'Babel' },
+ ],
+ },
],
selectedItem: {
id: 'writing-stories',
@@ -55,34 +55,34 @@ storiesOf('Toggle', module)
return
});
~~~
- `
+ `,
},
featuredStorybooks: [
{
owner: 'https://avatars0.githubusercontent.com/u/698437?v=3&s=200',
storybook: {
name: 'React Dates',
- link: 'http://airbnb.io/react-dates/'
+ link: 'http://airbnb.io/react-dates/',
},
- source: 'https://github.com/airbnb/react-dates'
+ source: 'https://github.com/airbnb/react-dates',
},
{
owner: 'https://avatars3.githubusercontent.com/u/239676?v=3&s=460',
storybook: {
name: 'React Native Web',
- link: 'https://necolas.github.io/react-native-web/storybook'
+ link: 'https://necolas.github.io/react-native-web/storybook',
},
- source: 'https://github.com/necolas/react-native-web'
+ source: 'https://github.com/necolas/react-native-web',
},
{
owner: 'https://avatars1.githubusercontent.com/u/15616844?v=3&s=200',
storybook: {
name: 'React Button',
- link: 'http://kadira-samples.github.io/react-button/'
+ link: 'http://kadira-samples.github.io/react-button/',
},
- source: 'https://github.com/kadira-samples/react-button'
- }
- ]
+ source: 'https://github.com/kadira-samples/react-button',
+ },
+ ],
};
diff --git a/packages/getstorybookio/src/stories/designs.js b/packages/getstorybookio/src/stories/designs.js
index 1cd07b1a9f4c..f7273cc286c4 100644
--- a/packages/getstorybookio/src/stories/designs.js
+++ b/packages/getstorybookio/src/stories/designs.js
@@ -7,14 +7,14 @@ export default {
Overall this will be a simple design.
All these content should render inside a BS containers and it support mobile.
- `
+ `,
},
'Homepage.header': {
design: require('../design/homepage/header.png'),
note: `
Just a simple header. In the mobile view, this will show one after other.
- `
+ `,
},
'Homepage.heading': {
@@ -22,7 +22,7 @@ export default {
note: `
Use the "Storybook" font to make it super bold. (font-weight=800)
In the mobile view, try to make the font-size smaller.
- `
+ `,
},
'Homepage.demo': {
@@ -30,7 +30,7 @@ export default {
note: `
Use the image located at src/design/homepage/screenshot.png for this.
But in production we use an animated GIF here.
- `
+ `,
},
'Homepage.built-for': {
@@ -46,7 +46,7 @@ export default {
This one and few components below share some commong features.
Those includes bottom border and margins. So create a common component inside
the Homepage/styles.css stylesheet and use that class in this other components below.
- `
+ `,
},
'Homepage.main-links': {
@@ -56,7 +56,7 @@ export default {
You can also use that in the component below.
In the mobile view, two sections in here show one after other.
- `
+ `,
},
'Homepage.featured-storybooks': {
@@ -97,7 +97,7 @@ export default {
source: "https://github.com/kadira-samples/react-button"
},
]
- `
+ `,
},
'Homepage.footer': {
@@ -109,7 +109,7 @@ export default {
* NewsLetter: https://tinyletter.com/storybooks
* Twiiter: https://twitter.com/kadirahq
* Medium: https://voice.kadira.io
- `
+ `,
},
'Docs.page': {
@@ -121,7 +121,7 @@ export default {
Here we reuse the header and footer from the Homepage.
Bootstrap Layout is also pretty similar to the Homepage.
- `
+ `,
},
'Docs.docs-container': {
@@ -129,7 +129,7 @@ export default {
note: `
This is a container and this as no content.
But this one has top and bottom borders and some margins.
- `
+ `,
},
'Docs.docs-nav': {
@@ -142,7 +142,7 @@ export default {
Others are with '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif"' and 17px.
Selected item is marked with bold and in this color: #E25E5E.
- `
+ `,
},
'Docs.docs-content': {
@@ -156,6 +156,6 @@ export default {
* color: #333
(You can look at the BulletProof Meteor for the actual styles.)
- `
- }
+ `,
+ },
};
diff --git a/packages/getstorybookio/src/stories/implementations.js b/packages/getstorybookio/src/stories/implementations.js
index c9ad379c69bb..d516eb495808 100644
--- a/packages/getstorybookio/src/stories/implementations.js
+++ b/packages/getstorybookio/src/stories/implementations.js
@@ -62,5 +62,5 @@ export default {
selectedSection={docsData.selectedItem.sectionId}
selectedItem={docsData.selectedItem.id}
/>
- )
+ ),
};
diff --git a/packages/getstorybookio/src/stories/with_design.js b/packages/getstorybookio/src/stories/with_design.js
index 05a6b073a5af..a0145878d00d 100644
--- a/packages/getstorybookio/src/stories/with_design.js
+++ b/packages/getstorybookio/src/stories/with_design.js
@@ -6,7 +6,7 @@ const styles = {
toolbar: {
marginBottom: 10,
fontSize: 11,
- fontFamily: '-apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif'
+ fontFamily: '-apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif',
},
toolbarButton: {
@@ -17,11 +17,11 @@ const styles = {
cursor: 'pointer',
outline: 0,
letterSpacing: 0.5,
- WebkitFontSmoothing: 'antialiased'
+ WebkitFontSmoothing: 'antialiased',
},
wrapper: {
- padding: 10
+ padding: 10,
},
heading: {
@@ -29,12 +29,12 @@ const styles = {
textTransform: 'uppercase',
fontSize: 20,
margin: '10px 0',
- padding: '0'
+ padding: '0',
},
container: {
- border: '1px dashed #DDD'
- }
+ border: '1px dashed #DDD',
+ },
};
export default class WithDesign extends React.Component {
@@ -104,11 +104,11 @@ export default class WithDesign extends React.Component {
['Side by Side', 'COMPARE'],
['One After Other', 'SHOW_BOTH'],
['Implementation', 'SHOW_IMPLEMENTATION'],
- ['Design', 'SHOW_DESIGN']
+ ['Design', 'SHOW_DESIGN'],
].map(([caption, typeName]) => {
const style = {
...styles.toolbarButton,
- fontWeight: currentType === typeName ? 600 : 400
+ fontWeight: currentType === typeName ? 600 : 400,
};
return (
@@ -148,7 +148,7 @@ export default class WithDesign extends React.Component {
const containerStyle = {
...styles.container,
- zoom: implementationScale
+ zoom: implementationScale,
};
return (
diff --git a/packages/react-native-storybook/src/bin/storybook-start.js b/packages/react-native-storybook/src/bin/storybook-start.js
index 102cbb569c8a..a2a1253dd7b7 100644
--- a/packages/react-native-storybook/src/bin/storybook-start.js
+++ b/packages/react-native-storybook/src/bin/storybook-start.js
@@ -28,7 +28,7 @@ const server = new Server({
configDir,
environment: program.environment,
manualId: program.manualId,
- secured: program.secured
+ secured: program.secured,
});
server.listen(...listenAddr, err => {
@@ -48,10 +48,10 @@ if (!program.skipPackager) {
'node node_modules/react-native/local-cli/cli.js start',
`--projectRoots ${projectRoots.join(',')}`,
`--root ${projectDir}`,
- program.resetCache && '--reset-cache'
+ program.resetCache && '--reset-cache',
]
.filter(x => x)
.join(' '),
- { async: true }
+ { async: true },
);
}
diff --git a/packages/react-native-storybook/src/preview/components/StoryView/style.js b/packages/react-native-storybook/src/preview/components/StoryView/style.js
index 30f5f279606e..b5fe466b9043 100644
--- a/packages/react-native-storybook/src/preview/components/StoryView/style.js
+++ b/packages/react-native-storybook/src/preview/components/StoryView/style.js
@@ -1,11 +1,11 @@
export default {
main: {
- flex: 1
+ flex: 1,
},
help: {
flex: 1,
padding: 15,
alignItems: 'center',
- justifyContent: 'center'
- }
+ justifyContent: 'center',
+ },
};
diff --git a/packages/react-native-storybook/src/preview/story_kind.js b/packages/react-native-storybook/src/preview/story_kind.js
index d9c3cce86ee7..0decf7172499 100644
--- a/packages/react-native-storybook/src/preview/story_kind.js
+++ b/packages/react-native-storybook/src/preview/story_kind.js
@@ -24,7 +24,7 @@ export default class StoryKindApi {
const _fn = () => decorated(context);
return decorator(_fn, context);
},
- fn
+ fn,
);
}
}
diff --git a/packages/react-native-storybook/src/preview/story_store.js b/packages/react-native-storybook/src/preview/story_store.js
index fc826dd5b3e7..65a8d40df25a 100644
--- a/packages/react-native-storybook/src/preview/story_store.js
+++ b/packages/react-native-storybook/src/preview/story_store.js
@@ -10,14 +10,14 @@ export default class StoryStore {
this._data[kind] = {
kind,
index: cnt++,
- stories: {}
+ stories: {},
};
}
this._data[kind].stories[name] = {
name,
index: cnt++,
- fn
+ fn,
};
}
diff --git a/packages/react-native-storybook/src/server/config.js b/packages/react-native-storybook/src/server/config.js
index 29cea4745bcf..d715cff14b43 100644
--- a/packages/react-native-storybook/src/server/config.js
+++ b/packages/react-native-storybook/src/server/config.js
@@ -123,7 +123,7 @@ export default function(configType, baseConfig, projectDir, configDir) {
...config.module,
// We need to use our and custom loaders.
...customConfig.module,
- loaders: [...config.module.loaders, ...(customConfig.module.loaders || [])]
- }
+ loaders: [...config.module.loaders, ...(customConfig.module.loaders || [])],
+ },
};
}
diff --git a/packages/react-native-storybook/src/server/config/babel.js b/packages/react-native-storybook/src/server/config/babel.js
index ab66265649ba..70ff7a9fc944 100644
--- a/packages/react-native-storybook/src/server/config/babel.js
+++ b/packages/react-native-storybook/src/server/config/babel.js
@@ -19,7 +19,7 @@ module.exports = {
// exponentiation
require.resolve('babel-preset-es2016'),
// JSX, Flow
- require.resolve('babel-preset-react')
+ require.resolve('babel-preset-react'),
],
plugins: [
// function x(a, b, c,) { }
@@ -38,8 +38,8 @@ module.exports = {
{
helpers: true,
polyfill: true,
- regenerator: true
- }
- ]
- ]
+ regenerator: true,
+ },
+ ],
+ ],
};
diff --git a/packages/react-native-storybook/src/server/config/babel.prod.js b/packages/react-native-storybook/src/server/config/babel.prod.js
index fd847f98bf7e..12359442f545 100644
--- a/packages/react-native-storybook/src/server/config/babel.prod.js
+++ b/packages/react-native-storybook/src/server/config/babel.prod.js
@@ -16,7 +16,7 @@ module.exports = {
// exponentiation
require.resolve('babel-preset-es2016'),
// JSX, Flow
- require.resolve('babel-preset-react')
+ require.resolve('babel-preset-react'),
],
plugins: [
// function x(a, b, c,) { }
@@ -35,10 +35,10 @@ module.exports = {
{
helpers: true,
polyfill: true,
- regenerator: true
- }
+ regenerator: true,
+ },
],
// Optimization: hoist JSX that never changes out of render()
- require.resolve('babel-plugin-transform-react-constant-elements')
- ]
+ require.resolve('babel-plugin-transform-react-constant-elements'),
+ ],
};
diff --git a/packages/react-native-storybook/src/server/config/defaults/webpack.config.js b/packages/react-native-storybook/src/server/config/defaults/webpack.config.js
index fe8c59b57637..0c052d8250ab 100644
--- a/packages/react-native-storybook/src/server/config/defaults/webpack.config.js
+++ b/packages/react-native-storybook/src/server/config/defaults/webpack.config.js
@@ -12,21 +12,21 @@ module.exports = storybookBaseConfig => {
loaders: [
require.resolve('style-loader'),
require.resolve('css-loader'),
- require.resolve('postcss-loader')
- ]
+ require.resolve('postcss-loader'),
+ ],
},
{
test: /\.json$/,
include: includePaths,
- loader: require.resolve('json-loader')
+ loader: require.resolve('json-loader'),
},
{
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/,
include: includePaths,
loader: require.resolve('file-loader'),
query: {
- name: 'static/media/[name].[hash:8].[ext]'
- }
+ name: 'static/media/[name].[hash:8].[ext]',
+ },
},
{
test: /\.(mp4|webm)(\?.*)?$/,
@@ -34,15 +34,15 @@ module.exports = storybookBaseConfig => {
loader: require.resolve('url-loader'),
query: {
limit: 10000,
- name: 'static/media/[name].[hash:8].[ext]'
- }
- }
+ name: 'static/media/[name].[hash:8].[ext]',
+ },
+ },
];
newConfig.postcss = () => [
autoprefixer({
- browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9']
- })
+ browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'],
+ }),
];
newConfig.resolve = {
@@ -50,8 +50,8 @@ module.exports = storybookBaseConfig => {
extensions: ['.js', '.json', ''],
alias: {
// This is to support NPM2
- 'babel-runtime/regenerator': require.resolve('babel-runtime/regenerator')
- }
+ 'babel-runtime/regenerator': require.resolve('babel-runtime/regenerator'),
+ },
};
// Return the altered config
diff --git a/packages/react-native-storybook/src/server/config/webpack.config.js b/packages/react-native-storybook/src/server/config/webpack.config.js
index 5a23efebfb6d..5f069df7932a 100644
--- a/packages/react-native-storybook/src/server/config/webpack.config.js
+++ b/packages/react-native-storybook/src/server/config/webpack.config.js
@@ -6,17 +6,17 @@ import { OccurenceOrderPlugin, includePaths, excludePaths } from './utils';
const config = {
devtool: '#cheap-module-eval-source-map',
entry: {
- manager: [require.resolve('../../manager')]
+ manager: [require.resolve('../../manager')],
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'static/[name].bundle.js',
- publicPath: '/'
+ publicPath: '/',
},
plugins: [
new OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
- new CaseSensitivePathsPlugin()
+ new CaseSensitivePathsPlugin(),
],
module: {
loaders: [
@@ -25,10 +25,10 @@ const config = {
loader: require.resolve('babel-loader'),
query: require('./babel.js'),
include: includePaths,
- exclude: excludePaths
- }
- ]
- }
+ exclude: excludePaths,
+ },
+ ],
+ },
};
export default config;
diff --git a/packages/react-native-storybook/src/server/config/webpack.config.prod.js b/packages/react-native-storybook/src/server/config/webpack.config.prod.js
index e85d2bd21c8c..80a9c34d8719 100644
--- a/packages/react-native-storybook/src/server/config/webpack.config.prod.js
+++ b/packages/react-native-storybook/src/server/config/webpack.config.prod.js
@@ -4,7 +4,7 @@ import { OccurenceOrderPlugin, includePaths, excludePaths } from './utils';
const entries = {
preview: [],
- manager: [path.resolve(__dirname, '../../manager')]
+ manager: [path.resolve(__dirname, '../../manager')],
};
const config = {
@@ -19,7 +19,7 @@ const config = {
// This works with css and image loaders too.
// This is working for storybook since, we don't use pushState urls and
// relative URLs works always.
- publicPath: '/'
+ publicPath: '/',
},
plugins: [
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
@@ -27,16 +27,16 @@ const config = {
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
- warnings: false
+ warnings: false,
},
mangle: {
- screw_ie8: true
+ screw_ie8: true,
},
output: {
comments: false,
- screw_ie8: true
- }
- })
+ screw_ie8: true,
+ },
+ }),
],
module: {
loaders: [
@@ -45,10 +45,10 @@ const config = {
loader: require.resolve('babel-loader'),
query: require('./babel.prod.js'),
include: includePaths,
- exclude: excludePaths
- }
- ]
- }
+ exclude: excludePaths,
+ },
+ ],
+ },
};
// Webpack 2 doesn't have a OccurenceOrderPlugin plugin in the production mode.
diff --git a/packages/react-native-storybook/src/server/middleware.js b/packages/react-native-storybook/src/server/middleware.js
index 881412996a5f..7b9ad36028d3 100644
--- a/packages/react-native-storybook/src/server/middleware.js
+++ b/packages/react-native-storybook/src/server/middleware.js
@@ -39,7 +39,7 @@ export default function({ projectDir, configDir, ...options }) {
const devMiddlewareOptions = {
noInfo: true,
publicPath: config.output.publicPath,
- watchOptions: config.watchOptions || {}
+ watchOptions: config.watchOptions || {},
};
const router = new Router();
@@ -56,8 +56,8 @@ export default function({ projectDir, configDir, ...options }) {
res.send(
getIndexHtml(publicPath, {
manualId: options.manualId,
- secured: options.secured
- })
+ secured: options.secured,
+ }),
);
});
diff --git a/packages/react-storybook/demo/src/stories/Button.js b/packages/react-storybook/demo/src/stories/Button.js
index 2fccb36d61a6..97a2c9f0b552 100644
--- a/packages/react-storybook/demo/src/stories/Button.js
+++ b/packages/react-storybook/demo/src/stories/Button.js
@@ -8,7 +8,7 @@ const buttonStyles = {
cursor: 'pointer',
fontSize: 15,
padding: '3px 10px',
- margin: 10
+ margin: 10,
};
const Button = ({ children, onClick }) => (
@@ -19,7 +19,7 @@ const Button = ({ children, onClick }) => (
Button.propTypes = {
children: PropTypes.string.isRequired,
- onClick: PropTypes.func
+ onClick: PropTypes.func,
};
export default Button;
diff --git a/packages/react-storybook/demo/src/stories/Welcome.js b/packages/react-storybook/demo/src/stories/Welcome.js
index 776d5c0d435c..5886c30148ad 100644
--- a/packages/react-storybook/demo/src/stories/Welcome.js
+++ b/packages/react-storybook/demo/src/stories/Welcome.js
@@ -5,18 +5,18 @@ const styles = {
margin: 15,
maxWidth: 600,
lineHeight: 1.4,
- fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif'
+ fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif',
},
logo: {
- width: 200
+ width: 200,
},
link: {
color: '#1474f3',
textDecoration: 'none',
borderBottom: '1px solid #1474f3',
- paddingBottom: 2
+ paddingBottom: 2,
},
code: {
@@ -26,14 +26,14 @@ const styles = {
border: '1px solid #eae9e9',
borderRadius: 4,
backgroundColor: '#f3f2f2',
- color: '#3a3a3a'
+ color: '#3a3a3a',
},
codeBlock: {
backgroundColor: '#f3f2f2',
padding: '1px 10px',
- margin: '10px 0'
- }
+ margin: '10px 0',
+ },
};
const codeBlock = `
diff --git a/packages/react-storybook/scripts/mocha_runner.js b/packages/react-storybook/scripts/mocha_runner.js
index 1dbdfc1fa852..4b6b7654db95 100755
--- a/packages/react-storybook/scripts/mocha_runner.js
+++ b/packages/react-storybook/scripts/mocha_runner.js
@@ -16,7 +16,7 @@ Object.keys(document.defaultView).forEach(property => {
});
global.navigator = {
- userAgent: 'node.js'
+ userAgent: 'node.js',
};
process.on('unhandledRejection', error => {
diff --git a/packages/react-storybook/src/client/manager/preview.js b/packages/react-storybook/src/client/manager/preview.js
index 808da590d9ab..208ddf109aa2 100644
--- a/packages/react-storybook/src/client/manager/preview.js
+++ b/packages/react-storybook/src/client/manager/preview.js
@@ -6,7 +6,7 @@ const iframeStyle = {
height: '100%',
border: 0,
margin: 0,
- padding: 0
+ padding: 0,
};
class Preview extends Component {
@@ -34,7 +34,7 @@ class Preview extends Component {
}
Preview.propTypes = {
- url: PropTypes.string.isRequired
+ url: PropTypes.string.isRequired,
};
export default Preview;
diff --git a/packages/react-storybook/src/client/manager/provider.js b/packages/react-storybook/src/client/manager/provider.js
index 5e7021e87e51..3a9756892097 100644
--- a/packages/react-storybook/src/client/manager/provider.js
+++ b/packages/react-storybook/src/client/manager/provider.js
@@ -22,7 +22,7 @@ export default class ReactProvider extends Provider {
renderPreview(selectedKind, selectedStory) {
const queryParams = {
selectedKind,
- selectedStory
+ selectedStory,
};
// Add the react-perf query string to the iframe if that present.
diff --git a/packages/react-storybook/src/client/preview/__tests__/client_api.js b/packages/react-storybook/src/client/preview/__tests__/client_api.js
index 91c9617878d1..2abfeb9b7b43 100644
--- a/packages/react-storybook/src/client/preview/__tests__/client_api.js
+++ b/packages/react-storybook/src/client/preview/__tests__/client_api.js
@@ -20,7 +20,7 @@ class StoryStore {
}
return kinds;
},
- []
+ [],
);
}
@@ -32,7 +32,7 @@ class StoryStore {
}
return stories;
},
- []
+ [],
);
}
@@ -44,7 +44,7 @@ class StoryStore {
}
return fn;
},
- null
+ null,
);
}
@@ -62,7 +62,7 @@ describe('preview.client_api', () => {
api.setAddon({
aa() {
data = 'foo';
- }
+ },
});
api.storiesOf('none').aa();
@@ -76,13 +76,13 @@ describe('preview.client_api', () => {
api.setAddon({
aa() {
data.push('foo');
- }
+ },
});
api.setAddon({
bb() {
data.push('bar');
- }
+ },
});
api.storiesOf('none').aa().bb();
@@ -96,7 +96,7 @@ describe('preview.client_api', () => {
api.setAddon({
aa() {
data = typeof this.add;
- }
+ },
});
api.storiesOf('none').aa();
@@ -110,13 +110,13 @@ describe('preview.client_api', () => {
api.setAddon({
aa() {
data = 'foo';
- }
+ },
});
api.setAddon({
bb() {
this.aa();
- }
+ },
});
api.storiesOf('none').bb();
@@ -131,7 +131,7 @@ describe('preview.client_api', () => {
api.setAddon({
aa() {
data = this.kind;
- }
+ },
});
api.storiesOf(kind).aa();
@@ -227,7 +227,7 @@ describe('preview.client_api', () => {
'story-1.1': () => 'story-1.1',
'story-1.2': () => 'story-1.2',
'story-2.1': () => 'story-2.1',
- 'story-2.2': () => 'story-2.2'
+ 'story-2.2': () => 'story-2.2',
};
const kind1 = api.storiesOf('kind-1');
kind1.add('story-1.1', functions['story-1.1']);
@@ -241,16 +241,16 @@ describe('preview.client_api', () => {
kind: 'kind-1',
stories: [
{ name: 'story-1.1', render: functions['story-1.1'] },
- { name: 'story-1.2', render: functions['story-1.2'] }
- ]
+ { name: 'story-1.2', render: functions['story-1.2'] },
+ ],
},
{
kind: 'kind-2',
stories: [
{ name: 'story-2.1', render: functions['story-2.1'] },
- { name: 'story-2.2', render: functions['story-2.2'] }
- ]
- }
+ { name: 'story-2.2', render: functions['story-2.2'] },
+ ],
+ },
]);
});
});
diff --git a/packages/react-storybook/src/client/preview/actions.js b/packages/react-storybook/src/client/preview/actions.js
index 81eaf57f2e28..f15e8676a205 100644
--- a/packages/react-storybook/src/client/preview/actions.js
+++ b/packages/react-storybook/src/client/preview/actions.js
@@ -2,26 +2,26 @@ export const types = {
SET_ERROR: 'PREVIEW_SET_ERROR',
CLEAR_ERROR: 'PREVIEW_CLEAR_ERROR',
SELECT_STORY: 'PREVIEW_SELECT_STORY',
- SET_INITIAL_STORY: 'PREVIEW_SET_INITIAL_STORY'
+ SET_INITIAL_STORY: 'PREVIEW_SET_INITIAL_STORY',
};
export function setInitialStory(storyKindList) {
return {
type: types.SET_INITIAL_STORY,
- storyKindList
+ storyKindList,
};
}
export function setError(error) {
return {
type: types.SET_ERROR,
- error
+ error,
};
}
export function clearError() {
return {
- type: types.CLEAR_ERROR
+ type: types.CLEAR_ERROR,
};
}
@@ -29,6 +29,6 @@ export function selectStory(kind, story) {
return {
type: types.SELECT_STORY,
kind,
- story
+ story,
};
}
diff --git a/packages/react-storybook/src/client/preview/client_api.js b/packages/react-storybook/src/client/preview/client_api.js
index e203b7b605e4..ecbabc571fae 100644
--- a/packages/react-storybook/src/client/preview/client_api.js
+++ b/packages/react-storybook/src/client/preview/client_api.js
@@ -11,7 +11,7 @@ export default class ClientApi {
setAddon(addon) {
this._addons = {
...this._addons,
- ...addon
+ ...addon,
};
}
@@ -36,7 +36,7 @@ export default class ClientApi {
const localDecorators = [];
const api = {
- kind
+ kind,
};
// apply addons
@@ -60,7 +60,7 @@ export default class ClientApi {
const fn = decorators.reduce(
(decorated, decorator) => context => decorator(() => decorated(context), context),
- getStory
+ getStory,
);
// Add the fully decorated getStory function.
diff --git a/packages/react-storybook/src/client/preview/error_display.js b/packages/react-storybook/src/client/preview/error_display.js
index 925e6f577bd1..0b4e51d8fcf6 100644
--- a/packages/react-storybook/src/client/preview/error_display.js
+++ b/packages/react-storybook/src/client/preview/error_display.js
@@ -10,7 +10,7 @@ const mainStyle = {
padding: 20,
backgroundColor: 'rgb(187, 49, 49)',
color: '#FFF',
- WebkitFontSmoothing: 'antialiased'
+ WebkitFontSmoothing: 'antialiased',
};
const headingStyle = {
@@ -21,13 +21,13 @@ const headingStyle = {
fontFamily: `
-apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI",
"Helvetica Neue", "Lucida Grande", sans-serif
- `
+ `,
};
const codeStyle = {
fontSize: 14,
width: '100vw',
- overflow: 'auto'
+ overflow: 'auto',
};
const ErrorDisplay = ({ error }) => (
@@ -42,7 +42,7 @@ const ErrorDisplay = ({ error }) => (
);
ErrorDisplay.propTypes = {
- error: PropTypes.object.isRequired
+ error: PropTypes.object.isRequired,
};
export default ErrorDisplay;
diff --git a/packages/react-storybook/src/client/preview/reducer.js b/packages/react-storybook/src/client/preview/reducer.js
index a3b7012b8637..015df6c83915 100644
--- a/packages/react-storybook/src/client/preview/reducer.js
+++ b/packages/react-storybook/src/client/preview/reducer.js
@@ -5,14 +5,14 @@ export default function reducer(state = {}, action) {
case types.CLEAR_ERROR: {
return {
...state,
- error: null
+ error: null,
};
}
case types.SET_ERROR: {
return {
...state,
- error: action.error
+ error: action.error,
};
}
@@ -20,7 +20,7 @@ export default function reducer(state = {}, action) {
return {
...state,
selectedKind: action.kind,
- selectedStory: action.story
+ selectedStory: action.story,
};
}
diff --git a/packages/react-storybook/src/client/preview/render.js b/packages/react-storybook/src/client/preview/render.js
index 565c97c1f3c5..655615635525 100644
--- a/packages/react-storybook/src/client/preview/render.js
+++ b/packages/react-storybook/src/client/preview/render.js
@@ -67,7 +67,7 @@ export function renderMain(data, storyStore) {
const context = {
kind: selectedKind,
- story: selectedStory
+ story: selectedStory,
};
const element = story(context);
@@ -79,7 +79,7 @@ export function renderMain(data, storyStore) {
description: stripIndents`
Did you forget to return the React element from the story?
Use "() => (
)" or "() => { return
; }" when defining the story.
- `
+ `,
/* eslint-enable */
};
return renderError(error);
@@ -91,7 +91,7 @@ export function renderMain(data, storyStore) {
description: stripIndents`
Seems like you are not returning a correct React element from the story.
Could you double check that?
- `
+ `,
};
return renderError(error);
}
diff --git a/packages/react-storybook/src/client/preview/story_store.js b/packages/react-storybook/src/client/preview/story_store.js
index bf19ca5045bf..0cdb82fb0122 100644
--- a/packages/react-storybook/src/client/preview/story_store.js
+++ b/packages/react-storybook/src/client/preview/story_store.js
@@ -15,14 +15,14 @@ export default class StoryStore {
this._data[kind] = {
kind,
index: getId(),
- stories: {}
+ stories: {},
};
}
this._data[kind].stories[name] = {
name,
index: getId(),
- fn
+ fn,
};
}
diff --git a/packages/react-storybook/src/server/__tests__/utils.js b/packages/react-storybook/src/server/__tests__/utils.js
index baad93ebcc10..f7eb52794e22 100644
--- a/packages/react-storybook/src/server/__tests__/utils.js
+++ b/packages/react-storybook/src/server/__tests__/utils.js
@@ -10,7 +10,7 @@ describe('server.getHeadHtml', () => {
describe('when .storybook/head.html does not exist', () => {
beforeEach(() => {
mock({
- config: {}
+ config: {},
});
});
@@ -28,8 +28,8 @@ describe('server.getHeadHtml', () => {
beforeEach(() => {
mock({
config: {
- 'head.html': HEAD_HTML_CONTENTS
- }
+ 'head.html': HEAD_HTML_CONTENTS,
+ },
});
});
diff --git a/packages/react-storybook/src/server/babel_config.js b/packages/react-storybook/src/server/babel_config.js
index f57528904fe4..a49ef43975d0 100644
--- a/packages/react-storybook/src/server/babel_config.js
+++ b/packages/react-storybook/src/server/babel_config.js
@@ -70,7 +70,7 @@ export default function(configDir) {
finalConfig.plugins = finalConfig.plugins || [];
finalConfig.plugins.push([
require.resolve('babel-plugin-react-docgen'),
- { DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES' }
+ { DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES' },
]);
return finalConfig;
diff --git a/packages/react-storybook/src/server/build.js b/packages/react-storybook/src/server/build.js
index 0fff7569d129..d63279f5449a 100644
--- a/packages/react-storybook/src/server/build.js
+++ b/packages/react-storybook/src/server/build.js
@@ -34,8 +34,8 @@ if (program.enableDb || program.dbPath) {
[
'Error: the experimental local database addon is no longer bundled with',
'react-storybook. Please remove these flags (-d,--db-path,--enable-db)',
- 'from the command or npm script and try again.'
- ].join(' ')
+ 'from the command or npm script and try again.',
+ ].join(' '),
);
process.exit(1);
}
@@ -45,7 +45,7 @@ if (program.enableDb || program.dbPath) {
getEnvConfig(program, {
staticDir: 'SBCONFIG_STATIC_DIR',
outputDir: 'SBCONFIG_OUTPUT_DIR',
- configDir: 'SBCONFIG_CONFIG_DIR'
+ configDir: 'SBCONFIG_CONFIG_DIR',
});
const configDir = program.configDir || './.storybook';
@@ -85,7 +85,7 @@ webpack(config).run((err, stats) => {
const data = {
publicPath: config.output.publicPath,
- assets: stats.toJson().assetsByChunkName
+ assets: stats.toJson().assetsByChunkName,
};
const headHtml = getHeadHtml(configDir);
diff --git a/packages/react-storybook/src/server/config.js b/packages/react-storybook/src/server/config.js
index 3176cda32965..964cb9b1c7e5 100644
--- a/packages/react-storybook/src/server/config.js
+++ b/packages/react-storybook/src/server/config.js
@@ -69,16 +69,16 @@ export default function(configType, baseConfig, configDir) {
...config.module,
// We need to use our and custom rules.
...customConfig.module,
- rules: [...config.module.rules, ...(customConfig.module.rules || [])]
+ rules: [...config.module.rules, ...(customConfig.module.rules || [])],
},
resolve: {
...config.resolve,
...customConfig.resolve,
alias: {
...config.alias,
- ...(customConfig.resolve && customConfig.resolve.alias)
- }
- }
+ ...(customConfig.resolve && customConfig.resolve.alias),
+ },
+ },
};
return newConfig;
diff --git a/packages/react-storybook/src/server/config/babel.js b/packages/react-storybook/src/server/config/babel.js
index 1a8739a9eef8..eeec410c39a3 100644
--- a/packages/react-storybook/src/server/config/babel.js
+++ b/packages/react-storybook/src/server/config/babel.js
@@ -16,5 +16,5 @@ module.exports = {
// It enables a cache directory for faster-rebuilds
// `find-cache-dir` will create the cache directory under the node_modules directory.
cacheDirectory: findCacheDir({ name: 'react-storybook' }),
- presets: ['es2015', 'es2016', 'stage-0', 'react']
+ presets: ['es2015', 'es2016', 'stage-0', 'react'],
};
diff --git a/packages/react-storybook/src/server/config/babel.prod.js b/packages/react-storybook/src/server/config/babel.prod.js
index fa7cadd05248..8383f5d34687 100644
--- a/packages/react-storybook/src/server/config/babel.prod.js
+++ b/packages/react-storybook/src/server/config/babel.prod.js
@@ -10,5 +10,5 @@
module.exports = {
// Don't try to find .babelrc because we want to force this configuration.
babelrc: false,
- presets: ['es2015', 'es2016', 'stage-0', 'react']
+ presets: ['es2015', 'es2016', 'stage-0', 'react'],
};
diff --git a/packages/react-storybook/src/server/config/defaults/webpack.config.js b/packages/react-storybook/src/server/config/defaults/webpack.config.js
index abc6f161ff91..4257105c0631 100644
--- a/packages/react-storybook/src/server/config/defaults/webpack.config.js
+++ b/packages/react-storybook/src/server/config/defaults/webpack.config.js
@@ -12,11 +12,11 @@ module.exports = storybookBaseConfig => {
options: {
postcss: [
autoprefixer({
- browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9']
- })
- ]
- }
- })
+ browsers: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'],
+ }),
+ ],
+ },
+ }),
];
newConfig.module.rules = [
...storybookBaseConfig.module.rules,
@@ -29,11 +29,11 @@ module.exports = storybookBaseConfig => {
{
loader: 'css-loader',
options: {
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
- 'postcss-loader'
- ]
+ 'postcss-loader',
+ ],
},
{
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/,
@@ -41,8 +41,8 @@ module.exports = storybookBaseConfig => {
exclude: excludePaths,
loader: 'file-loader',
query: {
- name: 'static/media/[name].[hash:8].[ext]'
- }
+ name: 'static/media/[name].[hash:8].[ext]',
+ },
},
{
test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
@@ -51,9 +51,9 @@ module.exports = storybookBaseConfig => {
loader: 'url-loader',
query: {
limit: 10000,
- name: 'static/media/[name].[hash:8].[ext]'
- }
- }
+ name: 'static/media/[name].[hash:8].[ext]',
+ },
+ },
];
// Return the altered config
diff --git a/packages/react-storybook/src/server/config/utils.js b/packages/react-storybook/src/server/config/utils.js
index e54d7a58be16..8cb15c640d93 100644
--- a/packages/react-storybook/src/server/config/utils.js
+++ b/packages/react-storybook/src/server/config/utils.js
@@ -20,7 +20,7 @@ export function loadEnv(options = {}) {
// In production we set this to dot(.) to allow the browser to access these assests
// even when deployed inside a subpath. (like in GitHub pages)
// In development this is just empty as we always serves from the root.
- PUBLIC_URL: JSON.stringify(options.production ? '.' : '')
+ PUBLIC_URL: JSON.stringify(options.production ? '.' : ''),
};
Object.keys(process.env).filter(name => /^STORYBOOK_/.test(name)).forEach(name => {
@@ -28,6 +28,6 @@ export function loadEnv(options = {}) {
});
return {
- 'process.env': env
+ 'process.env': env,
};
}
diff --git a/packages/react-storybook/src/server/config/webpack.config.js b/packages/react-storybook/src/server/config/webpack.config.js
index 53d27804f62f..5caed1b869e5 100644
--- a/packages/react-storybook/src/server/config/webpack.config.js
+++ b/packages/react-storybook/src/server/config/webpack.config.js
@@ -13,19 +13,19 @@ export default function() {
preview: [
require.resolve('./polyfills'),
require.resolve('./globals'),
- `${require.resolve('webpack-hot-middleware/client')}?reload=true`
- ]
+ `${require.resolve('webpack-hot-middleware/client')}?reload=true`,
+ ],
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'static/[name].bundle.js',
- publicPath: '/'
+ publicPath: '/',
},
plugins: [
new webpack.DefinePlugin(loadEnv()),
new webpack.HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
- new WatchMissingNodeModulesPlugin(nodeModulesPaths)
+ new WatchMissingNodeModulesPlugin(nodeModulesPaths),
],
module: {
rules: [
@@ -34,9 +34,9 @@ export default function() {
loader: require.resolve('babel-loader'),
query: babelLoaderConfig,
include: includePaths,
- exclude: excludePaths
- }
- ]
+ exclude: excludePaths,
+ },
+ ],
},
resolve: {
// Since we ship with json-loader always, it's better to move extensions to here
@@ -44,8 +44,8 @@ export default function() {
extensions: ['.js', '.json', '.jsx'],
// Add support to NODE_PATH. With this we could avoid relative path imports.
// Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253
- modules: ['node_modules'].concat(nodePaths)
- }
+ modules: ['node_modules'].concat(nodePaths),
+ },
};
return config;
diff --git a/packages/react-storybook/src/server/config/webpack.config.prod.js b/packages/react-storybook/src/server/config/webpack.config.prod.js
index 2135b7ba0edf..989b1adca7ad 100644
--- a/packages/react-storybook/src/server/config/webpack.config.prod.js
+++ b/packages/react-storybook/src/server/config/webpack.config.prod.js
@@ -6,7 +6,7 @@ import { includePaths, excludePaths, loadEnv, nodePaths } from './utils';
export default function() {
const entries = {
preview: [require.resolve('./polyfills'), require.resolve('./globals')],
- manager: [require.resolve('./polyfills'), path.resolve(__dirname, '../../client/manager')]
+ manager: [require.resolve('./polyfills'), path.resolve(__dirname, '../../client/manager')],
};
const config = {
@@ -20,21 +20,21 @@ export default function() {
// This works with css and image loaders too.
// This is working for storybook since, we don't use pushState urls and
// relative URLs works always.
- publicPath: ''
+ publicPath: '',
},
plugins: [
new webpack.DefinePlugin(loadEnv({ production: true })),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
- warnings: false
+ warnings: false,
},
mangle: false,
output: {
comments: false,
- screw_ie8: true
- }
- })
+ screw_ie8: true,
+ },
+ }),
],
module: {
rules: [
@@ -43,9 +43,9 @@ export default function() {
loader: require.resolve('babel-loader'),
query: babelLoaderConfig,
include: includePaths,
- exclude: excludePaths
- }
- ]
+ exclude: excludePaths,
+ },
+ ],
},
resolve: {
// Since we ship with json-loader always, it's better to move extensions to here
@@ -53,8 +53,8 @@ export default function() {
extensions: ['.js', '.json', '.jsx'],
// Add support to NODE_PATH. With this we could avoid relative path imports.
// Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253
- modules: ['node_modules'].concat(nodePaths)
- }
+ modules: ['node_modules'].concat(nodePaths),
+ },
};
return config;
diff --git a/packages/react-storybook/src/server/iframe.html.js b/packages/react-storybook/src/server/iframe.html.js
index 9121754c3878..8c6d19ef77c2 100644
--- a/packages/react-storybook/src/server/iframe.html.js
+++ b/packages/react-storybook/src/server/iframe.html.js
@@ -11,19 +11,19 @@ import url from 'url';
const previewUrlsFromAssets = assets => {
if (!assets) {
return {
- js: 'static/preview.bundle.js'
+ js: 'static/preview.bundle.js',
};
}
if (typeof assets.preview === 'string') {
return {
- js: assets.preview
+ js: assets.preview,
};
}
return {
js: assets.preview.find(filename => filename.match(/\.js$/)),
- css: assets.preview.find(filename => filename.match(/\.css$/))
+ css: assets.preview.find(filename => filename.match(/\.css$/)),
};
};
diff --git a/packages/react-storybook/src/server/index.html.js b/packages/react-storybook/src/server/index.html.js
index d17ed3ae81bc..ae3135133f11 100644
--- a/packages/react-storybook/src/server/index.html.js
+++ b/packages/react-storybook/src/server/index.html.js
@@ -11,19 +11,19 @@ import { version } from '../../package.json';
const managerUrlsFromAssets = assets => {
if (!assets || !assets.manager) {
return {
- js: 'static/manager.bundle.js'
+ js: 'static/manager.bundle.js',
};
}
if (typeof assets.manager === 'string') {
return {
- js: assets.manager
+ js: assets.manager,
};
}
return {
js: assets.manager.find(filename => filename.match(/\.js$/)),
- css: assets.manager.find(filename => filename.match(/\.css$/))
+ css: assets.manager.find(filename => filename.match(/\.css$/)),
};
};
diff --git a/packages/react-storybook/src/server/index.js b/packages/react-storybook/src/server/index.js
index ebef9441a942..962480c37702 100755
--- a/packages/react-storybook/src/server/index.js
+++ b/packages/react-storybook/src/server/index.js
@@ -26,12 +26,12 @@ program
.option('--dont-track', 'Do not send anonymous usage stats.')
.option(
'--https',
- 'Serve Storybook over HTTPS. Note: You must provide your own certificate information.'
+ 'Serve Storybook over HTTPS. Note: You must provide your own certificate information.',
)
.option(
'--ssl-ca
',
'Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)',
- parseList
+ parseList,
)
.option('--ssl-cert ', 'Provide an SSL certificate. (Required with --https)')
.option('--ssl-key ', 'Provide an SSL key. (Required with --https)')
@@ -46,8 +46,8 @@ if (program.enableDb || program.dbPath) {
[
'Error: the experimental local database addon is no longer bundled with',
'react-storybook. Please remove these flags (-d,--db-path,--enable-db)',
- 'from the command or npm script and try again.'
- ].join(' ')
+ 'from the command or npm script and try again.',
+ ].join(' '),
);
process.exit(1);
}
@@ -59,7 +59,7 @@ getEnvConfig(program, {
host: 'SBCONFIG_HOSTNAME',
staticDir: 'SBCONFIG_STATIC_DIR',
configDir: 'SBCONFIG_CONFIG_DIR',
- dontTrack: 'SBCONFIG_DO_NOT_TRACK'
+ dontTrack: 'SBCONFIG_DO_NOT_TRACK',
});
if (program.dontTrack) {
@@ -95,7 +95,7 @@ if (program.https) {
const sslOptions = {
ca: (program.sslCa || []).map(ca => fs.readFileSync(ca, 'utf-8')),
cert: fs.readFileSync(program.sslCert, 'utf-8'),
- key: fs.readFileSync(program.sslKey, 'utf-8')
+ key: fs.readFileSync(program.sslKey, 'utf-8'),
};
server = https.createServer(sslOptions, app);
diff --git a/packages/react-storybook/src/server/middleware.js b/packages/react-storybook/src/server/middleware.js
index 2a94ca5e2170..fb2c27b64e09 100644
--- a/packages/react-storybook/src/server/middleware.js
+++ b/packages/react-storybook/src/server/middleware.js
@@ -24,7 +24,7 @@ export default function(configDir) {
const devMiddlewareOptions = {
noInfo: true,
publicPath: config.output.publicPath,
- watchOptions: config.watchOptions || {}
+ watchOptions: config.watchOptions || {},
};
const router = new Router();
diff --git a/packages/react-storybook/src/server/track_usage.js b/packages/react-storybook/src/server/track_usage.js
index 45c3821fabe8..cec6d02a9169 100644
--- a/packages/react-storybook/src/server/track_usage.js
+++ b/packages/react-storybook/src/server/track_usage.js
@@ -68,10 +68,10 @@ export function track() {
{
json: {
userId,
- version: pkg.version
- }
+ version: pkg.version,
+ },
},
- () => {}
+ () => {},
);
if (!store.get('startTrackingOn')) {
diff --git a/packages/storybook-ui/example/client/preview.js b/packages/storybook-ui/example/client/preview.js
index 4064861613bf..11c719ff542e 100644
--- a/packages/storybook-ui/example/client/preview.js
+++ b/packages/storybook-ui/example/client/preview.js
@@ -2,7 +2,7 @@ import React from 'react';
const mainStyle = {
padding: 10,
- fontFamily: 'arial'
+ fontFamily: 'arial',
};
export default class Preview extends React.Component {
@@ -15,13 +15,13 @@ export default class Preview extends React.Component {
if (this.mounted) {
this.setState({
kind,
- story
+ story,
});
} else {
this.state = {
...this.state,
kind,
- story
+ story,
};
}
});
diff --git a/packages/storybook-ui/example/client/provider.js b/packages/storybook-ui/example/client/provider.js
index 205497a288bc..e95f76c55c00 100644
--- a/packages/storybook-ui/example/client/provider.js
+++ b/packages/storybook-ui/example/client/provider.js
@@ -11,7 +11,7 @@ const style = {
flex: 1,
display: 'flex',
alignItems: 'center',
- justifyContent: 'center'
+ justifyContent: 'center',
};
export default class ReactProvider extends Provider {
@@ -43,20 +43,20 @@ export default class ReactProvider extends Provider {
/>
);
- }
+ },
},
test2: {
title: 'Test 2',
- render: () =>