Enforce react/jsx-boolean-value

Summary: yarn fix results.

Reviewed By: nikoant

Differential Revision: D28329714

fbshipit-source-id: 564aa24bcdb4bc6cdea67dfad10a077a9c817a2d
This commit is contained in:
Pascal Hartig
2021-05-11 10:12:56 -07:00
committed by Facebook GitHub Bot
parent 8ba27f5487
commit 69c7876be9
37 changed files with 71 additions and 86 deletions

View File

@@ -62,14 +62,14 @@ export default class TemperatureTable extends Component<TemperatureTableProps> {
render() {
return (
<SearchableTable
multiline={true}
autoHeight={true}
multiline
autoHeight
floating={false}
zebra={true}
zebra
columnSizes={ColumnSizes}
columns={Columns}
rows={this.buildRows()}
grow={true}
grow
/>
);
}

View File

@@ -81,9 +81,7 @@ function buildSidebarRow(key: string, val: Value): TableRow {
var parsed = JSON.parse(val.value);
} catch (_error) {}
if (parsed) {
output = (
<ManagedDataInspector data={parsed} expandRoot={true} collapsed />
);
output = <ManagedDataInspector data={parsed} expandRoot collapsed />;
}
}
return {
@@ -186,7 +184,7 @@ export default React.memo(function DatabaseDetailSidebar(
);
return (
<DetailSidebar>
<Panel title="Row details" collapsible={true}>
<Panel title="Row details" collapsible>
{onSave ? (
<Layout.Right>
<div />

View File

@@ -131,9 +131,9 @@ const QueryHistory = React.memo(({history}: {history: Array<Query>}) => {
floating={false}
columns={columns}
columnSizes={{time: 75}}
zebra={true}
zebra
rows={rows}
horizontallyScrollable={true}
horizontallyScrollable
/>
</Layout.Horizontal>
);
@@ -232,12 +232,12 @@ const DataTable = React.memo(
}),
{},
)}
zebra={true}
zebra
rows={page.rows.map((row: Array<Value>, index: number) =>
transformRow(page.columns, row, index),
)}
horizontallyScrollable={true}
multiHighlight={true}
horizontallyScrollable
multiHighlight
onRowHighlighted={highlightedRowsChanged}
onSort={sortOrderChanged}
initialSortOrder={currentSort ?? undefined}
@@ -281,7 +281,7 @@ const QueryTable = React.memo(
<Layout.Horizontal grow>
<ManagedTable
floating={false}
multiline={true}
multiline
columnOrder={columns.map((name) => ({
key: name,
visible: true,
@@ -291,11 +291,11 @@ const QueryTable = React.memo(
Object.assign({}, acc, {[val]: {value: val, resizable: true}}),
{},
)}
zebra={true}
zebra
rows={rows.map((row: Array<Value>, index: number) =>
transformRow(columns, row, index),
)}
horizontallyScrollable={true}
horizontallyScrollable
onRowHighlighted={highlightedRowsChanged}
/>
{table.highlightedRows.length === 1 && (

View File

@@ -191,7 +191,7 @@ export default class ImagesCacheOverview extends PureComponent<
return (
<ImagesCacheOverview.Container
grow={true}
grow
onKeyDown={this.onKeyDown}
tabIndex={0}>
<Toolbar position="top">

View File

@@ -100,10 +100,7 @@ class EventDetails extends Component<{
const {event} = this.props;
return (
<Panel
heading={<RequestHeader event={event} />}
floating={false}
padded={true}>
<Panel heading={<RequestHeader event={event} />} floating={false} padded>
<p>
<DataDescriptionKey>Attribution</DataDescriptionKey>
<span key="sep">: </span>

View File

@@ -115,15 +115,14 @@ export function plugin(client: PluginClient<Events, Methods>) {
message: (
<Fragment>
<InlineFlexRow>
CloseableReference leaked for{' '}
<Text code={true}>{event.className}</Text>
CloseableReference leaked for <Text code>{event.className}</Text>
(identity hashcode: {event.identityHashCode}).
</InlineFlexRow>
<InlineFlexRow>
<Text bold={true}>Stacktrace:</Text>
<Text bold>Stacktrace:</Text>
</InlineFlexRow>
<InlineFlexRow>
<Text code={true}>{event.stacktrace || '<unavailable>'}</Text>
<Text code>{event.stacktrace || '<unavailable>'}</Text>
</InlineFlexRow>
</Fragment>
),
@@ -466,7 +465,7 @@ function Sidebar() {
if (currentSelectedImage == null) {
return (
<EmptySidebar grow={true}>
<EmptySidebar grow>
<Text align="center">
Select an image to see the events associated with it.
</Text>

View File

@@ -390,7 +390,7 @@ export default class AllocationsPlugin extends FlipperDevicePlugin<
heading="Page allocations"
floating={false}
collapsable={false}
grow={true}>
grow>
<Toolbar position="top">
<Select
options={appTitlesForSelect}
@@ -429,11 +429,11 @@ export default class AllocationsPlugin extends FlipperDevicePlugin<
{(this.state.totalAllocatedBytes / 1024 / 1024).toFixed(3)}
</Label>
<ManagedTable
multiline={true}
multiline
columnSizes={ColumnSizes}
columns={Columns}
floating={false}
zebra={true}
zebra
rows={this.buildMemRows()}
/>
</Panel>

View File

@@ -244,7 +244,7 @@ export default class KaiOSGraphs extends FlipperDevicePlugin<State, any, any> {
heading="Free memory"
floating={false}
collapsable={false}
grow={true}>
grow>
<Toolbar position="top">
{this.state.monitoring ? (
<Button onClick={this.onStopMonitor} icon="pause">
@@ -256,7 +256,7 @@ export default class KaiOSGraphs extends FlipperDevicePlugin<State, any, any> {
</Button>
)}
</Toolbar>
<FlexColumn grow={true}>
<FlexColumn grow>
<ResponsiveContainer height={500}>
<LineChart data={pointsToDraw}>
<XAxis type="number" domain={[0, MAX_POINTS]} dataKey="idx" />

View File

@@ -69,8 +69,8 @@ class InspectorSidebarSection extends PureComponent<InspectorSidebarSectionProps
data={this.props.data}
setValue={this.props.onValueChanged ? this.setValue : undefined}
extractValue={this.extractValue}
expandRoot={true}
collapsed={true}
expandRoot
collapsed
tooltips={this.props.tooltips}
/>
</Panel>

View File

@@ -448,7 +448,7 @@ export default class LayoutPlugin extends FlipperPlugin<
<Inspector
{...inspectorProps}
onSelect={(selectedAXElement) => this.setState({selectedAXElement})}
showsSidebar={true}
showsSidebar
ax
/>
</Sidebar>
@@ -533,7 +533,7 @@ export default class LayoutPlugin extends FlipperPlugin<
element.decoration === 'litho' ? (
<Button
icon={'share-external'}
compact={true}
compact
style={{marginTop: 8, marginRight: 12}}
onClick={() => {
this.props.selectPlugin('YogaPerformance', element!.id);

View File

@@ -192,7 +192,7 @@ export default class LeakCanary<PersistedState> extends FlipperPlugin<
<Panel heading={'Instance'} floating={false} grow={false}>
<ManagedDataInspector
data={instanceFields}
expandRoot={true}
expandRoot
extractValue={this._extractValue}
/>
</Panel>
@@ -201,7 +201,7 @@ export default class LeakCanary<PersistedState> extends FlipperPlugin<
<Panel heading={'Static'} floating={false} grow={false}>
<ManagedDataInspector
data={staticFields}
expandRoot={true}
expandRoot
extractValue={this._extractValue}
/>
</Panel>
@@ -221,8 +221,8 @@ export default class LeakCanary<PersistedState> extends FlipperPlugin<
return (
<Window>
<FlexColumn grow={true}>
<FlexColumn grow={true} scrollable={true}>
<FlexColumn grow>
<FlexColumn grow scrollable>
{this.state.leaks.map((leak: Leak, idx: number) => {
const elements = showFullClassPaths
? leak.elements

View File

@@ -39,12 +39,7 @@ export default (props: Props) => {
{...iconButtonProps}
/>
) : null}
<IconButton
outline={true}
icon="star"
onClick={onClick}
{...iconButtonProps}
/>
<IconButton outline icon="star" onClick={onClick} {...iconButtonProps} />
</FavoriteButtonContainer>
);
};

View File

@@ -143,7 +143,7 @@ class SearchBar extends Component<Props, State> {
<IconButton
icon="send"
size={16}
outline={true}
outline
onClick={() => this.navigateTo(searchInputValue)}
/>
<FavoriteButton

View File

@@ -390,7 +390,7 @@ class VideoFormatter {
if (contentType.startsWith('video/')) {
return (
<Layout.Container center>
<VideoFormatter.Video controls={true}>
<VideoFormatter.Video controls>
<source src={request.url} type={contentType} />
</VideoFormatter.Video>
</Layout.Container>

View File

@@ -515,7 +515,7 @@ export function Component() {
return (
<NetworkRouteContext.Provider value={networkRouteManager}>
<Layout.Container
grow={true}
grow
key={
columns.length /* make sure to reset the table if colums change */
}>

View File

@@ -105,7 +105,7 @@ function renderSidebar(row: Row) {
return (
<Layout.Container gap pad>
<Typography.Title level={4}>Extras</Typography.Title>
<ManagedDataInspector data={row} expandRoot={true} />
<ManagedDataInspector data={row} expandRoot />
</Layout.Container>
);
}

View File

@@ -166,7 +166,7 @@ export function Component() {
}
return (
<RootColumn grow={true}>
<RootColumn grow>
<Heading>
<span style={{marginRight: '16px'}}>Preference File</span>
<Select
@@ -180,7 +180,7 @@ export function Component() {
onChange={instance.setSelectedPreferences}
/>
</Heading>
<FlexRow grow={true} scrollable={true}>
<FlexRow grow scrollable>
<InspectorColumn>
<Heading>Inspector</Heading>
<ManagedDataInspector