Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/storybooks/storybook into next
Browse files Browse the repository at this point in the history
  • Loading branch information
kroeder committed Jan 31, 2020
2 parents 1191b52 + c589b96 commit 99dd642
Show file tree
Hide file tree
Showing 1,521 changed files with 28,340 additions and 41,979 deletions.
17 changes: 4 additions & 13 deletions .babelrc.js
Expand Up @@ -13,7 +13,10 @@ const withTests = {
};

module.exports = {
ignore: ['./lib/codemod/src/transforms/__testfixtures__'],
ignore: [
'./lib/codemod/src/transforms/__testfixtures__',
'./lib/postinstall/src/__testfixtures__',
],
presets: [
['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage', corejs: '3' }],
'@babel/preset-typescript',
Expand Down Expand Up @@ -45,13 +48,6 @@ module.exports = {
test: withTests,
},
},
{
test: './examples/rax-kitchen-sink',
presets: [
['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage', corejs: '3' }],
['babel-preset-rax', { development: process.env.BABEL_ENV === 'development' }],
],
},
{
test: './lib',
presets: [
Expand All @@ -72,11 +68,6 @@ module.exports = {
test: withTests,
},
},
{
test: './app/react-native',
presets: ['module:metro-react-native-babel-preset'],
plugins: ['babel-plugin-macros', ['emotion', { sourceMap: true, autoLabel: true }]],
},
{
test: [
'./lib/node-logger',
Expand Down
73 changes: 46 additions & 27 deletions .circleci/config.yml
Expand Up @@ -51,7 +51,52 @@ jobs:
command: yarn chromatic --storybook-build-dir="built-storybooks/official-storybook" --exit-zero-on-changes --app-code="ab7m45tp9p"
- run:
name: Run chromatic on the pre-built angular example
command: yarn chromatic --storybook-build-dir="built-storybooks/angular-cli" --exit-zero-on-changes --app-code="tl92yzsj6w"
command: yarn chromatic --storybook-build-dir="built-storybooks/angular-cli" --app-code="tl92yzsj6w"
- run:
name: Run chromatic on the pre-built cra-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/cra-kitchen-sink" --app-code="tg55gajmdt"
- run:
name: Run chromatic on the pre-built cra-react15 example
command: yarn chromatic --storybook-build-dir="built-storybooks/cra-react15" --app-code="gxk7iqej3wt"
- run:
name: Run chromatic on the pre-built cra-ts-essentials example
command: yarn chromatic --storybook-build-dir="built-storybooks/cra-ts-essentials" --app-code="b311ypk6of"
- run:
name: Run chromatic on the pre-built cra-ts-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/cra-ts-kitchen-sink" --app-code="19whyj1tlac"
- run:
name: Run chromatic on the pre-built dev-kits example
command: yarn chromatic --storybook-build-dir="built-storybooks/dev-kits" --app-code="7yykp9ifdxx"
- run:
name: Run chromatic on the pre-built ember-cli example
command: yarn chromatic --storybook-build-dir="built-storybooks/ember-cli" --app-code="19z23qxndju"
- run:
name: Run chromatic on the pre-built html-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/html-kitchen-sink" --app-code="e8zolxoyg8o"
- run:
name: Run chromatic on the pre-built marko-cli example
command: yarn chromatic --storybook-build-dir="built-storybooks/marko-cli" --app-code="qaegx64axu"
- run:
name: Run chromatic on the pre-built mithril-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/mithril-kitchen-sink" --app-code="8adgm46jzk8"
- run:
name: Run chromatic on the pre-built preact-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/preact-kitchen-sink" --app-code="ls0ikhnwqt"
- run:
name: Run chromatic on the pre-built rax-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/rax-kitchen-sink" --app-code="4co6vptx8qo"
- run:
name: Run chromatic on the pre-built riot-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/riot-kitchen-sink" --app-code="g2dp3lnr34a"
- run:
name: Run chromatic on the pre-built svelte-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/svelte-kitchen-sink" --app-code="8ob73wgl995"
- run:
name: Run chromatic on the pre-built vue-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/vue-kitchen-sink" --app-code="cyxj0e38bqj"
- run:
name: Run chromatic on the pre-built web-components-kitchen-sink example
command: yarn chromatic --storybook-build-dir="built-storybooks/web-components-kitchen-sink" --app-code="npm5gsofwkf"

packtracker:
<<: *defaults
Expand Down Expand Up @@ -146,11 +191,6 @@ jobs:
command: |
cd examples/ember-cli
yarn storybook --smoke-test --quiet
- run:
name: Run polymer-cli (smoke test)
command: |
cd examples/polymer-cli
yarn storybook --smoke-test --quiet
- run:
name: Run marko-cli (smoke test)
command: |
Expand Down Expand Up @@ -181,24 +221,6 @@ jobs:
command: |
cd examples/cra-react15
yarn storybook --smoke-test --quiet
native-smoke-tests:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Bootstrap
command: yarn bootstrap --core
- run:
name: Run React-Native-App example
command: |
cd examples-native/crna-kitchen-sink
yarn storybook --smoke-test
- run:
name: Publish React-Native-App example
command: |
./scripts/crna-publish.js
frontpage:
<<: *defaults
steps:
Expand Down Expand Up @@ -286,9 +308,6 @@ workflows:
- packtracker:
requires:
- build
- native-smoke-tests:
requires:
- build
- test:
requires:
- build
Expand Down
8 changes: 5 additions & 3 deletions .eslintignore
Expand Up @@ -15,9 +15,11 @@ scripts/storage
examples/ember-cli/.storybook/preview-head.html
examples/official-storybook/tests/addon-jest.test.js
examples/cra-ts-kitchen-sink/*.json
examples/cra-ts-kitchen-sink/public/*.json
examples/cra-ts-kitchen-sink/public/*.html

examples/cra-ts-kitchen-sink/public/*
examples/cra-ts-essentials/*.json
examples/cra-ts-essentials/public/*
examples/rax-kitchen-sink/src/document/*
.yarn
!.remarkrc.js
!.babelrc.js
!.eslintrc.js
Expand Down
43 changes: 20 additions & 23 deletions .eslintrc.js
@@ -1,25 +1,22 @@
const ignore = 0;
// const warn = 1;
const error = 2;

module.exports = {
root: true,
extends: ['@storybook/eslint-config-storybook'],
rules: {
'import/extensions': [
error,
'error',
'never',
{ ignorePackages: true, md: 'always', svg: 'always', json: 'always', tag: 'always' },
],
'import/no-unresolved': [error, { ignore: ['@storybook'] }],
'react/state-in-constructor': ignore,
'react/static-property-placement': ignore,
'react/jsx-props-no-spreading': ignore,
'react/jsx-fragments': ignore,
'@typescript-eslint/ban-ts-ignore': ignore,
'@typescript-eslint/no-object-literal-type-assertion': ignore,
'import/no-unresolved': ['error', { ignore: ['@storybook'] }],
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-fragments': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'react/sort-comp': [
error,
'error',
{
order: [
'staticLifecycle',
Expand All @@ -38,7 +35,7 @@ module.exports = {
},
},
],
'max-classes-per-file': ignore,
'max-classes-per-file': 'off',
},
overrides: [
{
Expand All @@ -51,30 +48,30 @@ module.exports = {
'docs/src/stories/**',
],
rules: {
'@typescript-eslint/no-empty-function': ignore,
'import/no-extraneous-dependencies': ignore,
'@typescript-eslint/no-empty-function': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
{ files: '**/.storybook/config.js', rules: { 'global-require': ignore } },
{ files: '**/.storybook/config.js', rules: { 'global-require': 'off' } },
{
files: ['**/*.stories.*'],
rules: {
'no-console': ignore,
'no-console': 'off',
},
},
{
files: ['**/*.tsx', '**/*.ts'],
rules: {
'react/prop-types': ignore, // we should use types
'no-dupe-class-members': ignore, // this is called overloads in typescript
'react/prop-types': 'off', // we should use types
'no-dupe-class-members': 'off', // this is called overloads in typescript
},
},
{
files: ['**/*.d.ts'],
rules: {
'vars-on-top': ignore,
'no-var': ignore, // this is how typescript works
'spaced-comment': ignore,
'vars-on-top': 'off',
'no-var': 'off', // this is how typescript works
'spaced-comment': 'off',
},
},
],
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
.yarn/releases/yarn-*.js linguist-generated=true
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -18,9 +18,7 @@
/addons/viewport/ @saponifi3d

/app/angular/ @alterx @igor-dv
/app/polymer/ @ndelangen @naipath @leonrodenburg
/app/react/ @xavcz @shilman @thomasbertet
/app/react-native/ @rmevans9 @Gongreg @tmeasday
/app/vue/ @thomasbertet @kazupon
/app/svelte/ @plumpNation

Expand All @@ -30,7 +28,6 @@
/examples/cra-kitchen-sink/ @ndelangen @UsulPro
/examples/cra-ts-kitchen-sink/ @mucsi96
/examples/official-storybook/ @UsulPro
/examples/polymer-cli/ @naipath @igor-dv
/examples/vue-kitchen-sink/ @igor-dv @alexandrebodin
/examples/svelte-kitchen-sink/ @plumpNation

Expand Down
3 changes: 1 addition & 2 deletions .github/autolabeler.yml
Expand Up @@ -13,9 +13,8 @@
'addon: storyshots': ["addons/storyshots/**"]
'addon: viewport': ["addons/viewport/**"]
'app: angular': ["app/angular/**"]
'app: polymer ': ["app/polymer/**"]
'app: preact': ["app/preact/**"]
'app: react-native': ["app/react-native/**"]
'app: rax': ["app/rax/**"]
'app: react': ["app/react/**"]
'app: vue': ["app/vue/**"]
'app: svelte': ["app/svelte/**"]
Expand Down
6 changes: 2 additions & 4 deletions .github/automention.yml
Expand Up @@ -2,12 +2,10 @@
'app: ember': ['gabrielcsapo']
'app: html': ['Hypnosphi']
'app: marko': ['nm123github']
'app: polymer': ['stijnkoopal', 'ndelangen']
'app: preact': ['BartWaardenburg']
'app: react-native': ['benoitdion', 'gongreg']
'app: react-native-server': ['benoitdion', 'gongreg']
'app: rax': ['SoloJiang']
'app: svelte': ['rixo', 'cam-stitt', 'plumpNation']
'app: vue': ['backbone87', 'elevatebart', 'pksunkara', 'Aaron-Pool']
'app: vue': ['backbone87', 'elevatebart', 'pksunkara', 'Aaron-Pool', 'pocka']
'app: web-components': ['daKmoR']
'api: addons': ['ndelangen']
'addon: a11y': ['CodeByAlex', 'Armanio', 'jsomsanith']
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/tests-puppeteer.yml
@@ -0,0 +1,32 @@
name: Puppeteer & A11y tests

on: [push]

jobs:
build:

name: Puppeteer & A11y tests
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: install, bootstrap
run: |
yarn bootstrap --core
- name: build storybook
run: |
yarn --cwd examples/official-storybook build-storybook
- name: test
run: |
yarn test --puppeteer
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -2,7 +2,8 @@ node_modules
*.log
.idea
*.iml
.vscode
.vscode/*
!.vscode/launch.json
*.sw*
npm-shrinkwrap.json
dist
Expand Down Expand Up @@ -34,3 +35,4 @@ storybook-out
built-storybooks
cypress/videos
cypress/screenshots
examples/ember-cli/ember-output
1 change: 1 addition & 0 deletions .prettierignore
@@ -0,0 +1 @@
.yarn
38 changes: 38 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,38 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"type": "node",
"request": "launch",
"name": "official-storybook",
"runtimeExecutable": "npm",
"cwd": "${workspaceFolder}/examples/official-storybook",
"runtimeArgs": [
"run-script",
"debug"
],
"port": 9229,
"skipFiles": [
"<node_internals>/**"
]
}, {
"type": "node",
"request": "launch",
"name": "cli html",
"cwd": "${workspaceFolder}/lib/cli/stories",
"runtimeArgs": [
"--inspect-brk",
"${workspaceFolder}/lib/cli/bin/index.js",
"init",
"--type",
"html"
],
"port": 9229,
"skipFiles": [
"<node_internals>/**"
]
}
]
}

0 comments on commit 99dd642

Please sign in to comment.