chore: add prettier-plugin-jsdoc (#28551)

This commit is contained in:
Hossein Mohammadi 2020-12-28 11:00:18 +03:30 committed by GitHub
parent 076f5f1f00
commit 04bfa3c54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 86 additions and 124 deletions

View File

@ -1,6 +1,4 @@
/** /** @jest-environment node */
* @jest-environment node
*/
import getScroll from '../getScroll'; import getScroll from '../getScroll';
describe('getScroll node', () => { describe('getScroll node', () => {

View File

@ -1,5 +1,6 @@
/** /**
* Wrap of sub component which need use as Button capacity (like Icon component). * Wrap of sub component which need use as Button capacity (like Icon component).
*
* This helps accessibility reader to tread as a interactive button to operation. * This helps accessibility reader to tread as a interactive button to operation.
*/ */
import * as React from 'react'; import * as React from 'react';

View File

@ -5,12 +5,10 @@ export const tuple = <T extends string[]>(...args: T) => args;
export const tupleNum = <T extends number[]>(...args: T) => args; export const tupleNum = <T extends number[]>(...args: T) => args;
/** /**
* https://stackoverflow.com/a/59187769 * https://stackoverflow.com/a/59187769 Extract the type of an element of an array/tuple without
* Extract the type of an element of an array/tuple without performing indexing * performing indexing
*/ */
export type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never; export type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never;
/** /** https://github.com/Microsoft/TypeScript/issues/29729 */
* https://github.com/Microsoft/TypeScript/issues/29729
*/
export type LiteralUnion<T extends U, U> = T | (U & {}); export type LiteralUnion<T extends U, U> = T | (U & {});

View File

@ -19,9 +19,7 @@ function getDefaultTarget() {
// Affix // Affix
export interface AffixProps { export interface AffixProps {
/** /** 距离窗口顶部达到指定偏移量后触发 */
*
*/
offsetTop?: number; offsetTop?: number;
/** 距离窗口底部达到指定偏移量后触发 */ /** 距离窗口底部达到指定偏移量后触发 */
offsetBottom?: number; offsetBottom?: number;

View File

@ -17,9 +17,7 @@ import ErrorBoundary from './ErrorBoundary';
import { replaceElement } from '../_util/reactNode'; import { replaceElement } from '../_util/reactNode';
export interface AlertProps { export interface AlertProps {
/** /** Type of Alert styles, options:`success`, `info`, `warning`, `error` */
* Type of Alert styles, options:`success`, `info`, `warning`, `error`
*/
type?: 'success' | 'info' | 'warning' | 'error'; type?: 'success' | 'info' | 'warning' | 'error';
/** Whether Alert can be closed */ /** Whether Alert can be closed */
closable?: boolean; closable?: boolean;

View File

@ -1,8 +1,8 @@
/** /**
* TODO: 4.0 * TODO: 4.0
* - remove `dataSource` * - remove `dataSource`
* - `size` not work with customizeInput * - `size` not work with customizeInput
* - customizeInput not feedback `ENTER` key since accessibility enhancement * - customizeInput not feedback `ENTER` key since accessibility enhancement
*/ */
import * as React from 'react'; import * as React from 'react';

View File

@ -22,7 +22,7 @@ export interface AvatarProps {
/** Srcset of image avatar */ /** Srcset of image avatar */
srcSet?: string; srcSet?: string;
draggable?: boolean; draggable?: boolean;
/** icon to be used in avatar */ /** Icon to be used in avatar */
icon?: React.ReactNode; icon?: React.ReactNode;
style?: React.CSSProperties; style?: React.CSSProperties;
prefixCls?: string; prefixCls?: string;

View File

@ -22,7 +22,7 @@ export interface BadgeProps {
showZero?: boolean; showZero?: boolean;
/** Max count to show */ /** Max count to show */
overflowCount?: number; overflowCount?: number;
/** whether to show red dot without number */ /** Whether to show red dot without number */
dot?: boolean; dot?: boolean;
style?: React.CSSProperties; style?: React.CSSProperties;
prefixCls?: string; prefixCls?: string;

View File

@ -26,10 +26,7 @@ const BreadcrumbItem: BreadcrumbItemInterface = ({
}) => { }) => {
const { getPrefixCls } = React.useContext(ConfigContext); const { getPrefixCls } = React.useContext(ConfigContext);
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
/** /** If overlay is have Wrap a DropDown */
* if overlay is have
* Wrap a DropDown
*/
const renderBreadcrumbNode = (breadcrumbItem: React.ReactNode) => { const renderBreadcrumbNode = (breadcrumbItem: React.ReactNode) => {
if (overlay) { if (overlay) {
return ( return (

View File

@ -140,7 +140,7 @@ const InternalButton: React.ForwardRefRenderFunction<unknown, ButtonProps> = (pr
icon, icon,
ghost = false, ghost = false,
block = false, block = false,
/** if we extract items here, we dont need use omit.js */ /** If we extract items here, we don't need use omit.js */
// React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`. // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
htmlType = 'button' as ButtonProps['htmlType'], htmlType = 'button' as ButtonProps['htmlType'],
...rest ...rest

View File

@ -93,7 +93,7 @@ export interface CascaderProps {
name?: string; name?: string;
/** 输入框id */ /** 输入框id */
id?: string; id?: string;
/** whether has border style */ /** Whether has border style */
bordered?: boolean; bordered?: boolean;
/** 禁用 */ /** 禁用 */
disabled?: boolean; disabled?: boolean;
@ -115,7 +115,7 @@ export interface CascaderProps {
inputPrefixCls?: string; inputPrefixCls?: string;
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
popupVisible?: boolean; popupVisible?: boolean;
/** use this after antd@3.7.0 */ /** Use this after antd@3.7.0 */
fieldNames?: FieldNamesType; fieldNames?: FieldNamesType;
suffixIcon?: React.ReactNode; suffixIcon?: React.ReactNode;
dropdownRender?: (menus: React.ReactNode) => React.ReactNode; dropdownRender?: (menus: React.ReactNode) => React.ReactNode;

View File

@ -9,7 +9,7 @@ export interface CommentProps {
author?: React.ReactNode; author?: React.ReactNode;
/** The element to display as the comment avatar - generally an antd Avatar */ /** The element to display as the comment avatar - generally an antd Avatar */
avatar?: React.ReactNode; avatar?: React.ReactNode;
/** className of comment */ /** ClassName of comment */
className?: string; className?: string;
/** The main content of the comment */ /** The main content of the comment */
content: React.ReactNode; content: React.ReactNode;

View File

@ -1,6 +1,4 @@
/** /** Created by Andrey Gayvoronsky on 13/04/16. */
* Created by Andrey Gayvoronsky on 13/04/16.
*/
import CalendarLocale from 'rc-picker/lib/locale/ru_RU'; import CalendarLocale from 'rc-picker/lib/locale/ru_RU';
import TimePickerLocale from '../../time-picker/locale/ru_RU'; import TimePickerLocale from '../../time-picker/locale/ru_RU';

View File

@ -31,7 +31,7 @@ export interface DrawerProps {
mask?: boolean; mask?: boolean;
maskStyle?: React.CSSProperties; maskStyle?: React.CSSProperties;
style?: React.CSSProperties; style?: React.CSSProperties;
/** wrapper dom node style of header and body */ /** Wrapper dom node style of header and body */
drawerStyle?: React.CSSProperties; drawerStyle?: React.CSSProperties;
headerStyle?: React.CSSProperties; headerStyle?: React.CSSProperties;
bodyStyle?: React.CSSProperties; bodyStyle?: React.CSSProperties;

View File

@ -16,9 +16,7 @@ export interface EmptyProps {
prefixCls?: string; prefixCls?: string;
className?: string; className?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
/** /** @since 3.16.0 */
* @since 3.16.0
*/
imageStyle?: React.CSSProperties; imageStyle?: React.CSSProperties;
image?: React.ReactNode; image?: React.ReactNode;
description?: React.ReactNode; description?: React.ReactNode;

View File

@ -30,6 +30,7 @@ export default function ErrorList({
if (changedVisible) { if (changedVisible) {
/** /**
* We trigger in sync to avoid dom shaking but this get warning in react 16.13. * We trigger in sync to avoid dom shaking but this get warning in react 16.13.
*
* So use Promise to keep in micro async to handle this. * So use Promise to keep in micro async to handle this.
* https://github.com/ant-design/ant-design/issues/21698#issuecomment-593743485 * https://github.com/ant-design/ant-design/issues/21698#issuecomment-593743485
*/ */

View File

@ -17,9 +17,7 @@ interface FormItemInputMiscProps {
hasFeedback?: boolean; hasFeedback?: boolean;
validateStatus?: ValidateStatus; validateStatus?: ValidateStatus;
onDomErrorVisibleChange: (visible: boolean) => void; onDomErrorVisibleChange: (visible: boolean) => void;
/** /** @private Internal usage, do not use in any of your production. */
* @private Internal usage, do not use in any of your production.
*/
_internalItemRender?: { _internalItemRender?: {
mark: string; mark: string;
render: ( render: (

View File

@ -7,10 +7,7 @@ import { FormLabelAlign } from './interface';
import { RequiredMark } from './Form'; import { RequiredMark } from './Form';
import { ValidateStatus } from './FormItem'; import { ValidateStatus } from './FormItem';
/** /** Form Context. Set top form style and pass to Form Item usage. */
* Form Context
* Set top form style and pass to Form Item usage.
*/
export interface FormContextProps { export interface FormContextProps {
vertical: boolean; vertical: boolean;
name?: string; name?: string;
@ -28,10 +25,7 @@ export const FormContext = React.createContext<FormContextProps>({
itemRef: (() => {}) as any, itemRef: (() => {}) as any,
}); });
/** /** Form Item Context. Used for Form noStyle Item error collection */
* Form Item Context
* Used for Form noStyle Item error collection
*/
export interface FormItemContextProps { export interface FormItemContextProps {
updateItemErrors: (name: string, errors: string[]) => void; updateItemErrors: (name: string, errors: string[]) => void;
} }
@ -40,10 +34,7 @@ export const FormItemContext = React.createContext<FormItemContextProps>({
updateItemErrors: () => {}, updateItemErrors: () => {},
}); });
/** /** Form Provider */
* Form Provider
*
*/
export interface FormProviderProps extends Omit<RcFormProviderProps, 'validateMessages'> {} export interface FormProviderProps extends Omit<RcFormProviderProps, 'validateMessages'> {}
export const FormProvider: React.FC<FormProviderProps> = props => { export const FormProvider: React.FC<FormProviderProps> = props => {
@ -51,9 +42,7 @@ export const FormProvider: React.FC<FormProviderProps> = props => {
return <RcFormProvider {...providerProps} />; return <RcFormProvider {...providerProps} />;
}; };
/** /** Used for ErrorList only */
* Used for ErrorList only
*/
export interface FormItemPrefixContextProps { export interface FormItemPrefixContextProps {
prefixCls: string; prefixCls: string;
status?: ValidateStatus; status?: ValidateStatus;

View File

@ -1,9 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import useForceUpdate from '../../_util/hooks/useForceUpdate'; import useForceUpdate from '../../_util/hooks/useForceUpdate';
/** /** Always debounce error to avoid [error -> null -> error] blink */
* Always debounce error to avoid [error -> null -> error] blink
*/
export default function useCacheErrors( export default function useCacheErrors(
errors: React.ReactNode[], errors: React.ReactNode[],
changeTrigger: (visible: boolean) => void, changeTrigger: (visible: boolean) => void,

View File

@ -176,11 +176,13 @@ Form 通过增量更新方式,只更新被修改的字段相关组件以达到
```tsx ```tsx
<Form.List> <Form.List>
{fields => fields.map(field => ( {fields =>
<Form.Item {...field}> fields.map(field => (
<Input /> <Form.Item {...field}>
</Form.Item> <Input />
))} </Form.Item>
))
}
</Form.List> </Form.List>
``` ```

View File

@ -17,9 +17,7 @@ function hasAddon(props: InputProps | ClearableInputProps) {
return !!(props.addonBefore || props.addonAfter); return !!(props.addonBefore || props.addonAfter);
} }
/** /** This basic props required for input and textarea. */
* This basic props required for input and textarea.
*/
interface BasicProps { interface BasicProps {
prefixCls: string; prefixCls: string;
inputType: typeof ClearableInputType[number]; inputType: typeof ClearableInputType[number];
@ -36,9 +34,7 @@ interface BasicProps {
bordered: boolean; bordered: boolean;
} }
/** /** This props only for input. */
* This props only for input.
*/
interface ClearableInputProps extends BasicProps { interface ClearableInputProps extends BasicProps {
size?: SizeType; size?: SizeType;
suffix?: React.ReactNode; suffix?: React.ReactNode;

View File

@ -58,12 +58,12 @@ describe('TextArea', () => {
const wrapper = mount( const wrapper = mount(
<TextArea onKeyDown={fakeHandleKeyDown} onPressEnter={fakeHandlePressEnter} />, <TextArea onKeyDown={fakeHandleKeyDown} onPressEnter={fakeHandlePressEnter} />,
); );
/** keyCode 65 is A */ /** KeyCode 65 is A */
wrapper.find('textarea').simulate('keydown', { keyCode: 65 }); wrapper.find('textarea').simulate('keydown', { keyCode: 65 });
expect(fakeHandleKeyDown).toHaveBeenCalledTimes(1); expect(fakeHandleKeyDown).toHaveBeenCalledTimes(1);
expect(fakeHandlePressEnter).toHaveBeenCalledTimes(0); expect(fakeHandlePressEnter).toHaveBeenCalledTimes(0);
/** keyCode 13 is Enter */ /** KeyCode 13 is Enter */
wrapper.find('textarea').simulate('keydown', { keyCode: 13 }); wrapper.find('textarea').simulate('keydown', { keyCode: 13 });
expect(fakeHandleKeyDown).toHaveBeenCalledTimes(2); expect(fakeHandleKeyDown).toHaveBeenCalledTimes(2);
expect(fakeHandlePressEnter).toHaveBeenCalledTimes(1); expect(fakeHandlePressEnter).toHaveBeenCalledTimes(1);

View File

@ -60,6 +60,7 @@ export default function confirm(config: ModalFuncProps) {
function render({ okText, cancelText, prefixCls, ...props }: any) { function render({ okText, cancelText, prefixCls, ...props }: any) {
/** /**
* https://github.com/ant-design/ant-design/issues/23623 * https://github.com/ant-design/ant-design/issues/23623
*
* Sync render blocks React event. Let's make this async. * Sync render blocks React event. Let's make this async.
*/ */
setTimeout(() => { setTimeout(() => {

View File

@ -11,13 +11,14 @@ interface LineProps extends ProgressProps {
} }
/** /**
* { * @example
* '0%': '#afc163', * {
* '75%': '#009900', * "0%": "#afc163",
* '50%': 'green', ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%' * "75%": "#009900",
* '25%': '#66FF00', * "50%": "green", // ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
* '100%': '#ffffff' * "25%": "#66FF00",
* } * "100%": "#ffffff"
* }
*/ */
export const sortGradient = (gradients: StringGradients) => { export const sortGradient = (gradients: StringGradients) => {
let tempArr: any[] = []; let tempArr: any[] = [];
@ -35,19 +36,17 @@ export const sortGradient = (gradients: StringGradients) => {
}; };
/** /**
* { * Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and
* '0%': '#afc163', * butter, there is the bug. And... Besides women, there is the code.
* '25%': '#66FF00',
* '50%': '#00CC00', ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
* '75%': '#009900', #00CC00 50%, #009900 75%, #ffffff 100%)
* '100%': '#ffffff'
* }
* *
* Then this man came to realize the truth: * @example
* Besides six pence, there is the moon. * {
* Besides bread and butter, there is the bug. * "0%": "#afc163",
* And... * "25%": "#66FF00",
* Besides women, there is the code. * "50%": "#00CC00", // ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
* "75%": "#009900", // #00CC00 50%, #009900 75%, #ffffff 100%)
* "100%": "#ffffff"
* }
*/ */
export const handleGradient = (strokeColor: ProgressGradient, directionConfig: DirectionType) => { export const handleGradient = (strokeColor: ProgressGradient, directionConfig: DirectionType) => {
const { const {

View File

@ -43,9 +43,8 @@ export interface ResultProps {
const ExceptionStatus = Object.keys(ExceptionMap); const ExceptionStatus = Object.keys(ExceptionMap);
/** /**
* render icon * Render icon if ExceptionStatus includes ,render svg image else render iconNode
* if ExceptionStatus includes ,render svg image *
* else render iconNode
* @param prefixCls * @param prefixCls
* @param {status, icon} * @param {status, icon}
*/ */

View File

@ -5,10 +5,7 @@ export interface ColumnProps<RecordType> extends ColumnType<RecordType> {
} }
/* istanbul ignore next */ /* istanbul ignore next */
/** /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */
* This is a syntactic sugar for `columns` prop.
* So HOC will not work on this.
*/
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
function Column<RecordType>(_: ColumnProps<RecordType>) { function Column<RecordType>(_: ColumnProps<RecordType>) {
return null; return null;

View File

@ -9,10 +9,7 @@ export interface ColumnGroupProps<RecordType> extends Omit<ColumnType<RecordType
} }
/* istanbul ignore next */ /* istanbul ignore next */
/** /** This is a syntactic sugar for `columns` prop. So HOC will not work on this. */
* This is a syntactic sugar for `columns` prop.
* So HOC will not work on this.
*/
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
function ColumnGroup<RecordType>(_: ColumnGroupProps<RecordType>) { function ColumnGroup<RecordType>(_: ColumnGroupProps<RecordType>) {
return null; return null;

View File

@ -233,10 +233,9 @@ function Table<RecordType extends object = any>(props: TableProps<RecordType>) {
}; };
/** /**
* Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read
* to read state out and then put it back to title render. * state out and then put it back to title render. Move these code into `hooks` but still too
* Move these code into `hooks` but still too complex. * complex. We should provides Table props like `sorter` & `filter` to handle control in next big version.
* We should provides Table props like `sorter` & `filter` to handle control in next big version.
*/ */
// ============================ Sorter ============================= // ============================ Sorter =============================

View File

@ -239,9 +239,8 @@ describe('Table.pagination', () => {
}); });
/** /**
* `pagination` is not designed to accept `true` value, * `pagination` is not designed to accept `true` value, but in practice, many people assign `true`
* but in practice, many people assign `true` to `pagination`, * to `pagination`, since they misunderstand that `pagination` can accept a boolean value.
* since they misunderstand that `pagination` can accept a boolean value.
*/ */
it('Accepts pagination as true', () => { it('Accepts pagination as true', () => {
const wrapper = mount(createTable({ pagination: true })); const wrapper = mount(createTable({ pagination: true }));

View File

@ -7,8 +7,9 @@ export interface CheckableTagProps {
className?: string; className?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
/** /**
* @description it is an absolute controlled component and has no uncontrolled mode. * It is an absolute controlled component and has no uncontrolled mode.
* @description.zh-CN *
* .zh-cn
*/ */
checked: boolean; checked: boolean;
onChange?: (checked: boolean) => void; onChange?: (checked: boolean) => void;

View File

@ -1,6 +1,4 @@
/** /** Created by Andrey Gayvoronsky on 13/04/16. */
* Created by Andrey Gayvoronsky on 13/04/16.
*/
import { TimePickerLocale } from '../index'; import { TimePickerLocale } from '../index';
const locale: TimePickerLocale = { const locale: TimePickerLocale = {

View File

@ -25,7 +25,7 @@ const TimelineItem: React.FC<TimelineItemProps> = ({
color = 'blue', color = 'blue',
dot, dot,
pending = false, pending = false,
position /** dead, but do not pass in <li {...omit()} */, position /** Dead, but do not pass in <li {...omit()} */,
label, label,
children, children,
...restProps ...restProps

View File

@ -52,7 +52,7 @@ export interface TransferListProps<RecordType> extends TransferLocale {
onItemSelectAll: (dataSource: string[], checkAll: boolean) => void; onItemSelectAll: (dataSource: string[], checkAll: boolean) => void;
onItemRemove?: (keys: string[]) => void; onItemRemove?: (keys: string[]) => void;
handleClear: () => void; handleClear: () => void;
/** render item */ /** Render item */
render?: (item: RecordType) => RenderResult; render?: (item: RecordType) => RenderResult;
showSearch?: boolean; showSearch?: boolean;
searchPlaceholder: string; searchPlaceholder: string;

View File

@ -99,7 +99,7 @@ export interface TreeProps extends Omit<RcTreeProps, 'prefixCls' | 'showLine' |
multiple?: boolean; multiple?: boolean;
/** 是否自动展开父节点 */ /** 是否自动展开父节点 */
autoExpandParent?: boolean; autoExpandParent?: boolean;
/** checkable状态下节点选择完全受控父子节点选中状态不再关联 */ /** Checkable状态下节点选择完全受控父子节点选中状态不再关联 */
checkStrictly?: boolean; checkStrictly?: boolean;
/** 是否支持选中 */ /** 是否支持选中 */
checkable?: boolean; checkable?: boolean;

View File

@ -234,6 +234,7 @@
"node-fetch": "^2.6.0", "node-fetch": "^2.6.0",
"open": "^7.0.3", "open": "^7.0.3",
"prettier": "^2.2.0", "prettier": "^2.2.0",
"prettier-plugin-jsdoc": "^0.2.12",
"pretty-quick": "^3.0.0", "pretty-quick": "^3.0.0",
"querystring": "^0.2.0", "querystring": "^0.2.0",
"rc-footer": "^0.6.3", "rc-footer": "^0.6.3",

View File

@ -1,7 +1,8 @@
/** /**
* convert dark.less into js vars * Convert dark.less into js vars
* *
* const darkVars = require('./dark-vars'); * @example
* const darkVars = require('./dark-vars');
*/ */
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');

View File

@ -1,7 +1,8 @@
/** /**
* convert default.less into js vars * Convert default.less into js vars
* *
* const darkVars = require('./default-vars'); * @example
* const darkVars = require('./default-vars');
*/ */
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');

View File

@ -1,7 +1,5 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
/** /** Generate legacy locale file as shadow of `/locale` to `/locale-provider`. */
* Generate legacy locale file as shadow of `/locale` to `/locale-provider`.
*/
const glob = require('glob'); const glob = require('glob');
const fs = require('fs'); const fs = require('fs');

View File

@ -1,5 +1,6 @@
/** /**
* Empty component for app shell * Empty component for app shell
*
* See https://github.com/NekR/offline-plugin/blob/master/docs/app-shell.md * See https://github.com/NekR/offline-plugin/blob/master/docs/app-shell.md
*/ */
import React from 'react'; import React from 'react';

View File

@ -10,10 +10,10 @@ const USE_REPLACEMENT = false;
const testDist = process.env.LIB_DIR === 'dist'; const testDist = process.env.LIB_DIR === 'dist';
/** /**
* rc component will generate id for aria usage. * Rc component will generate id for aria usage.
* It's created as `test-uuid` when env === 'test'. * It's created as `test-uuid` when env === 'test'.
* Or `f7fa7a3c-a675-47bc-912e-0c45fb6a74d9`(randomly) when not test env. * Or `f7fa7a3c-a675-47bc-912e-0c45fb6a74d9`(randomly) when not test env.
* So we need hack of this to modify the `aria-controls`. * So we need hack of this to modify the `aria-controls`.
*/ */
function ariaConvert(wrapper: CheerIO) { function ariaConvert(wrapper: CheerIO) {
if (!testDist || !USE_REPLACEMENT) return wrapper; if (!testDist || !USE_REPLACEMENT) return wrapper;