Date: Tue, 6 Jun 2017 16:34:36 +0200
Subject: [PATCH 56/60] FIX linting
---
addons/comments/src/stories/index.js | 3 +++
addons/storyshots/src/index.js | 1 +
.../stories/required_with_context/Welcome.js | 1 +
docs/loaders/markdown-loader/index.js | 10 ++++++----
examples/cra-storybook/src/stories/Welcome.js | 1 +
examples/test-cra/src/stories/ComponentWithRef.js | 3 ++-
examples/test-cra/src/stories/Welcome.js | 1 +
lib/channel-websocket/src/index.js | 6 ++++--
lib/cli/generators/.eslintrc.js | 1 +
9 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/addons/comments/src/stories/index.js b/addons/comments/src/stories/index.js
index f086592d0fa1..32dbf81bf158 100644
--- a/addons/comments/src/stories/index.js
+++ b/addons/comments/src/stories/index.js
@@ -1,6 +1,9 @@
+/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved */
+
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
+
import Button from '../index';
import CommentForm from '../manager/components/CommentForm';
import CommentList from '../manager/components/CommentList';
diff --git a/addons/storyshots/src/index.js b/addons/storyshots/src/index.js
index 0c25c5cc753c..b24b308b2189 100644
--- a/addons/storyshots/src/index.js
+++ b/addons/storyshots/src/index.js
@@ -2,6 +2,7 @@ import path from 'path';
import global, { describe, it } from 'global';
import readPkgUp from 'read-pkg-up';
import addons from '@storybook/addons';
+
import runWithRequireContext from './require_context';
import createChannel from './storybook-channel-mock';
import { snapshot } from './test-bodies';
diff --git a/addons/storyshots/stories/required_with_context/Welcome.js b/addons/storyshots/stories/required_with_context/Welcome.js
index 9f9de6526a80..da876d5e6849 100644
--- a/addons/storyshots/stories/required_with_context/Welcome.js
+++ b/addons/storyshots/stories/required_with_context/Welcome.js
@@ -37,6 +37,7 @@ const styles = {
},
};
+// eslint-disable-next-line no-console
const log = () => console.log('Welcome to storybook!');
export default class Welcome extends React.Component {
diff --git a/docs/loaders/markdown-loader/index.js b/docs/loaders/markdown-loader/index.js
index e262a5fcc351..18594030f0c6 100644
--- a/docs/loaders/markdown-loader/index.js
+++ b/docs/loaders/markdown-loader/index.js
@@ -6,18 +6,20 @@ const hljs = require('highlight.js');
const path = require('path');
const loaderUtils = require('loader-utils');
+const logger = console;
+
const highlight = (str, lang) => {
if (lang !== null && hljs.getLanguage(lang)) {
try {
return hljs.highlight(lang, str).value;
- } catch (_error) {
- console.error(_error);
+ } catch (error) {
+ logger.error(error);
}
}
try {
return hljs.highlightAuto(str).value;
- } catch (_error) {
- console.error(_error);
+ } catch (error) {
+ logger.error(error);
}
return '';
};
diff --git a/examples/cra-storybook/src/stories/Welcome.js b/examples/cra-storybook/src/stories/Welcome.js
index 8d2cbafbd11e..65384f40d233 100644
--- a/examples/cra-storybook/src/stories/Welcome.js
+++ b/examples/cra-storybook/src/stories/Welcome.js
@@ -37,6 +37,7 @@ const styles = {
},
};
+// eslint-disable-next-line no-console
const log = () => console.log('Welcome to storybook!');
export default class Welcome extends React.Component {
diff --git a/examples/test-cra/src/stories/ComponentWithRef.js b/examples/test-cra/src/stories/ComponentWithRef.js
index 7fe99ad48767..bdee0751d792 100644
--- a/examples/test-cra/src/stories/ComponentWithRef.js
+++ b/examples/test-cra/src/stories/ComponentWithRef.js
@@ -3,8 +3,9 @@ import React, { Component } from 'react';
class ComponentWithRef extends Component {
componentDidMount() {
// Read the scroll width off the DOM element
- console.log(this.ref.scrollWidth);
+ this.scrollWidth = this.ref.scrollWidth;
}
+ scrollWidth: 0;
render() {
return (this.ref = r)} />;
}
diff --git a/examples/test-cra/src/stories/Welcome.js b/examples/test-cra/src/stories/Welcome.js
index a97ab5c7421f..3fe771b21221 100644
--- a/examples/test-cra/src/stories/Welcome.js
+++ b/examples/test-cra/src/stories/Welcome.js
@@ -35,6 +35,7 @@ const styles = {
},
};
+// eslint-disable-next-line no-console
const log = () => console.log('Welcome to storybook!');
export default class Welcome extends React.Component {
diff --git a/lib/channel-websocket/src/index.js b/lib/channel-websocket/src/index.js
index 86257d5662aa..4d66268a6cb5 100644
--- a/lib/channel-websocket/src/index.js
+++ b/lib/channel-websocket/src/index.js
@@ -3,6 +3,8 @@
import { WebSocket } from 'global';
import Channel from '@storybook/channels';
+const logger = console;
+
export class WebsocketTransport {
constructor({ url }) {
this._socket = null;
@@ -50,10 +52,10 @@ export class WebsocketTransport {
this._handler(event);
};
this._socket.onerror = e => {
- console.error('websocket: connection error', e.message);
+ logger.error('websocket: connection error', e.message);
};
this._socket.onclose = e => {
- console.error('websocket: connection closed', e.code, e.reason);
+ logger.error('websocket: connection closed', e.code, e.reason);
};
}
}
diff --git a/lib/cli/generators/.eslintrc.js b/lib/cli/generators/.eslintrc.js
index 21722691e859..12e147cfff01 100644
--- a/lib/cli/generators/.eslintrc.js
+++ b/lib/cli/generators/.eslintrc.js
@@ -6,5 +6,6 @@ module.exports = {
'import/no-extraneous-dependencies': ignore,
'import/extensions': ignore,
'global-require': ignore,
+ 'no-console': ignore,
},
};
From 921daab915a62ba4c68d6a7336a547261dabaa4b Mon Sep 17 00:00:00 2001
From: Norbert de Langen
Date: Tue, 6 Jun 2017 17:40:40 +0200
Subject: [PATCH 57/60] ADD eslint config for .json files && FIX linting
---
.eslintrc.js | 2 +-
addons/storyshots/package.json | 1 +
lib/cli/package.json | 2 +-
package.json | 3 ++-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index ff60f0de96a7..e30a1b5fde05 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -5,7 +5,7 @@ const ignore = 0;
module.exports = {
root: true,
extends: ['eslint-config-airbnb', 'plugin:jest/recommended', 'prettier'],
- plugins: ['prettier', 'jest', 'react'],
+ plugins: ['prettier', 'jest', 'react', 'json'],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
diff --git a/addons/storyshots/package.json b/addons/storyshots/package.json
index 70c0a1b1bb69..f835e425ad45 100644
--- a/addons/storyshots/package.json
+++ b/addons/storyshots/package.json
@@ -29,6 +29,7 @@
},
"peerDependencies": {
"@storybook/addons": "^3.0.0",
+ "@storybook/channels": "^3.0.0",
"react": "*",
"react-test-renderer": "*",
"babel-core": "^6.24.1"
diff --git a/lib/cli/package.json b/lib/cli/package.json
index b6de9e544a50..9aded5492878 100644
--- a/lib/cli/package.json
+++ b/lib/cli/package.json
@@ -14,7 +14,7 @@
"generator",
"cli"
],
- "author": "",
+ "author": "Storybook Team",
"license": "MIT",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
diff --git a/package.json b/package.json
index 1f444d2d9eb3..7895ae88098f 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"github-release": "github-release-from-changelog",
"import-repo": "lerna import",
"lint": "npm run lint:js && npm run lint:md",
- "lint:js": "eslint . --cache --cache-location=.cache/eslint --ext .js,.jsx",
+ "lint:js": "eslint . --cache --cache-location=.cache/eslint --ext .js,.jsx,.json",
"lint:md": "remark .",
"publish": "lerna publish",
"test": "jest",
@@ -42,6 +42,7 @@
"eslint-config-prettier": "^2.1.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jest": "^20.0.3",
+ "eslint-plugin-json": "^1.2.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-prettier": "^2.1.1",
"eslint-plugin-react": "^7.0.1",
From 28a4b32323295a41a4ea1d896b51a24993e96bed Mon Sep 17 00:00:00 2001
From: Norbert de Langen
Date: Tue, 6 Jun 2017 17:45:57 +0200
Subject: [PATCH 58/60] CHANGE all package.jsons so they are uniformly sorted
---
addons/actions/package.json | 34 +++++++++++-----------
addons/centered/package.json | 4 +--
addons/graphql/package.json | 32 ++++++++++-----------
addons/info/package.json | 26 ++++++++---------
addons/knobs/package.json | 40 +++++++++++++-------------
addons/links/package.json | 32 ++++++++++-----------
addons/notes/package.json | 30 ++++++++++----------
addons/options/package.json | 32 ++++++++++-----------
addons/storyshots/package.json | 24 ++++++++--------
app/react-native/package.json | 42 ++++++++++++++--------------
app/react/package.json | 8 +++---
examples/cra-storybook/package.json | 30 ++++++++++----------
examples/test-cra/package.json | 2 +-
lib/addons/package.json | 20 ++++++-------
lib/channel-postmessage/package.json | 8 +++---
lib/channel-websocket/package.json | 8 +++---
lib/channels/package.json | 2 +-
lib/cli/package.json | 26 ++++++++---------
lib/codemod/package.json | 10 +++----
lib/ui/package.json | 16 +++++------
package.json | 10 +++----
21 files changed, 218 insertions(+), 218 deletions(-)
diff --git a/addons/actions/package.json b/addons/actions/package.json
index 9e6f1e337b5c..4981952747d5 100644
--- a/addons/actions/package.json
+++ b/addons/actions/package.json
@@ -2,29 +2,23 @@
"name": "@storybook/addon-actions",
"version": "3.0.1",
"description": "Action Logger addon for storybook",
- "main": "dist/index.js",
- "scripts": {
- "deploy-storybook": "storybook-to-ghpages",
- "prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9001"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/storybooks/storybook.git"
- },
"keywords": [
"storybook"
],
- "license": "MIT",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/addons/actions",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/addons/actions",
- "devDependencies": {
- "react": "^15.5.4",
- "react-dom": "^15.5.4",
- "react-test-renderer": "^15.5.4",
- "shelljs": "^0.7.7"
+ "license": "MIT",
+ "main": "dist/index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
+ "scripts": {
+ "deploy-storybook": "storybook-to-ghpages",
+ "prepublish": "node ../../scripts/prepublish.js",
+ "storybook": "start-storybook -p 9001"
},
"dependencies": {
"@storybook/addons": "^3.0.0",
@@ -33,6 +27,12 @@
"prop-types": "^15.5.8",
"react-inspector": "^2.0.0"
},
+ "devDependencies": {
+ "react": "^15.5.4",
+ "react-dom": "^15.5.4",
+ "react-test-renderer": "^15.5.4",
+ "shelljs": "^0.7.7"
+ },
"peerDependencies": {
"react": "*",
"react-dom": "*"
diff --git a/addons/centered/package.json b/addons/centered/package.json
index f56cf5198675..02997e85f1aa 100644
--- a/addons/centered/package.json
+++ b/addons/centered/package.json
@@ -2,12 +2,12 @@
"name": "@storybook/addon-centered",
"version": "3.0.0",
"description": "Storybook decorator to center components",
+ "license": "MIT",
+ "author": "Muhammed Thanish ",
"main": "dist/index.js",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js"
},
- "author": "Muhammed Thanish ",
- "license": "MIT",
"peerDependencies": {
"react": "*"
}
diff --git a/addons/graphql/package.json b/addons/graphql/package.json
index 7704f549ce77..69bb2f81a74c 100644
--- a/addons/graphql/package.json
+++ b/addons/graphql/package.json
@@ -2,28 +2,23 @@
"name": "@storybook/addon-graphql",
"version": "3.0.0",
"description": "Storybook addon to display the GraphiQL IDE",
- "main": "dist/index.js",
- "scripts": {
- "deploy-storybook": "storybook-to-ghpages",
- "prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9001"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/storybooks/storybook.git"
- },
"keywords": [
"storybook"
],
- "license": "MIT",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/addons/graphql",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/addons/graphql",
- "devDependencies": {
- "react": "^15.5.4",
- "react-dom": "^15.5.4",
- "shelljs": "^0.7.7"
+ "license": "MIT",
+ "main": "dist/index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
+ "scripts": {
+ "deploy-storybook": "storybook-to-ghpages",
+ "prepublish": "node ../../scripts/prepublish.js",
+ "storybook": "start-storybook -p 9001"
},
"dependencies": {
"global": "^4.3.2",
@@ -31,6 +26,11 @@
"graphql": "^0.7.0",
"prop-types": "^15.5.10"
},
+ "devDependencies": {
+ "react": "^15.5.4",
+ "react-dom": "^15.5.4",
+ "shelljs": "^0.7.7"
+ },
"peerDependencies": {
"react": "*"
}
diff --git a/addons/info/package.json b/addons/info/package.json
index 4e88c234f5ce..bd3da41c3a82 100644
--- a/addons/info/package.json
+++ b/addons/info/package.json
@@ -2,15 +2,24 @@
"name": "@storybook/addon-info",
"version": "3.0.1",
"description": "A Storybook addon to show additional information for your stories.",
+ "license": "MIT",
+ "main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "license": "MIT",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9010",
- "publish-storybook": "bash .scripts/publish_storybook.sh"
+ "publish-storybook": "bash .scripts/publish_storybook.sh",
+ "storybook": "start-storybook -p 9010"
+ },
+ "dependencies": {
+ "@storybook/addons": "^3.0.0",
+ "babel-runtime": "^6.23.0",
+ "global": "^4.3.2",
+ "marksy": "^1.0.1",
+ "prop-types": "^15.5.8",
+ "react-addons-create-fragment": "^15.5.3"
},
"devDependencies": {
"git-url-parse": "^6.2.2",
@@ -21,14 +30,5 @@
},
"peerDependencies": {
"react": "*"
- },
- "dependencies": {
- "@storybook/addons": "^3.0.0",
- "babel-runtime": "^6.23.0",
- "global": "^4.3.2",
- "marksy": "^1.0.1",
- "prop-types": "^15.5.8",
- "react-addons-create-fragment": "^15.5.3"
- },
- "main": "dist/index.js"
+ }
}
diff --git a/addons/knobs/package.json b/addons/knobs/package.json
index 05db6b2c9764..1ebd4f29b76c 100644
--- a/addons/knobs/package.json
+++ b/addons/knobs/package.json
@@ -2,16 +2,31 @@
"name": "@storybook/addon-knobs",
"version": "3.0.1",
"description": "Storybook Addon Prop Editor Component",
+ "license": "MIT",
+ "main": "dist/index.js",
+ "typings": "./storybook-addon-knobs.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "license": "MIT",
"scripts": {
- "start": "./example/prepublish.sh",
"prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9010",
- "publish-storybook": "bash .scripts/publish_storybook.sh"
+ "publish-storybook": "bash .scripts/publish_storybook.sh",
+ "start": "./example/prepublish.sh",
+ "storybook": "start-storybook -p 9010"
+ },
+ "dependencies": {
+ "@storybook/addons": "*",
+ "babel-runtime": "^6.23.0",
+ "deep-equal": "^1.0.1",
+ "global": "^4.3.2",
+ "insert-css": "^1.0.0",
+ "lodash.debounce": "^4.0.8",
+ "moment": "^2.18.1",
+ "prop-types": "^15.5.8",
+ "react-color": "^2.11.4",
+ "react-datetime": "^2.8.10",
+ "react-textarea-autosize": "^4.3.0"
},
"devDependencies": {
"@types/node": "^7.0.12",
@@ -27,20 +42,5 @@
"peerDependencies": {
"react": "*",
"react-dom": "*"
- },
- "dependencies": {
- "@storybook/addons": "*",
- "babel-runtime": "^6.23.0",
- "deep-equal": "^1.0.1",
- "global": "^4.3.2",
- "insert-css": "^1.0.0",
- "lodash.debounce": "^4.0.8",
- "moment": "^2.18.1",
- "prop-types": "^15.5.8",
- "react-color": "^2.11.4",
- "react-datetime": "^2.8.10",
- "react-textarea-autosize": "^4.3.0"
- },
- "main": "dist/index.js",
- "typings": "./storybook-addon-knobs.d.ts"
+ }
}
diff --git a/addons/links/package.json b/addons/links/package.json
index 4c482efb70fa..0db1b6687221 100644
--- a/addons/links/package.json
+++ b/addons/links/package.json
@@ -2,35 +2,35 @@
"name": "@storybook/addon-links",
"version": "3.0.0",
"description": "Story Links addon for storybook",
+ "keywords": [
+ "storybook"
+ ],
+ "homepage": "https://github.com/storybooks/storybook/tree/master/addons/links",
+ "bugs": {
+ "url": "https://github.com/storybooks/storybook/issues"
+ },
+ "license": "MIT",
"main": "dist/index.js",
+ "typings": "./storybook-addon-links.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
"scripts": {
"deploy-storybook": "storybook-to-ghpages",
"prepublish": "node ../../scripts/prepublish.js",
"storybook": "start-storybook -p 9001"
},
- "repository": {
- "type": "git",
- "url": "https://github.com/storybooks/storybook.git"
- },
- "keywords": [
- "storybook"
- ],
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/storybooks/storybook/issues"
+ "dependencies": {
+ "@storybook/addons": "^3.0.0"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/addons/links",
"devDependencies": {
"react": "^15.5.4",
"react-dom": "^15.5.4",
"shelljs": "^0.7.7"
},
- "dependencies": {
- "@storybook/addons": "^3.0.0"
- },
"peerDependencies": {
"react": "*",
"react-dom": "*"
- },
- "typings": "./storybook-addon-links.d.ts"
+ }
}
diff --git a/addons/notes/package.json b/addons/notes/package.json
index b92a6a2f16a9..d9b4d65bacf2 100644
--- a/addons/notes/package.json
+++ b/addons/notes/package.json
@@ -2,15 +2,26 @@
"name": "@storybook/addon-notes",
"version": "3.0.0",
"description": "Write notes for your Storybook stories.",
+ "keywords": [
+ "addon",
+ "react",
+ "storybook"
+ ],
+ "license": "MIT",
+ "main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "license": "MIT",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9010",
- "publish-storybook": "bash .scripts/publish_storybook.sh"
+ "publish-storybook": "bash .scripts/publish_storybook.sh",
+ "storybook": "start-storybook -p 9010"
+ },
+ "dependencies": {
+ "@storybook/addons": "*",
+ "babel-runtime": "^6.23.0",
+ "prop-types": "^15.5.10"
},
"devDependencies": {
"git-url-parse": "^6.2.2",
@@ -21,18 +32,7 @@
"peerDependencies": {
"react": "*"
},
- "dependencies": {
- "@storybook/addons": "*",
- "babel-runtime": "^6.23.0",
- "prop-types": "^15.5.10"
- },
"optionalDependencies": {
"@types/react": "^15.0.24"
- },
- "main": "dist/index.js",
- "keywords": [
- "react",
- "storybook",
- "addon"
- ]
+ }
}
diff --git a/addons/options/package.json b/addons/options/package.json
index 0948f42fa642..523daa4fc788 100644
--- a/addons/options/package.json
+++ b/addons/options/package.json
@@ -2,35 +2,35 @@
"name": "@storybook/addon-options",
"version": "3.0.1",
"description": "Options addon for storybook",
- "main": "preview.js",
- "scripts": {
- "prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9001"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/storybooks/storybook.git"
- },
"keywords": [
"storybook"
],
- "license": "MIT",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/addons/options",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/addons/options",
+ "license": "MIT",
+ "main": "preview.js",
+ "typings": "./storybook-addon-options.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
+ "scripts": {
+ "prepublish": "node ../../scripts/prepublish.js",
+ "storybook": "start-storybook -p 9001"
+ },
+ "dependencies": {
+ "@storybook/addons": "^3.0.0"
+ },
"devDependencies": {
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"shelljs": "^0.7.7"
},
- "dependencies": {
- "@storybook/addons": "^3.0.0"
- },
"peerDependencies": {
"react": "*",
"react-dom": "*"
- },
- "typings": "./storybook-addon-options.d.ts"
+ }
}
diff --git a/addons/storyshots/package.json b/addons/storyshots/package.json
index f835e425ad45..cecc29b63e5c 100644
--- a/addons/storyshots/package.json
+++ b/addons/storyshots/package.json
@@ -2,16 +2,22 @@
"name": "@storybook/addon-storyshots",
"version": "3.0.0",
"description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.",
+ "license": "MIT",
+ "main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "license": "MIT",
- "main": "dist/index.js",
"scripts": {
+ "build-storybook": "build-storybook",
"prepublish": "babel ./src --out-dir ./dist",
- "storybook": "start-storybook -p 6006",
- "build-storybook": "build-storybook"
+ "storybook": "start-storybook -p 6006"
+ },
+ "dependencies": {
+ "babel-runtime": "^6.23.0",
+ "global": "^4.3.2",
+ "prop-types": "^15.5.8",
+ "read-pkg-up": "^2.0.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
@@ -21,17 +27,11 @@
"react": "^15.5.4",
"react-dom": "^15.5.4"
},
- "dependencies": {
- "babel-runtime": "^6.23.0",
- "global": "^4.3.2",
- "prop-types": "^15.5.8",
- "read-pkg-up": "^2.0.0"
- },
"peerDependencies": {
"@storybook/addons": "^3.0.0",
"@storybook/channels": "^3.0.0",
+ "babel-core": "^6.24.1",
"react": "*",
- "react-test-renderer": "*",
- "babel-core": "^6.24.1"
+ "react-test-renderer": "*"
}
}
diff --git a/app/react-native/package.json b/app/react-native/package.json
index d74bbeb6936f..9dea928d74da 100644
--- a/app/react-native/package.json
+++ b/app/react-native/package.json
@@ -2,36 +2,26 @@
"name": "@storybook/react-native",
"version": "3.0.1",
"description": "A better way to develop React Native Components for your app",
- "main": "dist/index.js",
- "bin": {
- "storybook": "dist/bin/storybook.js"
- },
- "scripts": {
- "prepublish": "node ../../scripts/prepublish.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/storybooks/storybook.git"
- },
"keywords": [
"react",
"react-native",
"storybook"
],
- "license": "MIT",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/app/react-native",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/app/react-native",
- "peerDependencies": {
- "react": "*",
- "react-native": "0.27.0 - 0.43.x"
+ "license": "MIT",
+ "main": "dist/index.js",
+ "bin": {
+ "storybook": "dist/bin/storybook.js"
},
- "devDependencies": {
- "babel-cli": "^6.24.1",
- "react": "^15.5.4",
- "react-dom": "^15.5.4",
- "react-native": "^0.43.3"
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
+ "scripts": {
+ "prepublish": "node ../../scripts/prepublish.js"
},
"dependencies": {
"@storybook/addon-actions": "^3.0.1",
@@ -74,5 +64,15 @@
"webpack-dev-middleware": "^1.10.1",
"webpack-hot-middleware": "^2.18.0",
"ws": "^3.0.0"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.24.1",
+ "react": "^15.5.4",
+ "react-dom": "^15.5.4",
+ "react-native": "^0.43.3"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-native": "0.27.0 - 0.43.x"
}
}
diff --git a/app/react/package.json b/app/react/package.json
index 5c1be56d8256..29439b5b8c5e 100644
--- a/app/react/package.json
+++ b/app/react/package.json
@@ -2,6 +2,10 @@
"name": "@storybook/react",
"version": "3.0.1",
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/apps/react",
+ "bugs": {
+ "url": "https://github.com/storybooks/storybook/issues"
+ },
"license": "MIT",
"main": "dist/client/index.js",
"typings": "./config/storybook.d.ts",
@@ -14,10 +18,6 @@
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "bugs": {
- "url": "https://github.com/storybooks/storybook/issues"
- },
- "homepage": "https://github.com/storybooks/storybook/tree/master/apps/react",
"scripts": {
"dev": "DEV_BUILD=1 nodemon --watch ./src --exec 'npm run prepublish'",
"prepublish": "node ../../scripts/prepublish.js"
diff --git a/examples/cra-storybook/package.json b/examples/cra-storybook/package.json
index 32193ec4d8d3..768e19745d0a 100644
--- a/examples/cra-storybook/package.json
+++ b/examples/cra-storybook/package.json
@@ -1,13 +1,13 @@
{
"name": "cra-storybook",
"version": "1.0.0",
- "private": true,
- "devDependencies": {
- "@storybook/react": "3.0.0",
- "@storybook/addons": "3.0.0",
- "@storybook/addon-actions": "3.0.0",
- "@storybook/addon-links": "3.0.0",
- "react-scripts": "1.0.1"
+ "scripts": {
+ "build": "react-scripts build",
+ "build-storybook": "build-storybook -s public",
+ "eject": "react-scripts eject",
+ "start": "react-scripts start",
+ "storybook": "start-storybook -p 9009 -s public",
+ "test": "react-scripts test --env=jsdom"
},
"dependencies": {
"global": "^4.3.2",
@@ -15,12 +15,12 @@
"react": "^15.5.4",
"react-dom": "^15.5.4"
},
- "scripts": {
- "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test --env=jsdom",
- "eject": "react-scripts eject",
- "storybook": "start-storybook -p 9009 -s public",
- "build-storybook": "build-storybook -s public"
- }
+ "devDependencies": {
+ "@storybook/addon-actions": "3.0.0",
+ "@storybook/addon-links": "3.0.0",
+ "@storybook/addons": "3.0.0",
+ "@storybook/react": "3.0.0",
+ "react-scripts": "1.0.1"
+ },
+ "private": true
}
diff --git a/examples/test-cra/package.json b/examples/test-cra/package.json
index 62787850e64c..a26cae7fe97a 100644
--- a/examples/test-cra/package.json
+++ b/examples/test-cra/package.json
@@ -19,12 +19,12 @@
"devDependencies": {
"@storybook/addon-actions": "file:../../addons/actions",
"@storybook/addon-links": "file:../../addons/links",
+ "@storybook/addon-storyshots": "file:../../addons/storyshots",
"@storybook/addons": "file:../../lib/addons",
"@storybook/channel-postmessage": "file:../../lib/channel-postmessage",
"@storybook/channels": "file:../../lib/channels",
"@storybook/react": "file:../../app/react",
"@storybook/ui": "file:../../lib/ui",
- "@storybook/addon-storyshots": "file:../../addons/storyshots",
"react-scripts": "1.0.2",
"react-test-renderer": "^15.4.2"
},
diff --git a/lib/addons/package.json b/lib/addons/package.json
index b2db3f0c33dd..53d8b03919cc 100644
--- a/lib/addons/package.json
+++ b/lib/addons/package.json
@@ -2,22 +2,22 @@
"name": "@storybook/addons",
"version": "3.0.0",
"description": "Storybook addons store",
- "main": "dist/index.js",
- "scripts": {
- "prepublish": "node ../../scripts/prepublish.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/storybooks/storybook.git"
- },
"keywords": [
"storybook"
],
- "license": "MIT",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/packages/addons",
"bugs": {
"url": "https://github.com/storybooks/storybook/issues"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/packages/addons",
+ "license": "MIT",
+ "main": "dist/index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
+ "scripts": {
+ "prepublish": "node ../../scripts/prepublish.js"
+ },
"devDependencies": {
"shelljs": "^0.7.7"
}
diff --git a/lib/channel-postmessage/package.json b/lib/channel-postmessage/package.json
index 24bae1e2748a..6664fb735fd8 100644
--- a/lib/channel-postmessage/package.json
+++ b/lib/channel-postmessage/package.json
@@ -2,17 +2,17 @@
"name": "@storybook/channel-postmessage",
"version": "3.0.0",
"description": "",
+ "license": "MIT",
"main": "dist/index.js",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js"
},
- "license": "MIT",
- "devDependencies": {
- "shelljs": "^0.7.7"
- },
"dependencies": {
"@storybook/channels": "^3.0.0",
"global": "^4.3.2",
"json-stringify-safe": "^5.0.1"
+ },
+ "devDependencies": {
+ "shelljs": "^0.7.7"
}
}
diff --git a/lib/channel-websocket/package.json b/lib/channel-websocket/package.json
index 14bcca811680..923d2dbf5434 100644
--- a/lib/channel-websocket/package.json
+++ b/lib/channel-websocket/package.json
@@ -2,16 +2,16 @@
"name": "@storybook/channel-websocket",
"version": "3.0.0",
"description": "",
+ "license": "MIT",
"main": "dist/index.js",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js"
},
- "license": "MIT",
- "devDependencies": {
- "shelljs": "^0.7.7"
- },
"dependencies": {
"@storybook/channels": "^3.0.0",
"global": "^4.3.2"
+ },
+ "devDependencies": {
+ "shelljs": "^0.7.7"
}
}
diff --git a/lib/channels/package.json b/lib/channels/package.json
index 95e8d4973e09..333197bec3b6 100644
--- a/lib/channels/package.json
+++ b/lib/channels/package.json
@@ -2,11 +2,11 @@
"name": "@storybook/channels",
"version": "3.0.0",
"description": "",
+ "license": "MIT",
"main": "dist/index.js",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js"
},
- "license": "MIT",
"devDependencies": {
"shelljs": "^0.7.7"
}
diff --git a/lib/cli/package.json b/lib/cli/package.json
index 9411833078eb..da5ce66249fc 100644
--- a/lib/cli/package.json
+++ b/lib/cli/package.json
@@ -2,6 +2,17 @@
"name": "@storybook/cli",
"version": "3.0.1",
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
+ "keywords": [
+ "cli",
+ "generator",
+ "storybook"
+ ],
+ "homepage": "https://github.com/storybooks/storybook/tree/master/lib/cli",
+ "bugs": {
+ "url": "https://github.com/storybooks/storybook/issues"
+ },
+ "license": "MIT",
+ "author": "Storybook Team",
"bin": {
"getstorybook": "./bin/generate.js"
},
@@ -9,17 +20,9 @@
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "keywords": [
- "storybook",
- "generator",
- "cli"
- ],
- "author": "Storybook Team",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/storybooks/storybook/issues"
+ "scripts": {
+ "postinstall": "opencollective postinstall --collective=storybook"
},
- "homepage": "https://github.com/storybooks/storybook/tree/master/lib/cli",
"dependencies": {
"@storybook/codemod": "^3.0.1",
"chalk": "^1.1.3",
@@ -32,8 +35,5 @@
"opencollective": "^1.0.3",
"shelljs": "^0.7.7",
"update-notifier": "^2.1.0"
- },
- "scripts": {
- "postinstall": "opencollective postinstall --collective=storybook"
}
}
diff --git a/lib/codemod/package.json b/lib/codemod/package.json
index 35f8e6d9bb26..cd0b8f584de7 100644
--- a/lib/codemod/package.json
+++ b/lib/codemod/package.json
@@ -1,19 +1,19 @@
{
"name": "@storybook/codemod",
- "description": "A collection of codemod scripts written with JSCodeshift",
"version": "3.0.1",
+ "description": "A collection of codemod scripts written with JSCodeshift",
"license": "MIT",
+ "main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "main": "dist/index.js",
- "dependencies": {
- "jscodeshift": "^0.3.30"
- },
"scripts": {
"prepublish": "node ../../scripts/prepublish.js"
},
+ "dependencies": {
+ "jscodeshift": "^0.3.30"
+ },
"devDependencies": {
"shelljs": "^0.7.7"
}
diff --git a/lib/ui/package.json b/lib/ui/package.json
index 53df810bb34d..196379f1a469 100644
--- a/lib/ui/package.json
+++ b/lib/ui/package.json
@@ -2,19 +2,16 @@
"name": "@storybook/ui",
"version": "3.0.1",
"description": "Core Storybook UI",
+ "license": "MIT",
+ "main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
},
- "license": "MIT",
"scripts": {
"prepublish": "node ../../scripts/prepublish.js",
- "storybook": "start-storybook -p 9010",
- "publish-storybook": "bash ./.scripts/publish_storybook.sh"
- },
- "peerDependencies": {
- "react": "*",
- "react-dom": "*"
+ "publish-storybook": "bash ./.scripts/publish_storybook.sh",
+ "storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/react-fuzzy": "^0.4.0",
@@ -37,8 +34,11 @@
"react-split-pane": "^0.1.63",
"redux": "^3.6.0"
},
- "main": "dist/index.js",
"devDependencies": {
"enzyme": "^2.8.2"
+ },
+ "peerDependencies": {
+ "react": "*",
+ "react-dom": "*"
}
}
diff --git a/package.json b/package.json
index 36deffd60a4a..0a07f063ceab 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"changelog": "pr-log --sloppy",
"precommit": "lint-staged",
"coverage": "codecov",
+ "dev": "lerna exec --parallel -- babel src -d dist --ignore tests,__tests__,test.js,stories/,story.jsx --plugins \"transform-runtime\" --copy-files -w",
"docs:build": "cd docs && npm run build",
"docs:deploy:ci": "cd docs && npm run deploy:ci",
"docs:deploy:manual": "cd docs && npm run deploy:manual",
@@ -22,8 +23,7 @@
"lint:md": "remark .",
"publish": "lerna publish",
"test": "jest",
- "test:watch": "npm test -- --watch",
- "dev": "lerna exec --parallel -- babel src -d dist --ignore tests,__tests__,test.js,stories/,story.jsx --plugins \"transform-runtime\" --copy-files -w"
+ "test:watch": "npm test -- --watch"
},
"devDependencies": {
"babel-cli": "^6.24.1",
@@ -68,6 +68,9 @@
"remark-toc": "^4.0.0",
"shelljs": "^0.7.7"
},
+ "engines": {
+ "npm": "<5.0.0"
+ },
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/storybook"
@@ -95,8 +98,5 @@
"greenkeeper": "Dependency Upgrades",
"other": "Other"
}
- },
- "engines": {
- "npm": "<5.0.0"
}
}
From d1aa2ed9ce10918fb2c58eb17711cd4e26ebcf20 Mon Sep 17 00:00:00 2001
From: Norbert de Langen
Date: Tue, 6 Jun 2017 18:03:32 +0200
Subject: [PATCH 59/60] FIX docs
---
docs/gatsby-browser.js | 2 +-
docs/loaders/markdown-loader/index.js | 2 +-
docs/package.json | 8 ++++----
docs/postcss.config.js | 3 +++
4 files changed, 9 insertions(+), 6 deletions(-)
create mode 100644 docs/postcss.config.js
diff --git a/docs/gatsby-browser.js b/docs/gatsby-browser.js
index fd7accbf337a..113c764ac053 100644
--- a/docs/gatsby-browser.js
+++ b/docs/gatsby-browser.js
@@ -1,6 +1,6 @@
const global = require('global');
-const document = global;
+const document = global.document;
exports.onRouteUpdate = location => {
if (location.hash) {
diff --git a/docs/loaders/markdown-loader/index.js b/docs/loaders/markdown-loader/index.js
index 18594030f0c6..b1fe33b7dd20 100644
--- a/docs/loaders/markdown-loader/index.js
+++ b/docs/loaders/markdown-loader/index.js
@@ -43,7 +43,7 @@ const md = (linkPrefix, shouldPrefix) =>
permalinkSymbol: '⚓︎',
});
-module.exports = content => {
+module.exports = function markdownLoader(content) {
this.cacheable();
const query = loaderUtils.parseQuery(this.query);
diff --git a/docs/package.json b/docs/package.json
index b50b6cfa6913..33b61bbde769 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -17,10 +17,10 @@
"storybook": "start-storybook -p 9009 -s pages"
},
"dependencies": {
- "@storybook/addon-actions": "alpha",
- "@storybook/addon-links": "alpha",
- "@storybook/addons": "alpha",
- "@storybook/react": "alpha",
+ "@storybook/addon-actions": "latest",
+ "@storybook/addon-links": "latest",
+ "@storybook/addons": "latest",
+ "@storybook/react": "latest",
"babel-cli": "^6.24.1",
"babel-core": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
diff --git a/docs/postcss.config.js b/docs/postcss.config.js
new file mode 100644
index 000000000000..262d73358d8d
--- /dev/null
+++ b/docs/postcss.config.js
@@ -0,0 +1,3 @@
+module.exports = () => ({
+ plugins: [],
+});
From ae5dae949c6cf21f34ebda82c64f569ad99a5259 Mon Sep 17 00:00:00 2001
From: Norbert de Langen
Date: Tue, 6 Jun 2017 20:24:38 +0200
Subject: [PATCH 60/60] CHANGE path to markdown code example eslint config to
relative path
---
.remarkrc.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.remarkrc.js b/.remarkrc.js
index 381f56c359b6..078472d14052 100644
--- a/.remarkrc.js
+++ b/.remarkrc.js
@@ -9,8 +9,7 @@ module.exports = {
module: 'node_modules/remark-lint-code-eslint',
options: {
fix: true,
- configFile:
- '/Users/dev/Projects/GitHub/storybook/react-storybook/.eslintrc-markdown.js',
+ configFile: '.eslintrc-markdown.js',
},
},
},