Browse Source

chore(js): Avoid default export for prop-types (#33102)

Evan Purkhiser 2 years ago
parent
commit
2637c9b670

+ 1 - 1
static/app/bootstrap/exportGlobals.tsx

@@ -3,7 +3,7 @@ import {findDOMNode, render} from 'react-dom';
 import * as ReactRouter from 'react-router';
 import * as Sentry from '@sentry/react';
 import moment from 'moment';
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 import Reflux from 'reflux';
 
 import plugins from 'sentry/plugins';

+ 1 - 1
static/app/components/asyncComponent.tsx

@@ -2,7 +2,7 @@ import {Component} from 'react';
 import {RouteComponentProps} from 'react-router';
 import * as Sentry from '@sentry/react';
 import isEqual from 'lodash/isEqual';
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 import {Client, ResponseMeta} from 'sentry/api';
 import AsyncComponentSearchInput from 'sentry/components/asyncComponentSearchInput';

+ 1 - 1
static/app/components/sparklines/index.tsx

@@ -1,5 +1,5 @@
 import {Sparklines} from 'react-sparklines';
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 /**
  * This is required because:

+ 1 - 1
static/app/sentryTypes.tsx

@@ -1,4 +1,4 @@
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 const Avatar = PropTypes.shape({
   avatarType: PropTypes.oneOf(['letter_avatar', 'upload', 'gravatar']),

+ 1 - 1
static/app/views/organizationGroupDetails/groupDetails.tsx

@@ -1,7 +1,7 @@
 import {cloneElement, Component, Fragment, isValidElement} from 'react';
 import {browserHistory, RouteComponentProps} from 'react-router';
 import * as Sentry from '@sentry/react';
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 import {Client} from 'sentry/api';
 import LoadingError from 'sentry/components/loadingError';

+ 1 - 1
tests/js/setup.ts

@@ -8,7 +8,7 @@ import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
 import Enzyme from 'enzyme'; // eslint-disable-line no-restricted-imports
 import {Location} from 'history';
 import MockDate from 'mockdate';
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 import * as qs from 'query-string';
 
 import type {Client} from 'sentry/__mocks__/api';

+ 1 - 1
tests/js/spec/views/accountAuthorization.spec.jsx

@@ -1,4 +1,4 @@
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 import {mountWithTheme} from 'sentry-test/enzyme';
 

+ 1 - 1
tests/js/spec/views/accountSubscriptions.spec.jsx

@@ -1,4 +1,4 @@
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 import {mountWithTheme} from 'sentry-test/enzyme';
 

+ 1 - 1
tests/js/spec/views/organizationGroupDetails/groupMergedView.spec.jsx

@@ -1,4 +1,4 @@
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 import {mountWithTheme} from 'sentry-test/enzyme';
 

+ 1 - 1
tests/js/spec/views/organizationGroupDetails/organizationGroupEvents.spec.jsx

@@ -1,5 +1,5 @@
 import {browserHistory} from 'react-router';
-import PropTypes from 'prop-types';
+import * as PropTypes from 'prop-types';
 
 import {mountWithTheme, shallow} from 'sentry-test/enzyme';
 

Some files were not shown because too many files changed in this diff