Просмотр исходного кода

style(js): Fix more "inline" style code-block comments (#28684)

Evan Purkhiser 3 лет назад
Родитель
Сommit
179db9daf2

+ 9 - 3
static/app/components/externalIssues/abstractExternalIssueForm.tsx

@@ -26,7 +26,9 @@ type State = {
    * `integrationDetails` when it loads. Null until set.
    */
   dynamicFieldValues: {[key: string]: FieldValue | null} | null;
-  /** Cache of options fetched for async fields. */
+  /**
+   * Cache of options fetched for async fields.
+   */
   fetchedFieldOptionsCache: Record<string, Choices>;
 } & AsyncComponent['state'];
 
@@ -129,7 +131,9 @@ export default class AbstractExternalIssueForm<
     }
   };
 
-  /** For fields with dynamic fields, cache the fetched choices. */
+  /**
+   * For fields with dynamic fields, cache the fetched choices.
+   */
   updateFetchedFieldOptionsCache = (
     field: IssueConfigField,
     result: {value: string; label: string}[]
@@ -196,7 +200,9 @@ export default class AbstractExternalIssueForm<
     return choices.map(([value, label]) => ({value, label}));
   };
 
-  /** If this field is an async select (field.url is not null), add async props. */
+  /**
+   * If this field is an async select (field.url is not null), add async props.
+   */
   getFieldProps = (field: IssueConfigField) =>
     field.url
       ? {

+ 12 - 9
static/app/types/debugFiles.tsx

@@ -44,23 +44,26 @@ export enum CustomRepoType {
 export type AppStoreConnectValidationData = {
   id: string;
   appstoreCredentialsValid: boolean;
-  /** Indicates if the itunesSession is actually *needed* to complete any downloads that are pending. */
+  /**
+   * Indicates if the itunesSession is actually *needed* to complete any
+   * downloads that are pending.
+   */
   pendingDownloads: number;
   /**
-   * The build number of the latest build recognized by sentry. This does not imply the dSYMs for
-   * this build have been fetched. The contents of this string is just a number. This will be null
-   * if no builds can be found.
+   * The build number of the latest build recognized by sentry. This does not
+   * imply the dSYMs for this build have been fetched. The contents of this
+   * string is just a number. This will be null if no builds can be found.
    */
   latestBuildNumber: string | null;
   /**
-   * A human-readable string representing the latest build recognized by sentry. i.e. 3.4.0. This
-   * does not imply the dSYMs for this build have been fetched. This will be null if no builds can
-   * be found.
+   * A human-readable string representing the latest build recognized by
+   * sentry. i.e. 3.4.0. This does not imply the dSYMs for this build have been
+   * fetched. This will be null if no builds can be found.
    */
   latestBuildVersion: string | null;
   /**
-   * Whether the UI should show an alert indicating we need the user to refresh their iTunes
-   * session.
+   * Whether the UI should show an alert indicating we need the user to refresh
+   * their iTunes session.
    */
   promptItunesSession: boolean;
   lastCheckedBuilds: string | null;

+ 7 - 4
static/app/views/organizationIntegrations/integrationRow.tsx

@@ -32,11 +32,14 @@ type Props = {
   publishStatus: 'unpublished' | 'published' | 'internal';
   configurations: number;
   categories: string[];
-
-  /** If provided, render an alert message with this text. */
+  /**
+   * If provided, render an alert message with this text.
+   */
   alertText?: string;
-
-  /** If `alertText` was provided, this text overrides the "Resolve now" message in the alert. */
+  /**
+   * If `alertText` was provided, this text overrides the "Resolve now" message
+   * in the alert.
+   */
   resolveText?: string;
 
   plugin?: PluginWithProjectList;

+ 3 - 1
static/app/views/settings/account/notifications/constants.tsx

@@ -5,7 +5,9 @@ export const ALL_PROVIDERS = {
   slack: 'never',
 };
 
-/** These values are stolen from the DB. */
+/**
+ * These values are stolen from the DB.
+ */
 export const VALUE_MAPPING = {
   default: 0,
   never: 10,

+ 8 - 6
static/app/views/settings/account/notifications/notificationSettingsByProjects.tsx

@@ -50,18 +50,20 @@ class NotificationSettingsByProjects extends AsyncComponent<Props, State> {
     return [['projects', '/projects/']];
   }
 
+  /**
+   * Check the notification settings for how many projects there are.
+   */
   getProjectCount = (): number => {
-    /** Check the notification settings for how many projects there are. */
     const {notificationType, notificationSettings} = this.props;
 
     return Object.values(notificationSettings[notificationType]?.project || {}).length;
   };
 
+  /**
+   * The UI expects projects to be grouped by organization but can also use
+   * this function to make a single group with all organizations.
+   */
   getGroupedProjects = (): {[key: string]: Project[]} => {
-    /**
-     * The UI expects projects to be grouped by organization but can also use
-     * this function to make a single group with all organizations.
-     */
     const {projects: stateProjects} = this.state;
 
     return Object.fromEntries(
@@ -78,10 +80,10 @@ class NotificationSettingsByProjects extends AsyncComponent<Props, State> {
     const canSearch = this.getProjectCount() >= MIN_PROJECTS_FOR_SEARCH;
     const shouldPaginate = projects.length >= MIN_PROJECTS_FOR_PAGINATION;
 
-    // eslint-disable-next-line react/prop-types
     const renderSearch: RenderSearch = ({defaultSearchBar}) => (
       <StyledSearchWrapper>{defaultSearchBar}</StyledSearchWrapper>
     );
+
     return (
       <React.Fragment>
         {canSearch &&