Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Use Knip for project linting #29111

Merged
merged 6 commits into from
Sep 27, 2024
Merged

Conversation

webpro
Copy link
Contributor

@webpro webpro commented Sep 12, 2024

Closes #29106

What I did

  • Introduce Knip
  • Add custom configuration, mostly to auto-add package.json#bundler entries as entry paths
  • Deal with reported issues

Checklist for Contributors

Manual testing

yarn knip    # either from root or ./code

Documentation

N/A?

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.5 MB 77.5 MB 0 B 0.74 0%
initSize 162 MB 162 MB 0 B -0.28 0%
diffSize 84.8 MB 84.8 MB 0 B -0.64 0%
buildSize 6.96 MB 6.96 MB 0 B -2.49 0%
buildSbAddonsSize 1.57 MB 1.57 MB 0 B -3 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.91 MB 1.91 MB 0 B -2.14 0%
buildSbPreviewSize 311 kB 311 kB 0 B -3 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.98 MB 3.98 MB 0 B -2.43 0%
buildPreviewSize 2.97 MB 2.97 MB 0 B -3 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 6.7s 6.1s -597ms -0.85 -9.8%
generateTime 22s 20s -1s -935ms -0.48 -9.6%
initTime 16.2s 14.5s -1s -720ms -0.69 -11.8%
buildTime 10s 10.4s 478ms -0.56 4.6%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.6s 8.3s 1.7s 1.56 🔺20.6%
devManagerResponsive 4.4s 5.3s 946ms 1.62 🔺17.7%
devManagerHeaderVisible 683ms 657ms -26ms -1.03 -4%
devManagerIndexVisible 712ms 699ms -13ms -0.93 -1.9%
devStoryVisibleUncached 1.2s 853ms -361ms -1.33 🔰-42.3%
devStoryVisible 722ms 697ms -25ms -0.99 -3.6%
devAutodocsVisible 655ms 576ms -79ms -0.83 -13.7%
devMDXVisible 660ms 576ms -84ms -0.85 -14.6%
buildManagerHeaderVisible 481ms 714ms 233ms 0.02 32.6%
buildManagerIndexVisible 485ms 716ms 231ms -0.12 32.3%
buildStoryVisible 657ms 745ms 88ms -0.31 11.8%
buildAutodocsVisible 502ms 657ms 155ms -0.13 23.6%
buildMDXVisible 476ms 562ms 86ms -0.83 15.3%

Greptile Summary

This PR introduces Knip, a tool for identifying unused files and exports, to the Storybook project with custom configuration.

  • Added scripts/knip.config.ts with project-specific settings and dynamic bundler entry detection
  • Integrated Knip into CircleCI workflows (normal, merged, daily) after the build job
  • Added knip script to root package.json and code/package.json for easy execution
  • Included knip dependency in scripts/package.json for development purposes

@webpro
Copy link
Contributor Author

webpro commented Sep 12, 2024

Initial results are lengthy but useful. Took quite a few samples and this list is actionable if you'd ask me. What do you think? Should the issues be dealt with in this PR too? Perhaps that's a bit much, but let's discuss. Here's the starting point:

Unused files (25)
frameworks/react-vite/src/utils.ts
core/src/manager-errors.ts
core/src/manager-api/shortcut.ts
core/src/manager/FakeProvider.tsx
core/src/router/visibility.tsx
core/src/common/utils/notify-telemetry.ts
core/src/common/utils/print-duration.ts
core/src/core-server/__for-testing__/main.ts
core/src/core-server/presets/common-manager.ts
core/src/core-server/presets/common-override-preset.ts
lib/codemod/src/transforms/__tests__/transforms.tests.js
addons/links/src/react/components/RoutedLink.tsx
renderers/vue3/src/docs/utils.ts
addons/controls/src/preset/checkDocsLoaded.ts
frameworks/ember/src/client/preview/config.ts
frameworks/ember/src/client/preview/globals.ts
frameworks/ember/src/client/preview/render.ts
frameworks/ember/src/client/preview/types.ts
lib/cli-storybook/src/doctor/utils.ts
frameworks/nextjs/src/babel/plugins/commonjs.ts
frameworks/nextjs/src/babel/plugins/next-page-config.ts
frameworks/nextjs/src/babel/plugins/next-ssg-transform.ts
addons/onboarding/src/types/response.ts
addons/interactions/src/theme.ts
addons/interactions/src/components/List.tsx
Unused dependencies (152)
lodash                                 addons/controls/package.json                   
ts-dedent                              addons/controls/package.json                   
fs-extra                               addons/docs/package.json                       
ts-dedent                              addons/essentials/package.json                 
@storybook/global                      addons/jest/package.json                       
ts-dedent                              addons/jest/package.json                       
ts-dedent                              addons/links/package.json                      
estraverse                             addons/storysource/package.json                
@storybook/csf                         addons/test/package.json                       
ts-dedent                              addons/themes/package.json                     
@types/semver                          builders/builder-webpack5/package.json         
process                                builders/builder-webpack5/package.json         
semver                                 builders/builder-webpack5/package.json         
url                                    builders/builder-webpack5/package.json         
util                                   builders/builder-webpack5/package.json         
util-deprecate                         builders/builder-webpack5/package.json         
process                                core/package.json                              
util                                   core/package.json                              
@storybook/components                  frameworks/angular/package.json                
@storybook/manager-api                 frameworks/angular/package.json                
@storybook/preview-api                 frameworks/angular/package.json                
@storybook/theming                     frameworks/angular/package.json                
@types/react                           frameworks/angular/package.json                
@types/react-dom                       frameworks/angular/package.json                
@types/semver                          frameworks/angular/package.json                
semver                                 frameworks/angular/package.json                
util-deprecate                         frameworks/angular/package.json                
ts-dedent                              frameworks/ember/package.json                  
@storybook/html                        frameworks/html-vite/package.json              
magic-string                           frameworks/html-vite/package.json              
@storybook/global                      frameworks/html-webpack5/package.json          
@storybook/html                        frameworks/html-webpack5/package.json          
find-up                                frameworks/nextjs/package.json                 
fs-extra                               frameworks/nextjs/package.json                 
pnp-webpack-plugin                     frameworks/nextjs/package.json                 
ts-dedent                              frameworks/nextjs/package.json                 
@storybook/preact                      frameworks/preact-vite/package.json            
@storybook/preact                      frameworks/preact-webpack5/package.json        
@storybook/react                       frameworks/react-vite/package.json             
@storybook/react                       frameworks/react-webpack5/package.json         
@storybook/server                      frameworks/server-webpack5/package.json        
@storybook/svelte                      frameworks/svelte-vite/package.json            
@storybook/svelte                      frameworks/svelte-webpack5/package.json        
@storybook/vue3                        frameworks/vue3-vite/package.json              
@storybook/vue3                        frameworks/vue3-webpack5/package.json          
@storybook/web-components              frameworks/web-components-vite/package.json    
magic-string                           frameworks/web-components-vite/package.json    
@storybook/web-components              frameworks/web-components-webpack5/package.json
dequal                                 lib/blocks/package.json                        
util-deprecate                         lib/blocks/package.json                        
jscodeshift                            lib/cli-storybook/package.json                 
recast                                 lib/codemod/package.json                       
util                                   lib/instrumenter/package.json                  
util                                   lib/test/package.json                          
@happy-dom/global-registrator          package.json                                   
@nx/workspace                          package.json                                   
@storybook/addon-backgrounds           package.json                                   
@storybook/addon-controls              package.json                                   
@storybook/addon-highlight             package.json                                   
@storybook/addon-jest                  package.json                                   
@storybook/addon-mdx-gfm               package.json                                   
@storybook/addon-measure               package.json                                   
@storybook/addon-onboarding            package.json                                   
@storybook/addon-outline               package.json                                   
@storybook/addon-toolbars              package.json                                   
@storybook/angular                     package.json                                   
@storybook/bench                       package.json                                   
@storybook/builder-vite                package.json                                   
@storybook/builder-webpack5            package.json                                   
@storybook/codemod                     package.json                                   
@storybook/csf-plugin                  package.json                                   
@storybook/ember                       package.json                                   
@storybook/html                        package.json                                   
@storybook/html-vite                   package.json                                   
@storybook/html-webpack5               package.json                                   
@storybook/instrumenter                package.json                                   
@storybook/linter-config               package.json                                   
@storybook/nextjs                      package.json                                   
@storybook/preact                      package.json                                   
@storybook/preact-vite                 package.json                                   
@storybook/preact-webpack5             package.json                                   
@storybook/preset-create-react-app     package.json                                   
@storybook/preset-html-webpack         package.json                                   
@storybook/preset-preact-webpack       package.json                                   
@storybook/preset-react-webpack        package.json                                   
@storybook/preset-server-webpack       package.json                                   
@storybook/preset-svelte-webpack       package.json                                   
@storybook/preset-vue3-webpack         package.json                                   
@storybook/react-webpack5              package.json                                   
@storybook/server                      package.json                                   
@storybook/server-webpack5             package.json                                   
@storybook/source-loader               package.json                                   
@storybook/svelte                      package.json                                   
@storybook/svelte-webpack5             package.json                                   
@storybook/testing-library             package.json                                   
@storybook/vue3                        package.json                                   
@storybook/vue3-webpack5               package.json                                   
@storybook/web-components              package.json                                   
@storybook/web-components-vite         package.json                                   
@storybook/web-components-webpack5     package.json                                   
@types/semver                          package.json                                   
@types/serve-static                    package.json                                   
@typescript-eslint/experimental-utils  package.json                                   
@typescript-eslint/parser              package.json                                   
@vitejs/plugin-react                   package.json                                   
@vitejs/plugin-vue                     package.json                                   
@vitest/coverage-v8                    package.json                                   
create-storybook                       package.json                                   
esbuild-loader                         package.json                                   
esbuild-plugin-alias                   package.json                                   
eslint-import-resolver-typescript      package.json                                   
fs-extra                               package.json                                   
glob                                   package.json                                   
http-server                            package.json                                   
process                                package.json                                   
semver                                 package.json                                   
serve-static                           package.json                                   
slash                                  package.json                                   
svelte                                 package.json                                   
util                                   package.json                                   
vite-plugin-inspect                    package.json                                   
@storybook/react                       presets/react-webpack/package.json             
fs-extra                               presets/react-webpack/package.json             
@storybook/global                      presets/server-webpack/package.json            
@storybook/server                      presets/server-webpack/package.json            
@storybook/components                  renderers/html/package.json                    
@storybook/manager-api                 renderers/html/package.json                    
@storybook/preview-api                 renderers/html/package.json                    
@storybook/theming                     renderers/html/package.json                    
@storybook/components                  renderers/preact/package.json                  
@storybook/manager-api                 renderers/preact/package.json                  
@storybook/preview-api                 renderers/preact/package.json                  
@storybook/theming                     renderers/preact/package.json                  
@storybook/components                  renderers/react/package.json                   
@storybook/manager-api                 renderers/react/package.json                   
@storybook/theming                     renderers/react/package.json                   
util-deprecate                         renderers/react/package.json                   
@storybook/components                  renderers/server/package.json                  
@storybook/csf                         renderers/server/package.json                  
@storybook/manager-api                 renderers/server/package.json                  
@storybook/preview-api                 renderers/server/package.json                  
@storybook/theming                     renderers/server/package.json                  
@storybook/components                  renderers/vue3/package.json                    
@storybook/manager-api                 renderers/vue3/package.json                    
@storybook/preview-api                 renderers/vue3/package.json                    
@storybook/theming                     renderers/vue3/package.json                    
@vue/compiler-core                     renderers/vue3/package.json                    
ts-dedent                              renderers/vue3/package.json                    
@storybook/components                  renderers/web-components/package.json          
@storybook/manager-api                 renderers/web-components/package.json          
@storybook/preview-api                 renderers/web-components/package.json          
@storybook/theming                     renderers/web-components/package.json
Unused devDependencies (42)
lodash                                        addons/a11y/package.json                       
react-dom                                     addons/actions/package.json                    
@types/webpack-env                            addons/highlight/package.json                  
formik                                        addons/interactions/package.json               
fs-extra                                      addons/links/package.json                      
@radix-ui/react-dialog                        addons/onboarding/package.json                 
framer-motion                                 addons/onboarding/package.json                 
react-use-measure                             addons/onboarding/package.json                 
react-dom                                     addons/storysource/package.json                
react-dom                                     addons/toolbars/package.json                   
@babel/preset-react                           core/package.json                              
@emotion/use-insertion-effect-with-fallbacks  core/package.json                              
@popperjs/core                                core/package.json                              
assert                                        core/package.json                              
babel-plugin-react-docgen                     core/package.json                              
chai                                          core/package.json                              
css                                           core/package.json                              
markdown-to-jsx                               core/package.json                              
react-draggable                               core/package.json                              
react-resize-detector                         core/package.json                              
tinyspy                                       core/package.json                              
@angular/cli                                  frameworks/angular/package.json                
@types/cross-spawn                            frameworks/angular/package.json                
@types/tmp                                    frameworks/angular/package.json                
cross-spawn                                   frameworks/angular/package.json                
tmp                                           frameworks/angular/package.json                
@types/babel__preset-env                      frameworks/ember/package.json                  
lit                                           frameworks/web-components-webpack5/package.json
unist-util-select                             lib/codemod/package.json                       
util                                          lib/codemod/package.json                       
vfile                                         lib/codemod/package.json                       
slash                                         lib/core-webpack/package.json                  
@types/util-deprecate                         lib/create-storybook/package.json              
preact                                        presets/preact-webpack/package.json            
@vue/compiler-sfc                             presets/vue3-webpack/package.json              
@types/babel-plugin-react-docgen              renderers/react/package.json                   
@types/util-deprecate                         renderers/react/package.json                   
babel-plugin-react-docgen                     renderers/react/package.json                   
@digitak/esrun                                renderers/vue3/package.json                    
@types/prettier                               renderers/vue3/package.json                    
lodash                                        renderers/vue3/package.json                    
web-component-analyzer                        renderers/web-components/package.json
Referenced optional peerDependencies (6)
react                 addons/links/package.json         
vite-plugin-glimmerx  builders/builder-vite/package.json
webpack               frameworks/nextjs/package.json    
react                 lib/blocks/package.json           
react-dom             lib/blocks/package.json           
@storybook/test       renderers/react/package.json
Unlisted dependencies (28)
@babel/core                    addons/docs/src/mdx-loader.ts                                               
webpack                        addons/storysource/src/preset.ts                                            
@storybook/components          core/src/components/components/Button/Docs.mdx                              
component-package              core/src/core-server/utils/__mockdata__/src/componentPath/package.stories.js
webpack-env                    frameworks/ember/src/index.ts                                               
ember-cli-htmlbars             frameworks/ember/template/cli/Button.stories.js                             
sb-original/image-context      frameworks/experimental-nextjs-vite/src/images/decorator.tsx                
sb-original/next/image         frameworks/nextjs/src/images/next-image.tsx                                 
sb-original/next/legacy/image  frameworks/nextjs/src/images/next-legacy-image.tsx                          
fast-glob                      knip.ts                                                                     
picomatch                      knip.ts                                                                     
ansi-regex                     lib/cli-storybook/src/automigrate/fixes/remove-jest-testing-library.test.ts 
mdast-util-mdx-expression      lib/codemod/src/transforms/mdx-to-csf.ts                                    
webpack                        presets/create-react-app/src/helpers/mergePlugins.ts                        
@babel/core                    presets/create-react-app/src/helpers/processCraConfig.ts                    
webpack                        presets/create-react-app/src/helpers/processCraConfig.ts                    
webpack                        presets/create-react-app/src/index.ts                                       
webpack-env                    renderers/html/src/index.ts                                                 
webpack-env                    renderers/preact/src/index.ts                                               
@babel/core                    renderers/react/src/docs/extractArgTypes.test.ts                            
webpack-env                    renderers/react/src/index.ts                                                
webpack-env                    renderers/server/src/index.ts                                               
expect-type                    renderers/vue3/src/__tests__/composeStories/portable-stories.test.ts        
webpack-env                    renderers/vue3/src/index.ts                                                 
expect-type                    renderers/vue3/src/public-types.test.ts                                     
expect-type                    renderers/vue3/src/render.test.ts                                           
tmp                            renderers/web-components/src/docs/web-components-properties.test.ts         
webpack-env                    renderers/web-components/src/index.ts
Unlisted binaries (71)
jiti               addons/a11y/package.json                        
jiti               addons/actions/package.json                     
jiti               addons/backgrounds/package.json                 
jiti               addons/controls/package.json                    
jiti               addons/docs/package.json                        
jiti               addons/essentials/package.json                  
jiti               addons/gfm/package.json                         
jiti               addons/highlight/package.json                   
jiti               addons/interactions/package.json                
jiti               addons/jest/package.json                        
jiti               addons/links/package.json                       
jiti               addons/measure/package.json                     
jiti               addons/onboarding/package.json                  
jiti               addons/outline/package.json                     
jiti               addons/storysource/package.json                 
jiti               addons/test/package.json                        
jiti               addons/themes/package.json                      
jiti               addons/toolbars/package.json                    
jiti               addons/viewport/package.json                    
jiti               builders/builder-vite/package.json              
jiti               builders/builder-webpack5/package.json          
jiti               core/package.json                               
jiti               frameworks/angular/package.json                 
rimraf             frameworks/angular/package.json                 
jiti               frameworks/ember/package.json                   
jiti               frameworks/experimental-nextjs-vite/package.json
jiti               frameworks/html-vite/package.json               
jiti               frameworks/html-webpack5/package.json           
jiti               frameworks/nextjs/package.json                  
jiti               frameworks/preact-vite/package.json             
jiti               frameworks/preact-webpack5/package.json         
jiti               frameworks/react-vite/package.json              
jiti               frameworks/react-webpack5/package.json          
jiti               frameworks/server-webpack5/package.json         
jiti               frameworks/svelte-vite/package.json             
jiti               frameworks/svelte-webpack5/package.json         
jiti               frameworks/sveltekit/package.json               
jiti               frameworks/vue3-vite/package.json               
jiti               frameworks/vue3-webpack5/package.json           
jiti               frameworks/web-components-vite/package.json     
jiti               frameworks/web-components-webpack5/package.json 
jiti               lib/blocks/package.json                         
jiti               lib/cli-storybook/package.json                  
jiti               lib/cli/package.json                            
jiti               lib/codemod/package.json                        
jiti               lib/core-webpack/package.json                   
jiti               lib/create-storybook/package.json               
jiti               lib/csf-plugin/package.json                     
jiti               lib/instrumenter/package.json                   
jiti               lib/react-dom-shim/package.json                 
jiti               lib/source-loader/package.json                  
jiti               lib/test/package.json                           
build-package      package.json                                    
check-package      package.json                                    
ejslint            package.json                                    
pr-log             package.json                                    
publish            package.json                                    
sort-package-json  package.json                                    
jiti               presets/create-react-app/package.json           
jiti               presets/html-webpack/package.json               
jiti               presets/preact-webpack/package.json             
jiti               presets/react-webpack/package.json              
jiti               presets/server-webpack/package.json             
jiti               presets/svelte-webpack/package.json             
jiti               presets/vue3-webpack/package.json               
jiti               renderers/html/package.json                     
jiti               renderers/preact/package.json                   
jiti               renderers/react/package.json                    
jiti               renderers/server/package.json                   
jiti               renderers/vue3/package.json                     
jiti               renderers/web-components/package.json
Unresolved imports (9)
./rsc/server-only.js            frameworks/nextjs/src/rsc/webpack.ts:7:37                                             
./swc/next-swc-loader-patch.js  frameworks/nextjs/src/swc/loader.ts:40:31                                             
./Button                        lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/basic.input.mdx:1:19           
./Button                        lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/component-id.input.mdx:1:19    
./Button                        lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/decorators.input.mdx:1:19      
./Button                        lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/exclude-stories.input.mdx:1:19 
./Button                        lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/parameters.input.mdx:2:19      
./Button                        lib/codemod/src/transforms/__testfixtures__/mdx-to-csf/story-parameters.input.mdx:1:19
#utils                          lib/test/template/stories/module-mocking.stories.ts:6:9
Unused exports (275)
Wrapper                                                   unknown   addons/actions/src/components/ActionLogger/index.tsx:22:14                    
GRID_PARAM_KEY                                            unknown   addons/backgrounds/src/constants.ts:3:14                                      
EVENTS                                                    unknown   addons/backgrounds/src/constants.ts:5:14                                      
defaultComponents                                         unknown   addons/docs/src/DocsRenderer.tsx:16:14                                        
ADDON_ID                                                  unknown   addons/highlight/src/constants.ts:1:14                                        
Exception                                                 unknown   addons/interactions/src/components/Interaction.tsx:118:14                     
StyledIconButton                                          unknown   addons/interactions/src/components/Interaction.tsx:99:14                      
Received                                                  unknown   addons/interactions/src/components/MatcherResult.tsx:38:14                    
Expected                                                  unknown   addons/interactions/src/components/MatcherResult.tsx:45:14                    
NullNode                                                  unknown   addons/interactions/src/components/MethodCall.tsx:159:14                      
UndefinedNode                                             unknown   addons/interactions/src/components/MethodCall.tsx:168:14                      
StringNode                                                unknown   addons/interactions/src/components/MethodCall.tsx:177:14                      
NumberNode                                                unknown   addons/interactions/src/components/MethodCall.tsx:186:14                      
BooleanNode                                               unknown   addons/interactions/src/components/MethodCall.tsx:195:14                      
ArrayNode                                                 unknown   addons/interactions/src/components/MethodCall.tsx:204:14                      
ObjectNode                                                unknown   addons/interactions/src/components/MethodCall.tsx:233:14                      
ClassNode                                                 unknown   addons/interactions/src/components/MethodCall.tsx:292:14                      
FunctionNode                                              unknown   addons/interactions/src/components/MethodCall.tsx:297:14                      
ElementNode                                               unknown   addons/interactions/src/components/MethodCall.tsx:306:14                      
DateNode                                                  unknown   addons/interactions/src/components/MethodCall.tsx:347:14                      
ErrorNode                                                 unknown   addons/interactions/src/components/MethodCall.tsx:361:14                      
RegExpNode                                                unknown   addons/interactions/src/components/MethodCall.tsx:376:14                      
SymbolNode                                                unknown   addons/interactions/src/components/MethodCall.tsx:385:14                      
OtherNode                                                 unknown   addons/interactions/src/components/MethodCall.tsx:395:14                      
StepNode                                                  unknown   addons/interactions/src/components/MethodCall.tsx:400:14                      
StyledIconButton                                          unknown   addons/interactions/src/components/Subnav.tsx:67:14                           
Message                                                   unknown   addons/jest/src/components/Message.tsx:143:14                                 
clear                                                     function  addons/measure/src/box-model/canvas.ts:70:17                                  
drawFloatingLabel                                         function  addons/measure/src/box-model/labels.ts:229:17                                 
EVENTS                                                    unknown   addons/measure/src/constants.ts:5:14                                          
success                                                   unknown   addons/test/src/postinstall-logger.ts:10:14                                   
warning                                                   unknown   addons/test/src/postinstall-logger.ts:11:14                                   
error                                                     unknown   addons/test/src/postinstall-logger.ts:12:14                                   
print                                                     unknown   addons/test/src/postinstall-logger.ts:19:14                                   
printWarning                                              unknown   addons/test/src/postinstall-logger.ts:27:14                                   
info                                                      unknown   addons/test/src/postinstall-logger.ts:9:14                                    
ADDON_PARAM                                               unknown   addons/toolbars/src/constants.ts:2:14                                         
getSelectedItem                                           unknown   addons/toolbars/src/utils/get-selected.ts:8:14                                
UPDATE                                                    unknown   addons/viewport/src/constants.ts:4:14                                         
CONFIGURE                                                 unknown   addons/viewport/src/constants.ts:5:14                                         
SET                                                       unknown   addons/viewport/src/constants.ts:6:14                                         
CHANGED                                                   unknown   addons/viewport/src/constants.ts:7:14                                         
stringifyProcessEnvs                                      function  builders/builder-vite/src/envs.ts:22:17                                       
pluginConfig                                              function  builders/builder-vite/src/vite-config.ts:90:23                                
getManagerMainTemplate                                    function  core/src/builder-manager/utils/template.ts:18:23                              
KEY                                                       unknown   core/src/channels/postmessage/index.ts:21:14                                  
ActionButton                                              unknown   core/src/components/components/ActionBar/ActionBar.tsx:16:14                  
Description                                   Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:105:14                  
Actions                                       Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:112:14                  
ErrorWrapper                                  Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:118:14                  
Error                                         Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:132:14                  
CloseButton                                   Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:65:14                   
Content                                       Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:73:14                   
Row                                           Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:80:14                   
Col                                           Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:86:14                   
Header                                        Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:92:14                   
Title                                         Components  unknown   core/src/components/components/Modal/Modal.styled.tsx:99:14                   
initial                                                   unknown   core/src/components/components/Modal/Modal.tsx:19:14                          
animate                                                   unknown   core/src/components/components/Modal/Modal.tsx:20:14                          
exit                                                      unknown   core/src/components/components/Modal/Modal.tsx:21:14                          
Side                                                      unknown   core/src/components/components/bar/bar.tsx:15:14                              
panelProps                                                unknown   core/src/components/components/tabs/tabs.tsx:114:14                           
babel                                         m           unknown   core/src/core-server/presets/common-preset.ts:109:14                          
title                                         m           unknown   core/src/core-server/presets/common-preset.ts:143:14                          
logLevel                                      m           unknown   core/src/core-server/presets/common-preset.ts:146:14                          
previewHead                                   m           unknown   core/src/core-server/presets/common-preset.ts:148:14                          
env                                           m           unknown   core/src/core-server/presets/common-preset.ts:153:14                          
previewBody                                   m           unknown   core/src/core-server/presets/common-preset.ts:157:14                          
typescript                                    m           unknown   core/src/core-server/presets/common-preset.ts:162:14                          
experimental_serverAPI                        m           unknown   core/src/core-server/presets/common-preset.ts:192:14                          
core                                          m           unknown   core/src/core-server/presets/common-preset.ts:209:14                          
features                                      m           unknown   core/src/core-server/presets/common-preset.ts:216:14                          
experimental_indexers                         m           unknown   core/src/core-server/presets/common-preset.ts:229:14                          
frameworkOptions                              m           unknown   core/src/core-server/presets/common-preset.ts:232:14                          
docs                                          m           unknown   core/src/core-server/presets/common-preset.ts:249:14                          
managerHead                                   m           unknown   core/src/core-server/presets/common-preset.ts:257:14                          
experimental_serverChannel                    m           unknown   core/src/core-server/presets/common-preset.ts:270:14                          
resolvedReact                                 m           unknown   core/src/core-server/presets/common-preset.ts:291:14                          
tags                                          m           unknown   core/src/core-server/presets/common-preset.ts:304:14                          
managerEntries                                m           unknown   core/src/core-server/presets/common-preset.ts:313:14                          
staticDirs                                    m           unknown   core/src/core-server/presets/common-preset.ts:42:14                           
ATTACHED_MDX_TAG                                          unknown   core/src/core-server/utils/StoryIndexGenerator.ts:64:14                       
UNATTACHED_MDX_TAG                                        unknown   core/src/core-server/utils/StoryIndexGenerator.ts:65:14                       
DEBOUNCE                                                  unknown   core/src/core-server/utils/constants.ts:3:14                                  
copyAllStaticFiles                                        function  core/src/core-server/utils/copy-all-static-files.ts:12:23                     
writeStats                                                unknown   core/src/core-server/utils/output-stats.ts:22:14                              
trimQuotes                                                unknown   core/src/docs-tools/argTypes/convert/utils.ts:2:14                            
includesQuotes                                            unknown   core/src/docs-tools/argTypes/convert/utils.ts:3:14                            
javaScriptFactory                                         unknown   core/src/docs-tools/argTypes/docgen/createPropDef.ts:107:14                   
tsFactory                                                 unknown   core/src/docs-tools/argTypes/docgen/createPropDef.ts:114:14                   
flowFactory                                               unknown   core/src/docs-tools/argTypes/docgen/createPropDef.ts:121:14                   
unknownFactory                                            unknown   core/src/docs-tools/argTypes/docgen/createPropDef.ts:128:14                   
isSupportedType                                           function  core/src/manager-api/lib/addons.ts:27:17                                      
transformSetStoriesStoryDataToStoriesHash                 unknown   core/src/manager-api/lib/stories.ts:47:14                                     
init                                          channel     unknown   core/src/manager-api/modules/channel.ts:52:14                                 
init                                          provider    unknown   core/src/manager-api/modules/provider.ts:9:14                                 
defaultStoryMapper                            refs        unknown   core/src/manager-api/modules/refs.ts:97:14                                    
init                                          settings    unknown   core/src/manager-api/modules/settings.ts:35:14                                
defaultShortcuts                              shortcuts   unknown   core/src/manager-api/modules/shortcuts.ts:129:14                              
isMacLike                                     shortcuts   unknown   core/src/manager-api/modules/shortcuts.ts:18:14                               
controlOrMetaKey                              shortcuts   unknown   core/src/manager-api/modules/shortcuts.ts:20:14                               
keys                                          shortcuts   function  core/src/manager-api/modules/shortcuts.ts:22:17                               
init                                          whatsnew    unknown   core/src/manager-api/modules/whatsnew.tsx:28:14                               
NotificationItemSpacer                                    unknown   core/src/manager/components/notifications/NotificationItem.tsx:177:14         
defaultTools                                              unknown   core/src/manager/components/preview/Toolbar.tsx:114:14                        
defaultToolsExtra                                         unknown   core/src/manager/components/preview/Toolbar.tsx:115:14                        
Tools                                                     unknown   core/src/manager/components/preview/Toolbar.tsx:174:14                        
getTools                                                  unknown   core/src/manager/components/preview/Toolbar.tsx:28:14                         
getToolsExtra                                             unknown   core/src/manager/components/preview/Toolbar.tsx:29:14                         
createTabsTool                                            unknown   core/src/manager/components/preview/Toolbar.tsx:79:14                         
Zoom                                                      unknown   core/src/manager/components/preview/tools/zoom.tsx:61:9                       
UnstyledLink                                  S           unknown   core/src/manager/components/preview/utils/components.ts:35:14                 
DesktopOnly                                   S           unknown   core/src/manager/components/preview/utils/components.ts:41:14                 
Img                                                       unknown   core/src/manager/components/sidebar/Brand.tsx:13:14                           
LogoLink                                                  unknown   core/src/manager/components/sidebar/Brand.tsx:19:14                           
StorybookLogoStyled                                       unknown   core/src/manager/components/sidebar/Brand.tsx:6:14                            
SidebarIconButton                                         unknown   core/src/manager/components/sidebar/Menu.tsx:15:14                            
MessageWrapper                                            unknown   core/src/manager/components/sidebar/RefIndicator.tsx:121:14                   
CollapseIconWrapper                                       unknown   core/src/manager/components/sidebar/components/CollapseIcon.tsx:12:14         
Provider                                                  unknown   core/src/manager/index.tsx:101:9                                              
Root                                                      unknown   core/src/manager/index.tsx:32:14                                              
HeaderItem                                                unknown   core/src/manager/settings/shortcuts.tsx:25:14                                 
GridHeaderRow                                             unknown   core/src/manager/settings/shortcuts.tsx:29:14                                 
Row                                                       unknown   core/src/manager/settings/shortcuts.tsx:41:14                                 
GridWrapper                                               unknown   core/src/manager/settings/shortcuts.tsx:48:14                                 
Description                                               unknown   core/src/manager/settings/shortcuts.tsx:56:14                                 
TextInput                                                 unknown   core/src/manager/settings/shortcuts.tsx:64:14                                 
Fade                                                      unknown   core/src/manager/settings/shortcuts.tsx:83:14                                 
PureWhatsNewScreen                                        unknown   core/src/manager/settings/whats_new.tsx:213:25                                
statusPriority                                            unknown   core/src/manager/utils/status.tsx:25:14                                       
removeNoiseFromName                           utils       unknown   core/src/manager/utils/tree.ts:127:14                                         
prevent                                       utils       unknown   core/src/manager/utils/tree.ts:21:14                                          
getPath                                       utils       function  core/src/manager/utils/tree.ts:56:17                                          
AddonStore                                                class     core/src/preview-api/modules/addons/main.ts:6:14                              
getStoryIndex                                             unknown   core/src/preview-api/modules/preview-web/PreviewWeb.mockdata.ts:160:14        
attachedDocsExports                                       unknown   core/src/preview-api/modules/preview-web/PreviewWeb.mockdata.ts:45:14         
extraComponentOneExports                                  unknown   core/src/preview-api/modules/preview-web/PreviewWeb.mockdata.ts:52:14         
AUTODOCS_TAG                                              unknown   core/src/preview-api/modules/preview-web/PreviewWithSelection.tsx:49:14       
ATTACHED_MDX_TAG                                          unknown   core/src/preview-api/modules/preview-web/PreviewWithSelection.tsx:50:14       
UNATTACHED_MDX_TAG                                        unknown   core/src/preview-api/modules/preview-web/PreviewWithSelection.tsx:51:14       
isMdxEntry                                                function  core/src/preview-api/modules/preview-web/PreviewWithSelection.tsx:54:17       
noTargetArgs                                              function  core/src/preview-api/modules/store/args.ts:205:17                             
getField                                                  function  core/src/preview-api/modules/store/csf/composeConfigs.ts:10:17                
getArrayField                                             function  core/src/preview-api/modules/store/csf/composeConfigs.ts:17:17                
getObjectField                                            function  core/src/preview-api/modules/store/csf/composeConfigs.ts:28:17                
getSingletonField                                         function  core/src/preview-api/modules/store/csf/composeConfigs.ts:35:17                
applyHooks                                                unknown   core/src/preview-api/modules/store/hooks.ts:18:16                             
useMemo                                                   unknown   core/src/preview-api/modules/store/hooks.ts:19:14                             
useCallback                                               unknown   core/src/preview-api/modules/store/hooks.ts:20:11                             
useRef                                                    unknown   core/src/preview-api/modules/store/hooks.ts:21:15                             
useState                                                  unknown   core/src/preview-api/modules/store/hooks.ts:22:10                             
useReducer                                                unknown   core/src/preview-api/modules/store/hooks.ts:23:12                             
useEffect                                                 unknown   core/src/preview-api/modules/store/hooks.ts:24:14                             
useChannel                                                unknown   core/src/preview-api/modules/store/hooks.ts:25:13                             
useStoryContext                                           unknown   core/src/preview-api/modules/store/hooks.ts:26:14                             
useParameter                                              unknown   core/src/preview-api/modules/store/hooks.ts:27:19                             
useArgs                                                   unknown   core/src/preview-api/modules/store/hooks.ts:28:16                             
useGlobals                                                unknown   core/src/preview-api/modules/store/hooks.ts:29:11                             
sortStoriesV6                                             unknown   core/src/preview-api/modules/store/sortStories.ts:61:14                       
CalledPreviewMethodBeforeInitializationError              class     core/src/preview-errors.ts:100:14                                             
StoryIndexFetchError                                      class     core/src/preview-errors.ts:117:14                                             
MdxFileWithNoCsfReferencesError                           class     core/src/preview-errors.ts:136:14                                             
EmptyIndexError                                           class     core/src/preview-errors.ts:151:14                                             
NoStoryMatchError                                         class     core/src/preview-errors.ts:165:14                                             
MissingStoryFromCsfFileError                              class     core/src/preview-errors.ts:180:14                                             
StoryStoreAccessedBeforeInitializationError               class     core/src/preview-errors.ts:198:14                                             
MountMustBeDestructuredError                              class     core/src/preview-errors.ts:212:14                                             
NoRenderFunctionError                                     class     core/src/preview-errors.ts:239:14                                             
NoStoryMountedError                                       class     core/src/preview-errors.ts:251:14                                             
NextJsSharpError                                          class     core/src/preview-errors.ts:276:14                                             
NextjsRouterMocksNotAvailable                             class     core/src/preview-errors.ts:291:14                                             
UnsupportedViewportDimensionError                         class     core/src/preview-errors.ts:322:14                                             
MissingStoryAfterHmrError                                 class     core/src/preview-errors.ts:36:14                                              
ImplicitActionsDuringRendering                            class     core/src/preview-errors.ts:52:14                                              
CalledExtractOnStoreError                                 class     core/src/preview-errors.ts:72:14                                              
MissingRenderToCanvasError                                class     core/src/preview-errors.ts:85:14                                              
ConflictingStaticDirConfigError                           class     core/src/server-errors.ts:113:14                                              
InvalidStoriesEntryError                                  class     core/src/server-errors.ts:130:14                                              
WebpackMissingStatsError                                  class     core/src/server-errors.ts:146:14                                              
WebpackInvocationError                                    class     core/src/server-errors.ts:162:14                                              
MissingAngularJsonError                                   class     core/src/server-errors.ts:211:14                                              
AngularLegacyBuildOptionsError                            class     core/src/server-errors.ts:228:14                                              
CriticalPresetLoadError                                   class     core/src/server-errors.ts:246:14                                              
MissingBuilderError                                       class     core/src/server-errors.ts:269:14                                              
GoogleFontsDownloadError                                  class     core/src/server-errors.ts:289:14                                              
GoogleFontsLoadingError                                   class     core/src/server-errors.ts:302:14                                              
NoMatchingExportError                                     class     core/src/server-errors.ts:317:14                                              
MainFileESMOnlyImportError                                class     core/src/server-errors.ts:338:14                                              
MainFileMissingError                                      class     core/src/server-errors.ts:380:14                                              
MainFileEvaluationError                                   class     core/src/server-errors.ts:409:14                                              
GenerateNewProjectOnInitError                             class     core/src/server-errors.ts:427:14                                              
UpgradeStorybookToLowerVersionError                       class     core/src/server-errors.ts:445:14                                              
UpgradeStorybookToSameVersionError                        class     core/src/server-errors.ts:465:14                                              
UpgradeStorybookUnknownCurrentVersionError                class     core/src/server-errors.ts:488:14                                              
UpgradeStorybookInWrongWorkingDirectory                   class     core/src/server-errors.ts:502:14                                              
NoStatsForViteDevError                                    class     core/src/server-errors.ts:515:14                                              
FindPackageVersionsError                                  class     core/src/server-errors.ts:528:14                                              
NxProjectDetectedError                                    class     core/src/server-errors.ts:53:14                                               
MissingFrameworkFieldError                                class     core/src/server-errors.ts:66:14                                               
InvalidFrameworkNameError                                 class     core/src/server-errors.ts:81:14                                               
CouldNotEvaluateFrameworkError                            class     core/src/server-errors.ts:97:14                                               
get                                                       unknown   core/src/telemetry/event-cache.ts:26:14                                       
getFrameworkPackageName                                   unknown   core/src/telemetry/get-framework-info.ts:38:14                                
removeAnsiEscapeCodes                                     function  core/src/telemetry/sanitize.ts:14:17                                          
getRenderType                                             unknown   frameworks/angular/src/client/angular-beta/RendererFactory.ts:44:14           
clearRootHTMLElement                                      function  frameworks/angular/src/client/angular-beta/RendererFactory.ts:48:17           
getComponentPropsDecoratorMetadata                        unknown   frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.ts:126:14
reflectionCapabilities                                    unknown   frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts:27:14   
REMOVED_MODULES                                           unknown   frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts:28:14   
uniqueArray                                               unknown   frameworks/angular/src/client/angular-beta/utils/PropertyExtractor.ts:29:14   
clearStoryUIDs                                            unknown   frameworks/angular/src/client/angular-beta/utils/StoryUID.ts:34:14            
skipSourceRender                                          unknown   frameworks/angular/src/client/docs/sourceDecorator.ts:8:14                    
rendererFactory                                           unknown   frameworks/angular/src/client/render.ts:8:14                                  
getJSONDoc                                                unknown   frameworks/ember/src/client/preview/docs/jsondoc.ts:4:14                      
applyAction                                               function  frameworks/sveltekit/src/mocks/app/forms.ts:15:17                             
deserialize                                               function  frameworks/sveltekit/src/mocks/app/forms.ts:17:17                             
afterNavigate                                             function  frameworks/sveltekit/src/mocks/app/navigation.ts:14:17                        
onNavigate                                                function  frameworks/sveltekit/src/mocks/app/navigation.ts:23:17                        
beforeNavigate                                            function  frameworks/sveltekit/src/mocks/app/navigation.ts:25:17                        
disableScrollHandling                                     function  frameworks/sveltekit/src/mocks/app/navigation.ts:27:17                        
preloadCode                                               function  frameworks/sveltekit/src/mocks/app/navigation.ts:41:17                        
preloadData                                               function  frameworks/sveltekit/src/mocks/app/navigation.ts:43:17                        
pushState                                                 function  frameworks/sveltekit/src/mocks/app/navigation.ts:45:23                        
replaceState                                              function  frameworks/sveltekit/src/mocks/app/navigation.ts:52:23                        
page                                                      unknown   frameworks/sveltekit/src/mocks/app/stores.ts:18:15                            
navigating                                                unknown   frameworks/sveltekit/src/mocks/app/stores.ts:19:15                            
updated                                                   unknown   frameworks/sveltekit/src/mocks/app/stores.ts:24:9                             
getStores                                                 function  frameworks/sveltekit/src/mocks/app/stores.ts:26:17                            
useArgsIfDefined                                          unknown   lib/blocks/src/blocks/useArgs.ts:22:14                                        
useStories                                                function  lib/blocks/src/blocks/useStory.ts:15:17                                       
Table                                                     unknown   lib/blocks/src/components/ArgsTable/ArgJsDoc.tsx:14:14                        
DocsWrapper                                               unknown   lib/blocks/src/components/DocsPage.tsx:428:14                                 
DocsContent                                               unknown   lib/blocks/src/components/DocsPage.tsx:59:14                                  
StyledSyntaxHighlighter                                   unknown   lib/blocks/src/components/Source.tsx:132:17                                   
storyBlockIdFromId                                        unknown   lib/blocks/src/components/Story.tsx:38:14                                     
JsonObject                                                class     lib/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx:1059:14        
JsonValue                                                 class     lib/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx:1403:14        
JsonArray                                                 class     lib/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx:162:14         
JsonAddValue                                              class     lib/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx:17:14          
JsonFunctionValue                                         class     lib/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx:503:14         
getObjectType                                             unknown   lib/blocks/src/controls/react-editable-json-tree/index.tsx:172:9              
ADD_DELTA_TYPE                                            unknown   lib/blocks/src/controls/react-editable-json-tree/index.tsx:173:17             
REMOVE_DELTA_TYPE                                         unknown   lib/blocks/src/controls/react-editable-json-tree/index.tsx:174:18             
UPDATE_DELTA_TYPE                                         unknown   lib/blocks/src/controls/react-editable-json-tree/index.tsx:175:21             
DATA_TYPES                                                unknown   lib/blocks/src/controls/react-editable-json-tree/index.tsx:176:21             
INPUT_USAGE_TYPES                                         unknown   lib/blocks/src/controls/react-editable-json-tree/index.tsx:177:14             
blocker                                                   unknown   lib/cli-storybook/src/autoblock/block-dependencies-versions.ts:24:14          
blocker                                                   unknown   lib/cli-storybook/src/autoblock/block-node-version.ts:7:14                    
blocker                                                   unknown   lib/cli-storybook/src/autoblock/block-storystorev6.ts:8:14                    
initFixes                                                 unknown   lib/cli-storybook/src/automigrate/fixes/index.ts:70:14                        
messageDivider                                            unknown   lib/cli-storybook/src/automigrate/helpers/getMigrationSummary.ts:10:14        
allowList                                                 unknown   lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts:11:14               
disallowList                                              unknown   lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts:31:14               
messageDivider                                            unknown   lib/cli-storybook/src/doctor/getDuplicatedDepsWarnings.ts:8:14                
exec                                                      unknown   lib/cli-storybook/src/link.ts:18:14                                           
addStorybookBlocksPackage                                 function  lib/cli-storybook/src/migrate.ts:73:23                                        
normal                                                    unknown   lib/cli-storybook/src/sandbox-templates.ts:715:14                             
merged                                                    unknown   lib/cli-storybook/src/sandbox-templates.ts:733:14                             
daily                                                     unknown   lib/cli-storybook/src/sandbox-templates.ts:743:14                             
templatesByCadence                                        unknown   lib/cli-storybook/src/sandbox-templates.ts:766:14                             
checkVersionConsistency                                   unknown   lib/cli-storybook/src/upgrade.ts:78:14                                        
generateAddsMap                                           function  lib/source-loader/src/abstract-syntax-tree/generate-helpers.js:133:17         
asImport                                                  function  lib/source-loader/src/abstract-syntax-tree/parse-helpers.js:176:17            
createExpect                                              function  lib/test/src/expect.ts:50:17                                                  
stringifyImports                                          function  presets/server-webpack/src/lib/compiler/stringifier.ts:44:17                  
stringifyDecorators                                       function  presets/server-webpack/src/lib/compiler/stringifier.ts:53:17                  
stringifyDefault                                          function  presets/server-webpack/src/lib/compiler/stringifier.ts:59:17                  
stringifyStory                                            function  presets/server-webpack/src/lib/compiler/stringifier.ts:74:17                  
stringifyObject                                           function  presets/server-webpack/src/lib/compiler/stringifier.ts:7:17                   
skipJsxRender                                             unknown   renderers/react/src/docs/jsxDecorator.tsx:202:14                              
extractFromVueComponentMeta                               unknown   renderers/vue3/src/docs/extractArgTypes.ts:153:14                             
convertVueComponentMetaProp                               unknown   renderers/vue3/src/docs/extractArgTypes.ts:192:14                             
extractFromVueDocgenApi                                   unknown   renderers/vue3/src/docs/extractArgTypes.ts:74:14                              
shouldSkipSourceCodeGeneration                            unknown   renderers/vue3/src/docs/sourceDecorator.ts:115:14                             
formatObject                                              unknown   renderers/vue3/src/docs/sourceDecorator.ts:614:14
Unused exported types (146)
ImpactValue                                    enum       addons/a11y/src/components/Report/Rules.tsx:42:13                                
ReportProps                                    interface  addons/a11y/src/components/Report/index.tsx:11:18                                
Link                                           interface  addons/a11y/src/components/VisionSimulator.tsx:69:18                             
DeprecatedGlobalState                          interface  addons/backgrounds/src/legacy/BackgroundSelectorLegacy.tsx:17:18                 
BackgroundsParameter                           interface  addons/backgrounds/src/legacy/BackgroundSelectorLegacy.tsx:22:18                 
BackgroundSelectorItem                         interface  addons/backgrounds/src/legacy/BackgroundSelectorLegacy.tsx:28:18                 
MdxCompileOptions                              type       addons/docs/src/compiler/index.ts:5:30                                           
StatusBadgeProps                               interface  addons/interactions/src/components/StatusBadge.tsx:7:18                          
StatusIconProps                                interface  addons/interactions/src/components/StatusIcon.tsx:10:18                          
SubnavProps                                    interface  addons/interactions/src/components/Subnav.tsx:44:18                              
HocProps                                       interface  addons/jest/src/hoc/provideJestResult.tsx:31:18                                  
HocState                                       interface  addons/jest/src/hoc/provideJestResult.tsx:36:18                                  
ButtonProps                                    interface  addons/onboarding/src/components/Button/Button.tsx:6:18                          
ToolbarMenuListItemProps                       type       addons/toolbars/src/components/ToolbarMenuListItem.tsx:8:13                      
ToolbarShortcuts                               type       addons/toolbars/src/types.ts:13:13                                               
NormalizedToolbarConfig                        interface  addons/toolbars/src/types.ts:24:18                                               
ToolbarConfig                                  type       addons/toolbars/src/types.ts:41:13                                               
ToolbarShortcutType                            type       addons/toolbars/src/types.ts:4:13                                                
PreviewHtml                                    type       builders/builder-vite/src/transform-iframe-html.ts:4:13                          
PluginConfigType                               type       builders/builder-vite/src/vite-config.ts:30:13                                   
BuilderStartOptions                            type       core/src/builder-manager/types.ts:16:13                                          
BuilderBuildOptions                            type       core/src/builder-manager/types.ts:23:13                                          
NpmListOutput                                  type       core/src/common/js-package-manager/NPMProxy.ts:28:13                             
PnpmListOutput                                 type       core/src/common/js-package-manager/PNPMProxy.ts:32:13                            
Yarn1ListOutput                                type       core/src/common/js-package-manager/Yarn1Proxy.ts:25:13                           
Options                                        type       core/src/common/utils/file-cache.ts:6:13                                         
FileSystemCache                                type       core/src/common/utils/file-cache.ts:7:13                                         
ActionBarProps                                 interface  core/src/components/components/ActionBar/ActionBar.tsx:65:18                     
BadgeProps                                     interface  core/src/components/components/Badge/Badge.tsx:84:18                             
ErrorFormatterProps                            interface  core/src/components/components/ErrorFormatter/ErrorFormatter.tsx:24:18           
IZoomIFrameProps                               type       core/src/components/components/Zoom/ZoomIFrame.tsx:4:13                          
AddonPanelProps                                interface  core/src/components/components/addon-panel/addon-panel.tsx:21:18                 
BarProps                                       interface  core/src/components/components/bar/bar.tsx:57:18                                 
FlexBarProps                                   interface  core/src/components/components/bar/bar.tsx:92:18                                 
SideProps                                      interface  core/src/components/components/bar/bar.tsx:9:18                                  
IconButtonProps                                interface  core/src/components/components/bar/button.tsx:131:18                             
TabButtonProps                                 interface  core/src/components/components/bar/button.tsx:74:18                              
SeparatorProps                                 interface  core/src/components/components/bar/separator.tsx:5:18                            
FieldProps                                     interface  core/src/components/components/form/field/field.tsx:27:18                        
TextareaAutosizeProps         InputComponents  interface  core/src/components/components/form/input/input.tsx:21:18                        
SymbolsProps                                   interface  core/src/components/components/icon/icon.tsx:64:18                               
PlaceholderProps                               interface  core/src/components/components/placeholder/placeholder.tsx:18:18                 
SpacedProps                                    interface  core/src/components/components/spaced/Spaced.tsx:56:18                           
ContainerProps                                 interface  core/src/components/components/spaced/Spaced.tsx:7:18                            
SyntaxHighlighterCustomProps                   interface  core/src/components/components/syntaxhighlighter/syntaxhighlighter-types.ts:15:18
SyntaxHighlighterBaseProps                     interface  core/src/components/components/syntaxhighlighter/syntaxhighlighter-types.ts:35:18
PreProps                                       interface  core/src/components/components/syntaxhighlighter/syntaxhighlighter.tsx:122:18    
SyntaxHighlighterState                         interface  core/src/components/components/syntaxhighlighter/syntaxhighlighter.tsx:194:18    
WrapperProps                                   interface  core/src/components/components/syntaxhighlighter/syntaxhighlighter.tsx:79:18     
VisuallyHiddenProps                            interface  core/src/components/components/tabs/tabs.helpers.tsx:9:18                        
TabWrapperProps                                interface  core/src/components/components/tabs/tabs.tsx:104:18                              
WrapperProps                                   interface  core/src/components/components/tabs/tabs.tsx:17:18                               
TabsStateProps                                 interface  core/src/components/components/tabs/tabs.tsx:214:18                              
TabsStateState                                 interface  core/src/components/components/tabs/tabs.tsx:223:18                              
ContentProps                                   interface  core/src/components/components/tabs/tabs.tsx:60:18                               
ItemProps                                      interface  core/src/components/components/tooltip/ListItem.tsx:116:18                       
RightProps                                     interface  core/src/components/components/tooltip/ListItem.tsx:48:18                        
CenterTextProps                                interface  core/src/components/components/tooltip/ListItem.tsx:75:18                        
LeftProps                                      interface  core/src/components/components/tooltip/ListItem.tsx:99:18                        
TitleProps                                     interface  core/src/components/components/tooltip/ListItem.tsx:9:18                         
TooltipProps                                   interface  core/src/components/components/tooltip/Tooltip.tsx:118:18                        
ArrowProps                                     interface  core/src/components/components/tooltip/Tooltip.tsx:13:18                         
WrapperProps                                   interface  core/src/components/components/tooltip/Tooltip.tsx:90:18                         
TooltipLinkListProps                           interface  core/src/components/components/tooltip/TooltipLinkList.tsx:44:18                 
TooltipMessageProps                            interface  core/src/components/components/tooltip/TooltipMessage.tsx:35:18                  
TooltipNoteProps                               interface  core/src/components/components/tooltip/TooltipNote.tsx:20:18                     
WithTooltipStateProps                          interface  core/src/components/components/tooltip/WithTooltip.tsx:148:18                    
WithTooltipPureProps                           interface  core/src/components/components/tooltip/WithTooltip.tsx:33:18                     
LinkStylesProps                                interface  core/src/components/components/typography/link/link.tsx:22:18                    
LinkInnerProps                                 interface  core/src/components/components/typography/link/link.tsx:30:18                    
SearchResult                                   type       core/src/core-server/utils/search-files.ts:1:13                                  
WhatsNewResponse                               type       core/src/core-server/utils/whats-new.ts:25:13                                    
SubState                      channel          type       core/src/manager-api/modules/channel.ts:50:13                                    
API_Action                    shortcuts        type       core/src/manager-api/modules/shortcuts.ts:116:13                                 
API_Shortcuts                 shortcuts        interface  core/src/manager-api/modules/shortcuts.ts:94:18                                  
QueryParams                   url              interface  core/src/manager-api/modules/url.ts:110:18                                       
SafeTabProps                                   interface  core/src/manager/components/panel/Panel.tsx:13:18                                
IFrameProps                                    interface  core/src/manager/components/preview/Iframe.tsx:20:18                             
ToolData                                       interface  core/src/manager/components/preview/Toolbar.tsx:122:18                           
CustomCanvasRenderer                           type       core/src/manager/components/preview/utils/types.tsx:42:13                        
ExplorerProps                                  interface  core/src/manager/components/sidebar/Explorer.tsx:9:18                            
ClickHandler                                   type       core/src/manager/components/sidebar/RefIndicator.tsx:28:13                       
IndicatorIconProps                             interface  core/src/manager/components/sidebar/RefIndicator.tsx:29:18                       
CurrentVersionProps                            interface  core/src/manager/components/sidebar/RefIndicator.tsx:32:18                       
RefProps                                       interface  core/src/manager/components/sidebar/Refs.tsx:19:18                               
MockDataSet                                    type       core/src/manager/components/sidebar/mockdata.ts:3:13                             
ItemRef                                        interface  core/src/manager/components/sidebar/types.ts:17:18                               
ExpandType                                     interface  core/src/manager/components/sidebar/types.ts:42:18                               
ExpandedProps                                  interface  core/src/manager/components/sidebar/useExpanded.ts:25:18                         
HighlightedProps                               interface  core/src/manager/components/sidebar/useHighlighted.ts:15:18                      
Item                                           type       core/src/manager/container/Preview.tsx:66:13                                     
RootProps                                      interface  core/src/manager/index.tsx:27:18                                                 
Feature                                        type       core/src/manager/settings/shortcuts.tsx:135:13                                   
ShortcutsScreenState                           interface  core/src/manager/settings/shortcuts.tsx:149:18                                   
ShortcutsScreenProps                           interface  core/src/manager/settings/shortcuts.tsx:156:18                                   
ValidationStates                               type       core/src/manager/settings/shortcuts.tsx:60:13                                    
WhatsNewProps                                  interface  core/src/manager/settings/whats_new.tsx:131:18                                   
Listener                                       interface  core/src/preview-api/modules/addons/hooks.ts:503:18                              
EventMap                                       interface  core/src/preview-api/modules/addons/hooks.ts:507:18                              
MakeDecoratorResult                            type       core/src/preview-api/modules/addons/make-decorator.ts:7:13                       
MakeDecoratorOptions                           interface  core/src/preview-api/modules/addons/make-decorator.ts:9:18                       
ControlsMatchers                               type       core/src/preview-api/modules/store/inferControls.ts:15:13                        
Category                                       enum       core/src/preview-errors.ts:13:13                                                 
Category                                       enum       core/src/server-errors.ts:12:13                                                  
IErrorWithStdErrAndStdOut                      interface  core/src/telemetry/sanitize.ts:3:18                                              
EnumTypeChild                                  interface  frameworks/angular/src/client/docs/types.ts:100:18                               
TypeAlias                                      interface  frameworks/angular/src/client/docs/types.ts:79:18                                
EnumType                                       interface  frameworks/angular/src/client/docs/types.ts:90:18                                
JSReturnValue                                  type       frameworks/nextjs/src/font/babel/helpers.ts:7:13                                 
VariableMeta                                   type       frameworks/nextjs/src/font/babel/helpers.ts:9:13                                 
ArgsTableOptionProps                           interface  lib/blocks/src/components/ArgsTable/ArgsTable.tsx:194:18                         
ArgsTableLoadingProps                          interface  lib/blocks/src/components/ArgsTable/ArgsTable.tsx:214:18                         
SectionRowProps                                interface  lib/blocks/src/components/ArgsTable/SectionRow.tsx:12:18                         
TabbedArgsTableProps                           type       lib/blocks/src/components/ArgsTable/TabbedArgsTable.tsx:11:13                    
JsDocReturns                                   interface  lib/blocks/src/components/ArgsTable/types.ts:13:18                               
PropType                                       type       lib/blocks/src/components/ArgsTable/types.ts:29:13                               
PropDefaultValue                               type       lib/blocks/src/components/ArgsTable/types.ts:30:13                               
JsDocParam                                     interface  lib/blocks/src/components/ArgsTable/types.ts:4:18                                
JsDocParamDeprecated                           interface  lib/blocks/src/components/ArgsTable/types.ts:9:18                                
TocParameters                                  interface  lib/blocks/src/components/TableOfContents.tsx:8:18                               
ToolbarProps                                   type       lib/blocks/src/components/Toolbar.tsx:27:13                                      
TypesetProps                                   interface  lib/blocks/src/components/Typeset.tsx:39:18                                      
GetStorybookData                               type       lib/cli-storybook/src/automigrate/helpers/mainConfigFile.ts:160:13               
RunOptions                                     interface  lib/cli-storybook/src/automigrate/types.ts:14:18                                 
CheckOptions                                   interface  lib/cli-storybook/src/automigrate/types.ts:4:18                                  
Cadence                                        type       lib/cli-storybook/src/sandbox-templates.ts:18:13                                 
SkippableTask                                  type       lib/cli-storybook/src/sandbox-templates.ts:4:13                                  
Assertion                                      interface  lib/test/src/expect.ts:28:18                                                     
Expect                                         interface  lib/test/src/expect.ts:36:18                                                     
CoreConfig                                     interface  presets/create-react-app/src/types.ts:23:18                                      
CompileStorybookStoryArgs                      interface  presets/server-webpack/src/lib/compiler/types.ts:1:18                            
StoryFnHtmlReturnType                          type       renderers/html/src/types.ts:10:13                                                
ShowErrorArgs                                  interface  renderers/html/src/types.ts:12:18                                                
ShowErrorArgs                                  interface  renderers/preact/src/types.ts:9:18                                               
PropDefMap                                     interface  renderers/react/src/docs/extractProps.ts:17:18                                   
TypeResolvers                                  interface  renderers/react/src/docs/lib/defaultValues/createFromRawDefaultProp.ts:24:18     
ShowErrorArgs                                  interface  renderers/react/src/types.ts:13:18                                               
StoryFnReactReturnType                         type       renderers/react/src/types.ts:18:13                                               
ShowErrorArgs                                  interface  renderers/server/src/types.ts:20:18                                              
StoryFnServerReturnType                        type       renderers/server/src/types.ts:5:13                                               
StoryContext                                   type       renderers/server/src/types.ts:6:13                                               
ShowErrorArgs                                  interface  renderers/vue3/src/types.ts:13:18                                                
StoryContext                                   type       renderers/vue3/src/types.ts:20:13                                                
StorybookVueApp                                type       renderers/vue3/src/types.ts:22:13                                                
ShowErrorArgs                                  interface  renderers/web-components/src/types.ts:19:18                                      
StoryFnHtmlReturnType                          type       renderers/web-components/src/types.ts:5:13
Unused exported enum members (8)
SERVER                 ProjectType      core/src/cli/project_types.ts:62:3                                       
addLoader              RemovedAPIs      lib/cli-storybook/src/automigrate/fixes/remove-global-client-apis.ts:10:3
getStorybook           RemovedAPIs      lib/cli-storybook/src/automigrate/fixes/remove-global-client-apis.ts:11:3
setAddon               RemovedAPIs      lib/cli-storybook/src/automigrate/fixes/remove-global-client-apis.ts:12:3
clearDecorators        RemovedAPIs      lib/cli-storybook/src/automigrate/fixes/remove-global-client-apis.ts:13:3
UNDETECTED_SB_VERSION  PreCheckFailure  lib/cli-storybook/src/automigrate/types.ts:64:3                          
MAINJS_NOT_FOUND       PreCheckFailure  lib/cli-storybook/src/automigrate/types.ts:65:3                          
MAINJS_EVALUATION      PreCheckFailure  lib/cli-storybook/src/automigrate/types.ts:66:3
Duplicate exports (4)
Message, default            addons/jest/src/components/Message.tsx                                
storybookTest, default      addons/test/src/vitest-plugin/index.ts                                
SyntaxHighlighter, default  core/src/components/components/syntaxhighlighter/syntaxhighlighter.tsx
ColorControl, default       lib/blocks/src/controls/Color.tsx

@webpro
Copy link
Contributor Author

webpro commented Sep 12, 2024

Going to make a new "github-collapsible" reporter for output like this btw 😅

Copy link

nx-cloud bot commented Sep 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 84236d8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@JReinhold
Copy link
Contributor

Damn that's a lot of dirt to cleanup! 😅 I can't verify all of it, but a big portion of this looks good and really useful list!

  1. What should be the final output here? I don't think we should fail CI if Knip finds something - or should we? What about an output in GH checks in PRs, or a GitHub comment? What's possible here, and what's your recommendation?
  2. It lists all the workspace packages as unused dependencies, I wonder if that is correct or if there's actually a reason we do this. code/package.json depends on every single package in the workspace, but I can't find anything about this in the Yarn docs. https://yarnpkg.com/features/workspaces

@webpro
Copy link
Contributor Author

webpro commented Sep 21, 2024

Damn that's a lot of dirt to cleanup! 😅 I can't verify all of it, but a big portion of this looks good and really useful list!

Good! Knip isn't perfect and there will be false positives, but I think, say, 90% accuracy is way more useful than not using Knip at all.

  1. What should be the final output here? I don't think we should fail CI if Knip finds something - or should we? What about an output in GH checks in PRs, or a GitHub comment? What's possible here, and what's your recommendation?

I think the end goal is to have CI fail if Knip finds something.

We're not there yet, and as it's a bit much I guess there should be a plan first. Depending on things like project/team organization, available resources, time, etc.:

  • Unless actively worked on this amount of work is usually not feasible to complete in a single PR due to merge conflicts over time.
  • You could consider to add it to CI, but start with --no-exit-code (and track remaining work somewhere) until inbox 0.
  • Use --workspace [dir] to focus on a single workspace.
  • Use filters such as --files and --dependencies to focus on specific issues types.
  • Use ignore, ignoreDependencies and ignoreBinaries to get rid of false positives (docs). And feel free to report, if Knip has a bug we might be able improve things on both ends (better knip == less config).
  • If the report looks right, use --fix to apply fixes automatically.

I'll hit you up on Discord so we can discuss further if you'd like.

Btw there's a Knip GitHub Action (3rd party).

  1. It lists all the workspace packages as unused dependencies, I wonder if that is correct or if there's actually a reason we do this. code/package.json depends on every single package in the workspace, but I can't find anything about this in the Yarn docs. https://yarnpkg.com/features/workspaces

In general, if both the root and the descendent workspace list a dependency, and the dependency is referenced only in the descendent workspace, it'll be reported as unused in the root workspace.

That said, dependencies for a specific workspace can be ignored like so:

  workspaces: {
    '.': {
      project,
      ignoreDependencies: [/^@storybook\/.*/]
    },

@JReinhold
Copy link
Contributor

Nice!

Then my suggestion is to add this to the CircleCI configuration with --no-exit-code for now, and then work through the reports when we can, until hopefully we'll have fixed or ignored all of them, and then we can turn the exit code back on.

Will you add the CI step and then this might be ready for review?

@webpro webpro force-pushed the chore/add-knip branch 2 times, most recently from bb851c7 to 438a4e6 Compare September 22, 2024 09:32
@webpro webpro marked this pull request as ready for review September 22, 2024 09:57
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

for (const configKey of Object.keys(baseConfig.workspaces)) {
if (match([wsDir], configKey)) {
const manifest = await import(join(baseDir, wsDir, 'package.json'));
const configEntries = (config.workspaces[configKey].entry as string[]) ?? [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: This line assumes config.workspaces[configKey].entry is always defined. Add a check to ensure it exists before casting.

@yannbf yannbf changed the title Add Knip with initial custom config Build: Use Knip for project linting Sep 23, 2024
@JReinhold JReinhold merged commit f2363de into storybookjs:next Sep 27, 2024
53 checks passed
@github-actions github-actions bot mentioned this pull request Sep 27, 2024
10 tasks
@webpro webpro deleted the chore/add-knip branch October 1, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add knip to identify unused files/exports
4 participants