Skip to content

Commit

Permalink
Add the eslint rule "react/jsx-curly-brace-presence" (firefox-devtool…
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatum authored and julienw committed Jul 20, 2018
1 parent 3c8fb2d commit da5a488
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 68 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
'react/no-redundant-should-component-update': 'error',
'react/no-this-in-sfc': 'error',
'react/no-typos': 'error',
"react/jsx-curly-brace-presence": ['error', { "props": 'never', "children": 'never' }],
// `no-unused-prop-types` is buggy when we use destructuring parameters in
// functions as it misunderstands them as functional components.
// See https://github.com/yannickcr/eslint-plugin-react/issues/1561
Expand Down
27 changes: 15 additions & 12 deletions src/components/app/MenuButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,20 @@ require('./MenuButtons.css');

const PrivacyNotice = () => (
<section className="privacyNotice">
<p
>{`You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:`}</p>
<p>
You’re about to upload your profile publicly where anyone will be able to
access it. To better diagnose performance problems profiles include the
following information:
</p>
<ul>
<li>{'The URLs of all painted tabs, and running scripts.'}</li>
<li>{'The metadata of all your add-ons to identify slow add-ons.'}</li>
<li>{'Firefox build and runtime configuration.'}</li>
<li>The URLs of all painted tabs, and running scripts.</li>
<li>The metadata of all your add-ons to identify slow add-ons.</li>
<li>Firefox build and runtime configuration.</li>
</ul>
<p
>{`To view all the information you can download the full profile to a file and open the
json structure with a text editor.`}</p>
<p>
To view all the information you can download the full profile to a file
and open the json structure with a text editor.
</p>
<p>
{`By default, the URLs of all network requests will be removed while sharing the profile
but keeping the URLs may help to identify the problems. Please select the checkbox
Expand Down Expand Up @@ -101,7 +104,7 @@ const ProfileSharingButton = ({
panel={
<ArrowPanel
className="menuButtonsPrivacyPanel"
title={'Upload Profile – Privacy Notice'}
title="Upload Profile – Privacy Notice"
okButtonText="Share"
cancelButtonText="Cancel"
onOkButtonClick={okButtonClickEvent}
Expand Down Expand Up @@ -437,7 +440,7 @@ class ProfileSharingCompositeButton extends PureComponent<
panel={
<ArrowPanel
className="menuButtonsUploadErrorPanel"
title={'Upload Error'}
title="Upload Error"
okButtonText="Try Again"
cancelButtonText="Cancel"
onOkButtonClick={this._attemptToShare}
Expand Down Expand Up @@ -542,7 +545,7 @@ class ProfileDownloadButton extends PureComponent<
panel={
<ArrowPanel
className="menuButtonsProfileDownloadPanel"
title={'Save Profile to a Local File'}
title="Save Profile to a Local File"
onOpen={this._onPanelOpen}
>
<section>
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/ZipFileViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class ZipFileViewer extends React.PureComponent<Props> {
selectedNodeId={selectedZipFileIndex}
expandedNodeIds={expandedZipFileIndexes}
ref={this._takeTreeViewRef}
contextMenuId={'MarkersContextMenu'}
contextMenuId="MarkersContextMenu"
rowHeight={30}
indentWidth={15}
onEnterKey={this._onEnterKey}
Expand Down
2 changes: 1 addition & 1 deletion src/components/calltree/CallTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class CallTreeComponent extends PureComponent<Props> {
highlightRegExp={searchStringsRegExp}
disableOverscan={disableOverscan}
ref={this._takeTreeViewRef}
contextMenuId={'CallNodeContextMenu'}
contextMenuId="CallNodeContextMenu"
maxNodeDepth={callNodeMaxDepth}
icons={this.props.icons}
rowHeight={16}
Expand Down
2 changes: 1 addition & 1 deletion src/components/flame-graph/FlameGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class FlameGraph extends React.PureComponent<Props> {
<span>{threadName}</span>
</div>
<ContextMenuTrigger
id={'CallNodeContextMenu'}
id="CallNodeContextMenu"
attributes={{
className: 'treeViewContextMenu',
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/marker-table/ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class MarkersContextMenu extends PureComponent<Props> {

render() {
return (
<ContextMenu id={'MarkersContextMenu'}>
<ContextMenu id="MarkersContextMenu">
<MenuItem onClick={this.handleClick} data={{ type: 'setStartRange' }}>
Set selection start time here
</MenuItem>
Expand Down
2 changes: 1 addition & 1 deletion src/components/marker-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class MarkerTable extends PureComponent<Props> {
selectedNodeId={selectedMarker}
expandedNodeIds={this._expandedNodeIds}
ref={this._takeTreeViewRef}
contextMenuId={'MarkersContextMenu'}
contextMenuId="MarkersContextMenu"
rowHeight={16}
indentWidth={10}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/CallNodeContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class CallNodeContextMenu extends PureComponent<Props, State> {

return (
<ContextMenu
id={'CallNodeContextMenu'}
id="CallNodeContextMenu"
onShow={this._showMenu}
onHide={this._hideMenu}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/timeline/Thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class TimelineThread extends PureComponent<Props> {
style={style}
>
<ContextMenuTrigger
id={'TimelineThreadContextMenu'}
id="TimelineThreadContextMenu"
renderTag="div"
attributes={{
title: processDetails,
Expand Down
2 changes: 1 addition & 1 deletion src/components/timeline/ThreadContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class TimelineThreadContextMenu extends PureComponent<Props> {
);

return (
<ContextMenu id={'TimelineThreadContextMenu'}>
<ContextMenu id="TimelineThreadContextMenu">
{threads.length <= 1 ? null : (
<div>
<MenuItem
Expand Down
72 changes: 24 additions & 48 deletions src/test/components/__snapshots__/MenuButtons.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 1`] = `
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -57,8 +56,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 1`] = `
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -243,8 +241,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 1`] = `
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -258,8 +255,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 1`] = `
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -391,8 +387,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 2`] = `
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -406,8 +401,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 2`] = `
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -592,8 +586,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 2`] = `
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -607,8 +600,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons 2`] = `
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -740,8 +732,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -755,8 +746,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -941,8 +931,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -956,8 +945,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -1089,8 +1077,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -1104,8 +1091,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -1290,8 +1276,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -1305,8 +1290,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -1438,8 +1422,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -1453,8 +1436,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -1639,8 +1621,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -1654,8 +1635,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -1787,8 +1767,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -1802,8 +1781,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down Expand Up @@ -1988,8 +1966,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
className="privacyNotice"
>
<p>
You’re about to upload your profile publicly where anyone will be able to access it.
To better diagnose performance problems profiles include the following information:
You’re about to upload your profile publicly where anyone will be able to access it. To better diagnose performance problems profiles include the following information:
</p>
<ul>
<li>
Expand All @@ -2003,8 +1980,7 @@ exports[`app/MenuButtons renders the MenuButtons buttons with profile.meta.netwo
</li>
</ul>
<p>
To view all the information you can download the full profile to a file and open the
json structure with a text editor.
To view all the information you can download the full profile to a file and open the json structure with a text editor.
</p>
<p>
By default, the URLs of all network requests will be removed while sharing the profile
Expand Down

0 comments on commit da5a488

Please sign in to comment.