diff --git a/code/.editorconfig b/.editorconfig similarity index 100% rename from code/.editorconfig rename to .editorconfig diff --git a/.github/renovate.json5 b/.github/renovate.json5 deleted file mode 100644 index 1b14b5e35f3..00000000000 --- a/.github/renovate.json5 +++ /dev/null @@ -1,83 +0,0 @@ -{ - $schema: 'https://docs.renovatebot.com/renovate-schema.json', - extends: ['config:base', 'group:allNonMajor'], - prHourlyLimit: 1, - prConcurrentLimit: 1, - // Custom ignore paths to include our `examples/` directory - ignorePaths: [ - '**/node_modules/**', - '**/bower_components/**', - '**/vendor/**', - '**/__tests__/**', - '**/test/**', - '**/tests/**', - '**/__fixtures__/**', - ], - enabledManagers: ['npm'], - // Ignore release notes for non-breaking changes - fetchReleaseNotes: false, - // Always bump minor/patch to latest - rangeStrategy: 'bump', - major: { - // Replace ranges when there is a major - rangeStrategy: 'replace', - // Get us the release notes for breaking changes - fetchReleaseNotes: true, - }, - packageRules: [ - // Leave peerDependencies and engines alone - { - depTypeList: ['peerDependencies', 'engines'], - enabled: false, - }, - // Handle patch updates under 0.1.0 as potentially breaking - // Workaround for https://github.com/renovatebot/renovate/issues/3588 - { - managers: ['npm'], - matchCurrentVersion: '<0.1.0', - rangeStrategy: 'replace', - groupName: 'maybe breaking patch updates', - groupSlug: 'maybe-breaking-patch', - // Get us the release notes for potentially breaking changes - fetchReleaseNotes: true, - }, - // Handle minor updates under 1.0.0 as potentially breaking - // Workaround for https://github.com/renovatebot/renovate/issues/3588 - { - managers: ['npm'], - matchCurrentVersion: '<1.0.0 >=0.1.0', - minor: { - // FIXME: "rangeStrategy": "replace", - groupName: 'maybe breaking minor updates', - groupSlug: 'maybe-breaking-minor', - // Get us the release notes for potentially breaking changes - fetchReleaseNotes: true, - }, - }, - // Group Storybook's linter configs together - { - packageNames: ['@storybook/eslint-config-storybook', '@storybook/linter-config'], - groupName: 'storybook linting', - }, - // Group Puppeteer packages together - { - packagePatterns: ['^puppeteer', '^@types/puppeteer'], - groupName: 'puppeteer', - }, - // Group Acorn packages together - { - packagePatterns: ['^acorn'], - groupName: 'acorn', - }, - // Group React packages together - { - packageNames: ['react', '@types/react', 'react-dom', '@types/react-dom'], - groupName: 'react', - }, - ], - // Simplifies the PR body - prBodyTemplate: '{{{table}}}{{{notes}}}{{{changelogs}}}', - prBodyColumns: ['Package', 'Change'], - // https://docs.renovatebot.com/merge-confidence/#enabling-and-disabling - ignorePresets: ['github>whitesource/merge-confidence:beta'], -} diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index edb7388a015..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 21 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 30 -# Issues with these labels will never be considered stale -exemptLabels: - - linear - - todo - - ready - - 'in progress' - - 'do not merge' - - 'needs review' - - 'high priority' - - 'good first issue' - -# Label to use when marking an issue as stale -staleLabel: inactive -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - Hi everyone! Seems like there hasn't been much going on in this issue lately. - If there are still questions, comments, or bugs, please feel free to continue - the discussion. Unfortunately, we don't have time to get to every issue. We - are always open to contributions so please send us a pull request if you would - like to help. Inactive issues will be closed after 30 days. Thanks! -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: > - Hey there, it's me again! I am going close this issue to help our maintainers - focus on the current development roadmap instead. If the issue mentioned is - still a concern, please open a new ticket and mention this old one. Cheers - and thanks for using Storybook! diff --git a/.github/workflows/danger-js.yml b/.github/workflows/danger-js.yml index 8d9701af198..edeb4aaad03 100644 --- a/.github/workflows/danger-js.yml +++ b/.github/workflows/danger-js.yml @@ -17,4 +17,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - args: --dangerfile .ci/danger/dangerfile.ts + args: --dangerfile scripts/dangerfile.ts diff --git a/.gitignore b/.gitignore index e36944229f1..c72facf13ac 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,25 @@ test-results # test-storybooks test-storybooks/ember-cli/ember-output test-storybooks/angular-cli/addon-jest.testresults.json + + +npm-shrinkwrap.json +.tern-port +.parcel-cache +coverage/ +*.lerna_backup +/**/LICENSE +code/docs/public +package-lock.json +.nvmrc +storybook-static +.jest-test-results.json +*.jar +/false +/addons/docs/common/config-* +tsconfig.tsbuildinfo + +code/test-results/ +code/playwright-results/ +code/playwright-report/ +code/playwright/.cache/ diff --git a/.spelling b/.spelling index c94a6e6350b..7ed819bf9f1 100644 --- a/.spelling +++ b/.spelling @@ -4,82 +4,57 @@ # one word per line, to define a file override use ' - filename' # where filename is relative to this configuration file addon -1 -vue -svelte -webcomponents -aurelia -iframe -webpack addons -styleguide-type -styleguides -angularjs api -github +apollo +aurelia +bundlers +center +centered +cleanup +codemod +codemods +CommonJS config cra -PRs -cleanup -2 -ES2016 -prerelease -rc -npm -apollo -codemod -storyshots -graphql -lerna -eslint -js -CommonJS -IO -reflow -Node.js. -dialog -10 -unisolated -3 -13 -Browserify -bundlers -2013 -centered -center -GraphiQL -graphiql -url -javascript -storyshots' -storybook.js.org CRNA -postmessage -websocket +dialog +ES2016 +eslint EventEmitter -codemods -jscodeshift -npm3 +github +GraphiQL +graphql HMR -Redux -storybook-ui -react-komposer -serializable -params -README.md -storybook.js.org -YuzuJS -setImmediate -Malte -Katić -Domenic -Kowal -Zakas -Gruber -julian -juliangruber.com -Schlueter +iframe +IO +javascript +js +jscodeshift +lerna linkTo +Node.js +npm +onStory +params +postmessage +prerelease +PRs +rc +README.md +serializable setOptions setStories -onStory +storybook-ui +storybook.js.org +storyshots +storyshots' +styleguide-type +styleguides +svelte +unisolated +url +vue +webcomponents +webpack +websocket diff --git a/.vscode/launch.json b/.vscode/launch.json index 3b2c18a27cd..787b44f8346 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,23 +3,5 @@ // 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": "cli html", - "cwd": "${workspaceFolder}/code/lib/cli/stories", - "runtimeArgs": [ - "--inspect-brk", - "${workspaceFolder}/code/lib/cli/bin/index.js", - "init", - "--type", - "html" - ], - "port": 9229, - "skipFiles": [ - "/**" - ] - } - ] + "configurations": [] } \ No newline at end of file diff --git a/code/.gitignore b/code/.gitignore deleted file mode 100644 index 2a1fc46598f..00000000000 --- a/code/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -node_modules -*.log -.idea -*.iml -*.sw* -!.swcrc -npm-shrinkwrap.json -dist -.tern-port -*.DS_Store -.cache -.parcel-cache -coverage/ -*.lerna_backup -build -/**/LICENSE -docs/public -package-lock.json -.nvmrc -storybook-static -.jest-test-results.json -lib/*.jar -/false -/addons/docs/common/config-* -built-storybooks -.verdaccio-cache -tsconfig.tsbuildinfo -junit.xml -.next - -/test-results/ -/playwright-results/ -/playwright-report/ -/playwright/.cache/ - - -# Yarn stuff -/**/.yarn/* -!/**/.yarn/releases -!/**/.yarn/plugins -!/**/.yarn/sdks -!/**/.yarn/versions -/**/.pnp.* diff --git a/media/storybook-intro.gif b/media/storybook-intro.gif deleted file mode 100644 index d4b9c6c060f..00000000000 Binary files a/media/storybook-intro.gif and /dev/null differ diff --git a/.ci/danger/dangerfile.ts b/scripts/dangerfile.ts similarity index 64% rename from .ci/danger/dangerfile.ts rename to scripts/dangerfile.ts index a25402f84e4..8d04e2c2847 100644 --- a/.ci/danger/dangerfile.ts +++ b/scripts/dangerfile.ts @@ -1,3 +1,4 @@ +/* eslint-disable import/extensions */ import { fail, danger } from 'danger'; import { execSync } from 'child_process'; @@ -7,7 +8,7 @@ const flatten = require('lodash/flatten.js'); const intersection = require('lodash/intersection.js'); const isEmpty = require('lodash/isEmpty.js'); -const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import +const pkg = require('../code/package.json'); // eslint-disable-line import/newline-after-import const prLogConfig = pkg['pr-log']; const Versions = { @@ -18,19 +19,26 @@ const Versions = { const branchVersion = Versions.MINOR; -const checkRequiredLabels = labels => { +const checkRequiredLabels = (labels: string[]) => { const forbiddenLabels = flatten([ - 'do not merge', + 'ci: do not merge', 'in progress', branchVersion !== Versions.MAJOR ? 'BREAKING CHANGE' : [], branchVersion === Versions.PATCH ? 'feature request' : [], ]); - const requiredLabels = flatten([prLogConfig.skipLabels || [], (prLogConfig.validLabels || []).map(keyVal => keyVal[0])]); + const requiredLabels = flatten([ + prLogConfig.skipLabels || [], + (prLogConfig.validLabels || []).map((keyVal: string) => keyVal[0]), + ]); const blockingLabels = intersection(forbiddenLabels, labels); if (!isEmpty(blockingLabels)) { - fail(`PR is marked with ${blockingLabels.map(label => `"${label}"`).join(', ')} label${blockingLabels.length > 1 ? 's' : ''}.`); + fail( + `PR is marked with ${blockingLabels.map((label: string) => `"${label}"`).join(', ')} label${ + blockingLabels.length > 1 ? 's' : '' + }.` + ); } const foundLabels = intersection(requiredLabels, labels); @@ -43,5 +51,5 @@ const checkRequiredLabels = labels => { if (prLogConfig) { const { labels } = danger.github.issue; - checkRequiredLabels(labels.map(l => l.name)); + checkRequiredLabels(labels.map((l) => l.name)); }