From 3a652273bf5d798995a7ad691acff95761e2de72 Mon Sep 17 00:00:00 2001 From: Ash Anand Date: Tue, 8 Oct 2024 17:47:25 -0400 Subject: [PATCH] update documentation --- packages/babel-plugin-component-annotate/README.md | 11 ++++++++++- .../dev-utils/src/generate-documentation-table.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/babel-plugin-component-annotate/README.md b/packages/babel-plugin-component-annotate/README.md index 7d079934..b1fcd255 100644 --- a/packages/babel-plugin-component-annotate/README.md +++ b/packages/babel-plugin-component-annotate/README.md @@ -47,6 +47,14 @@ Using pnpm: pnpm add @sentry/babel-plugin-component-annotate --save-dev ``` +## Options + +### `ignoreComponents` + +Type: `string[]` + +A list of strings representing the names of components to ignore. The plugin will not perform apply `data-sentry` annotations on the DOM element for these components. + ## Example ```js @@ -57,7 +65,8 @@ pnpm add @sentry/babel-plugin-component-annotate --save-dev plugins: [ // Put this plugin before any other plugins you have that transform JSX code - ['@sentry/babel-plugin-component-annotate'] + // The options are set by providing an object as the second element in the array, but not required + ['@sentry/babel-plugin-component-annotate', {ignoreComponents: ['Foo', 'Bar']}] ], } ``` diff --git a/packages/dev-utils/src/generate-documentation-table.ts b/packages/dev-utils/src/generate-documentation-table.ts index 4b8c0ce9..488bb30b 100644 --- a/packages/dev-utils/src/generate-documentation-table.ts +++ b/packages/dev-utils/src/generate-documentation-table.ts @@ -363,7 +363,7 @@ type IncludeEntry = { name: "ignoreComponents", type: "string[]", fullDescription: - "A list of strings representing the names of components to ignore. The plugin will not perform apply `data-sentry` annotations on the DOM element for this component.", + "A list of strings representing the names of components to ignore. The plugin will not perform apply `data-sentry` annotations on the DOM element for these components.", supportedBundlers: ["webpack", "vite", "rollup"], }, // TODO: Support this option in the future