mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 13:31:54 +00:00
Added ts_projects for storybook files in client/* (#59400)
* added ts_projects for storybook files in client/* * re-ran configure * moved custom_js group up to top level
This commit is contained in:
parent
a834619212
commit
dab9f31e97
@ -3,6 +3,7 @@
|
||||
# Source files:
|
||||
# gazelle:js_files src/**/*.{ts,tsx}
|
||||
# gazelle:js_files globals.d.ts
|
||||
# gazelle:js_custom_files stories **/*.story.{ts,tsx}
|
||||
|
||||
# Test files, snapshots etc:
|
||||
# gazelle:js_test_files **/*.test.{ts,tsx}
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//client/shared/dev:tools.bzl", "module_style_typings")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root", "eslint_test_with_types")
|
||||
|
||||
# TODO(bazel): storybook build
|
||||
# gazelle:exclude **/*.story.{ts,tsx}
|
||||
load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root")
|
||||
|
||||
# gazelle:js_resolve **/*.module.scss :module_style_typings
|
||||
|
||||
@ -14,20 +11,6 @@ npm_link_all_packages(name = "node_modules")
|
||||
|
||||
eslint_config_and_lint_root()
|
||||
|
||||
# Temporary ESLint target to lint stories. This will be removed once we have a
|
||||
# custom gazelle targets. E.g., `gazelle:custom_js_files stories src/**/*.story.tsx`
|
||||
eslint_test_with_types(
|
||||
name = "stories_eslint",
|
||||
srcs = glob([
|
||||
"src/**/*.story.tsx",
|
||||
"src/**/*.fixtures.ts",
|
||||
]),
|
||||
config = ":eslint_config",
|
||||
deps = [
|
||||
"//:node_modules/@types/node",
|
||||
],
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
@ -287,3 +270,34 @@ vitest_test(
|
||||
":snapshots",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "stories",
|
||||
srcs = [
|
||||
"src/components/CodeSnippet.story.tsx",
|
||||
"src/components/Toggle.story.tsx",
|
||||
"src/components/panel/TabbedPanelContent.story.tsx",
|
||||
"src/search-ui/components/RepoMetadata.story.tsx",
|
||||
"src/search-ui/components/SyntaxHighlightedSearchQuery.story.tsx",
|
||||
"src/search-ui/input/BaseCodeMirrorQueryInput.story.tsx",
|
||||
"src/search-ui/input/SearchBox.story.tsx",
|
||||
"src/search-ui/input/SearchContextMenu.story.tsx",
|
||||
"src/search-ui/input/SearchContextMenuItem.story.tsx",
|
||||
"src/search-ui/results/filters/NewSearchFilters.story.tsx",
|
||||
"src/search-ui/results/progress/StreamingProgress.story.tsx",
|
||||
"src/search-ui/results/progress/StreamingProgressSkippedPopover.story.tsx",
|
||||
],
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
":branded_lib",
|
||||
":node_modules/@sourcegraph/shared",
|
||||
":node_modules/@sourcegraph/wildcard",
|
||||
"//:node_modules/@storybook/addon-actions",
|
||||
"//:node_modules/@storybook/react",
|
||||
"//:node_modules/@types/react",
|
||||
"//:node_modules/@types/sinon",
|
||||
"//:node_modules/react",
|
||||
"//:node_modules/rxjs",
|
||||
"//:node_modules/sinon",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1,24 +1,22 @@
|
||||
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
|
||||
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
|
||||
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
|
||||
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("//dev:defs.bzl", "sass", "ts_project", "vitest_test")
|
||||
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
|
||||
load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations")
|
||||
load("//client/shared/dev:build_code_intel_extensions.bzl", "build_code_intel_extensions")
|
||||
load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations")
|
||||
load("//client/shared/dev:tools.bzl", "module_style_typings")
|
||||
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root", "eslint_test_with_types")
|
||||
load("//dev:defs.bzl", "sass", "ts_project", "vitest_test")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root")
|
||||
|
||||
# TODO(bazel): storybook build
|
||||
# gazelle:exclude **/*.story.{ts,tsx}
|
||||
# gazelle:js_custom_files stories src/**/*.story.tsx
|
||||
|
||||
# gazelle:js_resolve **/*.module.scss :module_style_typings
|
||||
|
||||
# Assets included as data
|
||||
# gazelle:js_ignore_imports ../../../../assets/img/sourcegraph-mark.svg
|
||||
|
||||
# Bundled [s]css:
|
||||
# gazelle:js_resolve **/branded.scss :src/branded.css
|
||||
# gazelle:js_ignore_imports **/branded.scss
|
||||
# gazelle:js_ignore_imports **/app.scss
|
||||
|
||||
npm_link_all_packages(name = "node_modules")
|
||||
|
||||
@ -28,21 +26,6 @@ eslint_config_and_lint_root(
|
||||
],
|
||||
)
|
||||
|
||||
# Temporary ESLint target to lint stories. This will be removed once we have a
|
||||
# custom gazelle targets. E.g., `gazelle:custom_js_files stories src/**/*.story.tsx`
|
||||
eslint_test_with_types(
|
||||
name = "stories_eslint",
|
||||
srcs = glob([
|
||||
"src/**/*.story.tsx",
|
||||
"src/**/*.fixtures.ts",
|
||||
]),
|
||||
config = ":eslint_config",
|
||||
deps = [
|
||||
":node_modules/@sourcegraph/shared", # required for import/extensions rule not to fail.
|
||||
"//:node_modules/@types/node",
|
||||
],
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
@ -411,3 +394,30 @@ copy_to_directory(
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "stories",
|
||||
srcs = [
|
||||
"src/browser-extension/after-install-page/AfterInstallPageContent.story.tsx",
|
||||
"src/browser-extension/options-menu/OptionsPage.story.tsx",
|
||||
"src/shared/components/HoverOverlay.story.tsx",
|
||||
],
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
":browser",
|
||||
":module_style_typings",
|
||||
":node_modules/@sourcegraph/common",
|
||||
":node_modules/@sourcegraph/shared",
|
||||
":node_modules/@sourcegraph/wildcard",
|
||||
"//:node_modules/@atlassian/aui",
|
||||
"//:node_modules/@storybook/addon-actions",
|
||||
"//:node_modules/@storybook/react",
|
||||
"//:node_modules/@types/classnames",
|
||||
"//:node_modules/@types/react",
|
||||
"//:node_modules/classnames",
|
||||
"//:node_modules/mdi-react",
|
||||
"//:node_modules/react",
|
||||
"//:node_modules/react-router-dom",
|
||||
"//:node_modules/rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
load("@aspect_rules_js//js:defs.bzl", "js_library")
|
||||
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root", "eslint_test_with_types")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root")
|
||||
|
||||
# dts-only done manually
|
||||
# gazelle:js disabled
|
||||
@ -10,17 +10,6 @@ npm_link_all_packages(name = "node_modules")
|
||||
|
||||
eslint_config_and_lint_root()
|
||||
|
||||
# Temporary ESLint target to lint stories. This will be removed once we have a
|
||||
# custom gazelle targets. E.g., `gazelle:custom_js_files stories src/**/*.story.tsx`
|
||||
eslint_test_with_types(
|
||||
name = "stories_eslint",
|
||||
srcs = glob(["webview/src/**/*.story.tsx"]),
|
||||
config = ":eslint_config",
|
||||
deps = [
|
||||
"//:node_modules/@types/node",
|
||||
],
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
load("//dev:defs.bzl", "sass", "ts_project")
|
||||
load("//client/shared/dev:tools.bzl", "module_style_typings")
|
||||
load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations")
|
||||
load("@aspect_rules_js//js:defs.bzl", "js_library")
|
||||
|
||||
# TODO(bazel): storybook build
|
||||
# gazelle:exclude **/*.story.{ts,tsx}
|
||||
load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations")
|
||||
load("//client/shared/dev:tools.bzl", "module_style_typings")
|
||||
load("//dev:defs.bzl", "sass", "ts_project")
|
||||
|
||||
# gazelle:js_resolve **/*.module.scss :module_style_typings
|
||||
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
|
||||
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//client/shared/dev:generate_schema.bzl", "generate_schema")
|
||||
load("//client/shared/dev:generate_graphql_operations.bzl", "generate_graphql_operations")
|
||||
load("//client/shared/dev:generate_schema.bzl", "generate_schema")
|
||||
load("//client/shared/dev:tools.bzl", "module_style_typings")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root", "eslint_test_with_types")
|
||||
|
||||
# TODO(bazel): storybook build
|
||||
# gazelle:exclude **/*.story.{ts,tsx}
|
||||
load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root")
|
||||
|
||||
# gazelle:js_resolve **/*.module.scss :module_style_typings
|
||||
# gazelle:js_resolve ../graphql-operations //client/shared:graphql_operations
|
||||
@ -18,20 +15,6 @@ npm_link_all_packages(name = "node_modules")
|
||||
|
||||
eslint_config_and_lint_root()
|
||||
|
||||
# Temporary ESLint target to lint stories. This will be removed once we have a
|
||||
# custom gazelle targets. E.g., `gazelle:custom_js_files stories src/**/*.story.tsx`
|
||||
eslint_test_with_types(
|
||||
name = "stories_eslint",
|
||||
srcs = glob([
|
||||
"src/**/*.story.tsx",
|
||||
"src/**/*.fixtures.ts",
|
||||
]),
|
||||
config = ":eslint_config",
|
||||
deps = [
|
||||
"//:node_modules/@types/node",
|
||||
],
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
@ -528,3 +511,23 @@ vitest_test(
|
||||
":snapshots",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "stories",
|
||||
srcs = [
|
||||
"src/actions/ActionItem.story.tsx",
|
||||
"src/symbols/SymbolTag.story.tsx",
|
||||
],
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
":graphql_operations",
|
||||
":node_modules/@sourcegraph/common",
|
||||
":node_modules/@sourcegraph/wildcard",
|
||||
":shared_lib",
|
||||
"//:node_modules/@storybook/addon-actions",
|
||||
"//:node_modules/@storybook/react",
|
||||
"//:node_modules/@types/history",
|
||||
"//:node_modules/history",
|
||||
"//:node_modules/rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
@ -10,8 +10,6 @@ load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//dev:esbuild.bzl", "esbuild_web_app")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root")
|
||||
|
||||
# gazelle:js_custom_files stories **/*.story.{ts,tsx}
|
||||
|
||||
# gazelle:js_resolve **/*.schema.json //schema:schema-json
|
||||
# gazelle:js_resolve **/*.module.scss :module_style_typings
|
||||
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
|
||||
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
|
||||
load("@npm//:defs.bzl", "npm_link_all_packages")
|
||||
load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//client/shared/dev:tools.bzl", "module_style_typings")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root", "eslint_test_with_types")
|
||||
|
||||
# TODO(bazel): storybook build
|
||||
# gazelle:exclude **/*.story.{ts,tsx}
|
||||
# gazelle:exclude **/testing/globals.d.ts
|
||||
load("//dev:defs.bzl", "npm_package", "sass", "ts_project", "vitest_test")
|
||||
load("//dev:eslint.bzl", "eslint_config_and_lint_root")
|
||||
|
||||
# gazelle:js_resolve **/*.module.scss :module_style_typings
|
||||
# gazelle:js_ignore_imports **/global-styles/index.scss
|
||||
@ -16,20 +12,6 @@ npm_link_all_packages(name = "node_modules")
|
||||
|
||||
eslint_config_and_lint_root()
|
||||
|
||||
# Temporary ESLint target to lint stories. This will be removed once we have a
|
||||
# custom gazelle targets. E.g., `gazelle:custom_js_files stories src/**/*.story.tsx`
|
||||
eslint_test_with_types(
|
||||
name = "stories_eslint",
|
||||
srcs = glob([
|
||||
"src/**/*.story.tsx",
|
||||
"src/**/*.fixtures.ts",
|
||||
]),
|
||||
config = ":eslint_config",
|
||||
deps = [
|
||||
"//:node_modules/@types/node",
|
||||
],
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
@ -601,3 +583,80 @@ vitest_test(
|
||||
":wildcard_tests",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "stories",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"src/components/Alert/Alert.story.tsx",
|
||||
"src/components/Badge/Badge.story.tsx",
|
||||
"src/components/Badge/ProductStatusBadge.story.tsx",
|
||||
"src/components/Breadcrumbs/Breadcrumbs.story.tsx",
|
||||
"src/components/Button/story/Button.story.tsx",
|
||||
"src/components/ButtonLink/ButtonLink.story.tsx",
|
||||
"src/components/Card/Card.story.tsx",
|
||||
"src/components/Charts/components/bar-chart/BarChart.story.tsx",
|
||||
"src/components/Charts/components/line-chart/components/tooltip/TooltipContent.story.tsx",
|
||||
"src/components/Charts/components/line-chart/story/LineChart.story.tsx",
|
||||
"src/components/Charts/components/pie-chart/PieChart.story.tsx",
|
||||
"src/components/Charts/components/stacked-meter/StackedMeter.story.tsx",
|
||||
"src/components/Charts/core/components/SvgRoot.story.tsx",
|
||||
"src/components/Charts/core/components/scroll-box/ScrollBox.story.tsx",
|
||||
"src/components/Collapse/Collapse.story.tsx",
|
||||
"src/components/Combobox/Combobox.story.tsx",
|
||||
"src/components/Combobox/MultiCombobox.story.tsx",
|
||||
"src/components/Container/Container.story.tsx",
|
||||
"src/components/Feedback/FeedbackBadge/FeedbackBadge.story.tsx",
|
||||
"src/components/Feedback/FeedbackPrompt/FeedbackPrompt.story.tsx",
|
||||
"src/components/Feedback/FeedbackText/FeedbackText.story.tsx",
|
||||
"src/components/Form/Checkbox/Checkbox.story.tsx",
|
||||
"src/components/Form/Input/Input.story.tsx",
|
||||
"src/components/Form/RadioButton/RadioButton.story.tsx",
|
||||
"src/components/Form/Select/Select.story.tsx",
|
||||
"src/components/Form/TextArea/TextArea.story.tsx",
|
||||
"src/components/Grid/Grid.story.tsx",
|
||||
"src/components/Icon/Icon.story.tsx",
|
||||
"src/components/Link/Link/Link.story.tsx",
|
||||
"src/components/LoadingSpinner/LoadingSpinner.story.tsx",
|
||||
"src/components/Menu/Menu.story.tsx",
|
||||
"src/components/Modal/Modal.story.tsx",
|
||||
"src/components/NavMenu/NavMenu.story.tsx",
|
||||
"src/components/PageHeader/PageHeader.story.tsx",
|
||||
"src/components/PageSelector/PageSelector.story.tsx",
|
||||
"src/components/PageSwitcher/PageSwitcher.story.tsx",
|
||||
"src/components/Panel/story/Panel.story.tsx",
|
||||
"src/components/Popover/story/Popover.story.tsx",
|
||||
"src/components/Tabs/Tabs.story.tsx",
|
||||
"src/components/Tooltip/Tooltip.story.tsx",
|
||||
"src/components/Tree/Tree.story.tsx",
|
||||
"src/components/Typography/Typography.story.tsx",
|
||||
"src/global-styles/GlobalStylesStory/GlobalStyles.story.tsx",
|
||||
],
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
":module_style_typings",
|
||||
":node_modules/@sourcegraph/common",
|
||||
":wildcard_lib",
|
||||
":wildcard_tests",
|
||||
"//:node_modules/@mdi/js",
|
||||
"//:node_modules/@storybook/addon-actions",
|
||||
"//:node_modules/@storybook/addon-designs",
|
||||
"//:node_modules/@storybook/addons",
|
||||
"//:node_modules/@storybook/react",
|
||||
"//:node_modules/@types/classnames",
|
||||
"//:node_modules/@types/d3-time-format",
|
||||
"//:node_modules/@types/lodash",
|
||||
"//:node_modules/@types/react",
|
||||
"//:node_modules/@types/react-resizable",
|
||||
"//:node_modules/@visx/axis",
|
||||
"//:node_modules/@visx/responsive",
|
||||
"//:node_modules/@visx/scale",
|
||||
"//:node_modules/classnames",
|
||||
"//:node_modules/d3-time-format",
|
||||
"//:node_modules/lodash",
|
||||
"//:node_modules/mdi-react",
|
||||
"//:node_modules/react",
|
||||
"//:node_modules/react-resizable",
|
||||
"//:node_modules/rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user