Skip to content

Prevents direct imports of `@sentry/browser`

Miguel Rincon requested to merge 339335-prevents-importing-sentry-directly into master

What does this MR do and why?

As a follow up from !134047 (merged) we prevent direct imports of sentry so the package is not loaded unless sentry is configured.

Screenshots or screen recordings

NA

How to set up and validate locally

Try the following import in any file:

import * as Sentry from '@sentry/browser';

The import should be prevented by eslint.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #339335 (closed)

Edited by Miguel Rincon

Merge request reports