Skip to content

Commit

Permalink
fix: eslint comment on test template
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Pinheiro committed Jul 5, 2017
1 parent 6cec62a commit cc90e21
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 89 deletions.
14 changes: 7 additions & 7 deletions .storybook.native/index.android.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { AppRegistry, NativeModules } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';
import { loadStories } from './story-loader';
import './addons';
import url from 'url';
import url from "url";
import { AppRegistry, NativeModules } from "react-native";
import { getStorybookUI, configure } from "@storybook/react-native";
import { loadStories } from "./story-loader";
import "./addons";

configure(loadStories, module);

const { hostname } = url.parse(NativeModules.SourceCode.scriptURL);

const StorybookUI = getStorybookUI({
port: 7007,
host: hostname,
host: hostname
});

AppRegistry.registerComponent('storybooknative', () => StorybookUI);
AppRegistry.registerComponent("storybooknative", () => StorybookUI);
14 changes: 7 additions & 7 deletions .storybook.native/index.ios.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { AppRegistry, NativeModules } from 'react-native';
import { getStorybookUI, configure } from '@storybook/react-native';
import { loadStories } from './story-loader';
import './addons';
import url from 'url';
import url from "url";
import { AppRegistry, NativeModules } from "react-native";
import { getStorybookUI, configure } from "@storybook/react-native";
import { loadStories } from "./story-loader";
import "./addons";

configure(loadStories, module);

const { hostname } = url.parse(NativeModules.SourceCode.scriptURL);

const StorybookUI = getStorybookUI({
port: 7007,
host: hostname,
host: hostname
});

AppRegistry.registerComponent('storybooknative', () => StorybookUI);
AppRegistry.registerComponent("storybooknative", () => StorybookUI);
4 changes: 3 additions & 1 deletion lib/cli/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ storiesOf("{{{component}}}", module).add("{{{component}}}", () =>
);
`);

const testFile = handlebars.compile(`import "react-native";
const testFile = handlebars.compile(`/* eslint-env jest */
import "react-native";
import React from "react";
import {{{component}}} from "./{{{packageName}}}";
import renderer from "react-test-renderer";
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,32 @@
"@storybook/addon-actions": "3.0.0",
"@storybook/react": "3.0.0",
"@storybook/react-native": "3.0.0",
"coveralls": "^2.13.1",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-import": "^2.6.1",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.1.0",
"jest": "^20.0.4",
"lcov-result-merger": "^1.2.0",
"coveralls": "2.13.1",
"eslint": "3.19.0",
"eslint-config-airbnb": "15.0.1",
"eslint-config-prettier": "2.3.0",
"eslint-plugin-import": "2.6.1",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.1.0",
"jest": "20.0.4",
"lcov-result-merger": "1.2.0",
"lerna": "2.0.0-rc.5",
"lint-staged": "^4.0.0",
"pre-commit": "^1.2.2",
"lint-staged": "4.0.0",
"pre-commit": "1.2.2",
"prettier": "1.4.2",
"react": "16.0.0-alpha.6",
"react-dom": "15.5.4",
"react-native": "0.44.2",
"react-native-storybook-loader": "1.3.1",
"react-native-web": "0.0.97",
"rimraf": "^2.6.1",
"rimraf": "2.6.1",
"url": "0.11.0"
},
"dependencies": {
"dashify": "0.2.2",
"global": "4.3.2",
"handlebars": "4.0.10",
"mkdirp": "^0.5.1",
"mkdirp": "0.5.1",
"sort-pkg": "1.1.0",
"subcommander": "1.0.0"
}
Expand Down
83 changes: 22 additions & 61 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0:
esutils "^2.0.2"
js-tokens "^3.0.0"

babel-core@6.24.1:
babel-core@6.24.1, babel-core@^6.0.0, babel-core@^6.21.0, babel-core@^6.24.1, babel-core@^6.7.2:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83"
dependencies:
Expand All @@ -588,31 +588,7 @@ babel-core@6.24.1:
slash "^1.0.0"
source-map "^0.5.0"

babel-core@^6.0.0, babel-core@^6.21.0, babel-core@^6.24.1, babel-core@^6.7.2:
version "6.25.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729"
dependencies:
babel-code-frame "^6.22.0"
babel-generator "^6.25.0"
babel-helpers "^6.24.1"
babel-messages "^6.23.0"
babel-register "^6.24.1"
babel-runtime "^6.22.0"
babel-template "^6.25.0"
babel-traverse "^6.25.0"
babel-types "^6.25.0"
babylon "^6.17.2"
convert-source-map "^1.1.0"
debug "^2.1.1"
json5 "^0.5.0"
lodash "^4.2.0"
minimatch "^3.0.2"
path-is-absolute "^1.0.0"
private "^0.1.6"
slash "^1.0.0"
source-map "^0.5.0"

babel-generator@^6.18.0, babel-generator@^6.21.0, babel-generator@^6.24.1, babel-generator@^6.25.0:
babel-generator@^6.18.0, babel-generator@^6.21.0, babel-generator@^6.24.1:
version "6.25.0"
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc"
dependencies:
Expand Down Expand Up @@ -759,22 +735,14 @@ babel-jest@^20.0.3:
babel-plugin-istanbul "^4.0.0"
babel-preset-jest "^20.0.3"

babel-loader@7.0.0:
babel-loader@7.0.0, babel-loader@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.0.0.tgz#2e43a66bee1fff4470533d0402c8a4532fafbaf7"
dependencies:
find-cache-dir "^0.1.1"
loader-utils "^1.0.2"
mkdirp "^0.5.1"

babel-loader@^7.0.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.1.tgz#b87134c8b12e3e4c2a94e0546085bc680a2b8488"
dependencies:
find-cache-dir "^1.0.0"
loader-utils "^1.0.2"
mkdirp "^0.5.1"

babel-messages@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
Expand Down Expand Up @@ -1504,7 +1472,7 @@ babel-runtime@6.x.x, babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0:
babel-template@^6.16.0, babel-template@^6.24.1:
version "6.25.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071"
dependencies:
Expand Down Expand Up @@ -2395,7 +2363,7 @@ cosmiconfig@^2.1.0, cosmiconfig@^2.1.1:
parse-json "^2.2.0"
require-from-string "^1.1.0"

coveralls@^2.13.1:
coveralls@2.13.1:
version "2.13.1"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.1.tgz#d70bb9acc1835ec4f063ff9dac5423c17b11f178"
dependencies:
Expand Down Expand Up @@ -3046,13 +3014,13 @@ eslint-config-airbnb-base@^11.2.0:
version "11.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.2.0.tgz#19a9dc4481a26f70904545ec040116876018f853"

eslint-config-airbnb@^15.0.1:
eslint-config-airbnb@15.0.1:
version "15.0.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.0.1.tgz#7b5188e5b7c74b9b2ce639fd5e1daba8fd761aed"
dependencies:
eslint-config-airbnb-base "^11.2.0"

eslint-config-prettier@^2.3.0:
eslint-config-prettier@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.3.0.tgz#b75b1eabea0c8b97b34403647ee25db349b9d8a0"
dependencies:
Expand All @@ -3072,7 +3040,7 @@ eslint-module-utils@^2.0.0:
debug "^2.6.8"
pkg-dir "^1.0.0"

eslint-plugin-import@^2.6.1:
eslint-plugin-import@2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.6.1.tgz#f580be62bb809421d46e338372764afcc9f59bf6"
dependencies:
Expand All @@ -3087,7 +3055,7 @@ eslint-plugin-import@^2.6.1:
minimatch "^3.0.3"
read-pkg-up "^2.0.0"

eslint-plugin-jsx-a11y@^5.1.1:
eslint-plugin-jsx-a11y@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1"
dependencies:
Expand All @@ -3099,15 +3067,15 @@ eslint-plugin-jsx-a11y@^5.1.1:
emoji-regex "^6.1.0"
jsx-ast-utils "^1.4.0"

eslint-plugin-react@^7.1.0:
eslint-plugin-react@7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz#27770acf39f5fd49cd0af4083ce58104eb390d4c"
dependencies:
doctrine "^2.0.0"
has "^1.0.1"
jsx-ast-utils "^1.4.1"

eslint@^3.19.0:
eslint@3.19.0:
version "3.19.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc"
dependencies:
Expand Down Expand Up @@ -3158,7 +3126,7 @@ esprima@^2.6.0, esprima@^2.7.1:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"

esprima@^3.1.1, esprima@~3.1.0:
esprima@~3.1.0:
version "3.1.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"

Expand Down Expand Up @@ -4695,7 +4663,7 @@ jest-validate@^20.0.3:
leven "^2.1.0"
pretty-format "^20.0.3"

jest@^20.0.4:
jest@20.0.4:
version "20.0.4"
resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac"
dependencies:
Expand All @@ -4718,21 +4686,14 @@ js-tokens@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"

js-yaml@3.6.1, js-yaml@^3.4.3, js-yaml@^3.5.1:
js-yaml@3.6.1, js-yaml@^3.4.3:
version "3.6.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
dependencies:
argparse "^1.0.7"
esprima "^2.6.0"

js-yaml@^3.7.0:
version "3.8.4"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6"
dependencies:
argparse "^1.0.7"
esprima "^3.1.1"

js-yaml@~3.7.0:
js-yaml@^3.5.1, js-yaml@^3.7.0, js-yaml@~3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
dependencies:
Expand Down Expand Up @@ -4888,7 +4849,7 @@ lcov-parse@0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"

lcov-result-merger@^1.2.0:
lcov-result-merger@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/lcov-result-merger/-/lcov-result-merger-1.2.0.tgz#5de1e6426f885929b77357f014de5fee1dad0553"
dependencies:
Expand Down Expand Up @@ -4951,7 +4912,7 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"

lint-staged@^4.0.0:
lint-staged@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.0.0.tgz#c15669f598614a6e68090303e175a799d48e0d85"
dependencies:
Expand Down Expand Up @@ -5444,7 +5405,7 @@ minimist@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"

"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
Expand Down Expand Up @@ -6317,7 +6278,7 @@ postcss@^6.0.1, postcss@^6.0.2:
source-map "^0.5.6"
supports-color "^4.1.0"

pre-commit@^1.2.2:
pre-commit@1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6"
dependencies:
Expand Down Expand Up @@ -6410,11 +6371,11 @@ public-encrypt@^4.0.0:
parse-asn1 "^5.0.0"
randombytes "^2.0.1"

punycode@1.3.2:
punycode@1.3.2, punycode@^1.2.4:
version "1.3.2"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"

punycode@^1.2.4, punycode@^1.4.1:
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"

Expand Down Expand Up @@ -7065,7 +7026,7 @@ right-align@^0.1.1:
dependencies:
align-text "^0.1.1"

rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1:
rimraf@2, rimraf@2.6.1, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d"
dependencies:
Expand Down

0 comments on commit cc90e21

Please sign in to comment.