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

@@ -223,7 +223,7 @@ class FeedbackComponent extends Component<
onKeyDown={(e) =>
e.key == 'Enter' && this.onCommentSubmitted(this.state.comment)
}
autoFocus={true}
autoFocus
/>
</Row>,
<Row key="contactCheckbox">

View File

@@ -191,7 +191,7 @@ class SettingsSheet extends Component<Props, State> {
<FilePathConfigField
label="IDB binary location"
defaultValue={idbPath}
isRegularFile={true}
isRegularFile
onChange={(v) => {
this.setState({
updatedSettings: {...this.state.updatedSettings, idbPath: v},

View File

@@ -48,7 +48,7 @@ export default class Popover extends PureComponent<Props> {
return null;
}
return (
<VBox scrollable={true} maxHeight={300}>
<VBox scrollable maxHeight={300}>
<Info type={this.props.type}>
<Title bold>{this.props.title}</Title>
{this.props.errors.map((e: Error, index) => (

View File

@@ -81,7 +81,7 @@ export default class VideoRecordingButton extends Component<Props, State> {
const {selectedDevice} = this.props;
return (
<Button
compact={true}
compact
onClick={this.onRecordingClicked}
pulse={this.state.recording}
selected={this.state.recording}

View File

@@ -147,7 +147,7 @@ const PluginInstaller = function ({
<ManagedTable_immutable
rowLineHeight={28}
floating={false}
multiline={true}
multiline
columnSizes={columnSizes}
columns={columns}
highlightableRows={false}

View File

@@ -82,7 +82,7 @@ test('load PluginInstaller list', async () => {
// Bit ugly to have this as an effectively test-only option, but
// without, we rely on height information from Electron which we don't
// have, causing no items to be rendered.
autoHeight={true}
autoHeight
/>
</Provider>
);
@@ -106,7 +106,7 @@ test('load PluginInstaller list with one plugin installed', async () => {
// Bit ugly to have this as an effectively test-only option, but
// without, we rely on height information from Electron which we don't
// have, causing no items to be rendered.
autoHeight={true}
autoHeight
/>
</Provider>
);

View File

@@ -198,18 +198,18 @@ export function createTablePlugin<T extends RowData>(props: Props<T>) {
const {columns, columnSizes} = props;
const {rows} = this.props.persistedState;
return (
<FlexColumn grow={true}>
<FlexColumn grow>
<SearchableTable_immutable
key={this.constructor.id}
rowLineHeight={28}
floating={false}
multiline={true}
multiline
columnSizes={columnSizes}
columns={columns}
onRowHighlighted={this.onRowHighlighted}
multiHighlight={true}
multiHighlight
rows={rows}
stickyBottom={true}
stickyBottom
actions={<Button onClick={this.clear}>Clear Table</Button>}
/>
<DetailSidebar>{this.renderSidebar()}</DetailSidebar>

View File

@@ -124,7 +124,7 @@ function renderValue({type, value}: {type: string; value: any}) {
switch (type) {
case 'boolean':
return (
<BooleanValue code={true} active={value}>
<BooleanValue code active={value}>
{value.toString()}
</BooleanValue>
);
@@ -232,7 +232,7 @@ function renderSidebarSection(
case 'json':
return (
<Panel floating={false} heading={section.title} key={index}>
<DataInspector data={section.content} expandRoot={true} />
<DataInspector data={section.content} expandRoot />
</Panel>
);
case 'toolbar':
@@ -240,7 +240,7 @@ function renderSidebarSection(
default:
return (
<Panel floating={false} heading={'Details'} key={index}>
<DataInspector data={section} expandRoot={true} />
<DataInspector data={section} expandRoot />
</Panel>
);
}
@@ -480,20 +480,20 @@ export default function createTableNativePlugin(id: string, title: string) {
: null;
return (
<FlexColumn grow={true}>
<FlexColumn grow>
{topToolbarComponent}
<SearchableTable
key={this.constructor.id}
rowLineHeight={28}
floating={false}
multiline={true}
multiline
columnSizes={columnSizes}
columnOrder={columnOrder}
columns={columns}
onRowHighlighted={this.onRowHighlighted}
multiHighlight={true}
multiHighlight
rows={this.applyMetadataToRows(rows)}
stickyBottom={true}
stickyBottom
actions={<Button onClick={this.clear}>Clear Table</Button>}
/>
<DetailSidebar>{this.renderSidebar()}</DetailSidebar>

View File

@@ -36,7 +36,7 @@ export const ButtonGroupContext = createContext(false);
*/
export default function ButtonGroup({children}: {children: React.ReactNode}) {
return (
<ButtonGroupContext.Provider value={true}>
<ButtonGroupContext.Provider value>
<Space>{children}</Space>
</ButtonGroupContext.Provider>
);

View File

@@ -72,7 +72,7 @@ type Props = {
*/
export default function ButtonGroupChain({children, iconSize, icon}: Props) {
return (
<ButtonGroupContext.Provider value={true}>
<ButtonGroupContext.Provider value>
<ButtonGroupChainContainer iconSize={iconSize}>
{React.Children.map(children, (child, idx) => {
if (idx === 0) {

View File

@@ -76,7 +76,7 @@ export default class ErrorBoundary extends Component<
}
return (
<ErrorBoundaryContainer grow={true}>
<ErrorBoundaryContainer grow>
<Heading>{heading}</Heading>
{this.props.showStack !== false && (
<ErrorBoundaryStack error={error} />

View File

@@ -91,7 +91,7 @@ export default function FileSelector({
<FileInputBox
placeholder={placeholderText}
value={value}
isValid={true}
isValid
onDrop={(e) => {
if (e.dataTransfer.files.length) {
onChange(e.dataTransfer.files[0].path);

View File

@@ -188,7 +188,7 @@ export default class StackTrace extends Component<{
<ManagedTable
columns={columns}
rows={rows}
hideHeader={true}
hideHeader
autoHeight
zebra={false}
columnOrder={columnOrder}

View File

@@ -315,7 +315,7 @@ export default function Tabs(props: {
}
return (
<FlexColumn grow={true}>
<FlexColumn grow>
<TabList>
{before}
{tabList}

View File

@@ -26,7 +26,7 @@ export const TabsContext = React.createContext(true);
export default function TabsContainer(props: {children: any}) {
return (
<Container>
<TabsContext.Provider value={true}>{props.children}</TabsContext.Provider>
<TabsContext.Provider value>{props.children}</TabsContext.Provider>
</Container>
);
}

View File

@@ -133,11 +133,7 @@ export default class VirtualList extends Component<
}
return (
<View
grow={true}
onScroll={this.handleScroll}
ref={this.setRef}
scrollable={true}>
<View grow onScroll={this.handleScroll} ref={this.setRef} scrollable>
{inner}
</View>
);

View File

@@ -66,8 +66,8 @@ class InspectorSidebarSection extends Component<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

@@ -178,7 +178,7 @@ class TableHeadColumn extends PureComponent<{
if (isResizable) {
children = (
<TableHeaderColumnInteractive
grow={true}
grow
resizable={RIGHT_RESIZABLE}
onResize={this.onResize}
minWidth={20}>