Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit a4e1812

Browse files
committed
Re-fix all the things automatically, without the airbnb config
1 parent 017f8a5 commit a4e1812

File tree

97 files changed

+1103
-483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1103
-483
lines changed

src/console/App.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ class App extends Component<AppProps, AppState> {
9595
path="/shield"
9696
component={props =>
9797
this.state.username ? (
98-
<Normandy authToken={this.state.authToken} urlPrefix="/shield" {...props} />
98+
<Normandy
99+
authToken={this.state.authToken}
100+
urlPrefix="/shield"
101+
{...props}
102+
/>
99103
) : (
100104
<Redirect to="/login/?next=/shield" />
101105
)
@@ -107,7 +111,8 @@ class App extends Component<AppProps, AppState> {
107111
<div>
108112
<h2>404 - Page Not Found</h2>
109113
<p>
110-
No delivery-console match for <code>{location.pathname}</code>
114+
No delivery-console match for{' '}
115+
<code>{location.pathname}</code>
111116
</p>
112117
</div>
113118
)}

src/console/LoginPage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ class LoginPage extends Component<Props, State> {
7272
</FormItem>
7373

7474
<FormItem>
75-
<Button type="primary" htmlType="submit" className="login-form-button">
75+
<Button
76+
type="primary"
77+
htmlType="submit"
78+
className="login-form-button"
79+
>
7680
Log in
7781
</Button>
7882
</FormItem>

src/normandy/components/common/CheckboxMenu.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ export default class CheckboxMenu extends React.PureComponent {
2020
render() {
2121
const { checkboxes, label, onChange, options } = this.props;
2222

23-
const menu = <Checkbox.Group onChange={onChange} options={options} defaultValue={checkboxes} />;
23+
const menu = (
24+
<Checkbox.Group
25+
onChange={onChange}
26+
options={options}
27+
defaultValue={checkboxes}
28+
/>
29+
);
2430

2531
return (
2632
<Dropdown overlay={menu}>

src/normandy/components/common/EnrollmentStatus.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export default class EnrollmentSatus extends React.Component {
5353
to={`/recipe/${recipe.id}/`}
5454
className={cx('status-link', !recipe.enabled && 'is-lowkey')}
5555
>
56-
<Icon className={cx('status-icon', this.getColor())} type={this.getIcon()} />
56+
<Icon
57+
className={cx('status-icon', this.getColor())}
58+
type={this.getIcon()}
59+
/>
5760
<span className="enrollment-label">{this.getLabel()}</span>
5861
</Link>
5962
);

src/normandy/components/common/LoadingOverlay.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,19 @@ export class SimpleLoadingOverlay extends React.PureComponent {
5353
export default class LoadingOverlay extends React.PureComponent {
5454
static propTypes = {
5555
isLoading: PropTypes.bool.isRequired,
56-
requestIds: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.string])
57-
.isRequired,
56+
requestIds: PropTypes.oneOfType([
57+
PropTypes.arrayOf(PropTypes.string),
58+
PropTypes.string,
59+
]).isRequired,
5860
};
5961

6062
static defaultProps = {
6163
requestIds: null,
6264
};
6365

6466
render() {
65-
return <SimpleLoadingOverlay isVisible={this.props.isLoading} {...this.props} />;
67+
return (
68+
<SimpleLoadingOverlay isVisible={this.props.isLoading} {...this.props} />
69+
);
6670
}
6771
}

src/normandy/components/common/NavigationMenu.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export default class NavigationMenu extends React.PureComponent {
2525
};
2626

2727
render() {
28-
const { recipeSessionHistory, extensionSessionHistory, history } = this.props;
28+
const {
29+
recipeSessionHistory,
30+
extensionSessionHistory,
31+
history,
32+
} = this.props;
2933
const { pathname, search } = history;
3034

3135
return (

src/normandy/components/common/ShieldIdenticon.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ export default class ShieldIdenticon extends React.PureComponent {
109109
};
110110

111111
return (
112-
<span style={containerStyle} className={cx(className, 'shield-container')}>
112+
<span
113+
style={containerStyle}
114+
className={cx(className, 'shield-container')}
115+
>
113116
{isLoading && <Spin size="small" />}
114117
<img
115118
alt="Shield Identicon"

src/normandy/components/data/QueryFilteredRecipes.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ export default class QueryFilteredRecipes extends React.PureComponent {
2828

2929
componentWillReceiveProps(nextProps) {
3030
const { filters, pageNumber } = this.props;
31-
if (pageNumber !== nextProps.pageNumber || !isEqual(filters, nextProps.filters)) {
32-
this.props.fetchFilteredRecipesPage(nextProps.pageNumber, nextProps.filters);
31+
if (
32+
pageNumber !== nextProps.pageNumber ||
33+
!isEqual(filters, nextProps.filters)
34+
) {
35+
this.props.fetchFilteredRecipesPage(
36+
nextProps.pageNumber,
37+
nextProps.filters,
38+
);
3339
}
3440
}
3541

src/normandy/components/data/QueryMultipleExtensions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ export default class QueryMultipleExtensions extends React.PureComponent {
2727

2828
componentWillReceiveProps(nextProps) {
2929
const { fetchExtensionsPage, filters, pageNumber } = this.props;
30-
if (pageNumber !== nextProps.pageNumber || !isEqual(filters, nextProps.filters)) {
30+
if (
31+
pageNumber !== nextProps.pageNumber ||
32+
!isEqual(filters, nextProps.filters)
33+
) {
3134
fetchExtensionsPage(nextProps.pageNumber, nextProps.filters);
3235
}
3336
}

src/normandy/components/extensions/EditExtensionPage.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,16 @@ export default class EditExtensionPage extends React.PureComponent {
5353
const oldExtensions = this.props.extension;
5454

5555
// New extension means we add a session view.
56-
if (!is(oldExtensions, extension) && oldExtensions.get('name') !== extension.get('name')) {
56+
if (
57+
!is(oldExtensions, extension) &&
58+
oldExtensions.get('name') !== extension.get('name')
59+
) {
5760
const extensionName = extension.get('name');
58-
this.props.addSessionView('extension', extensionName, extension.get('identicon_seed'));
61+
this.props.addSessionView(
62+
'extension',
63+
extensionName,
64+
extension.get('identicon_seed'),
65+
);
5966
}
6067
}
6168

src/normandy/components/extensions/ExtensionSelect.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,16 @@ export default class ExtensionSelect extends React.Component {
6565
let displayedList = this.props.extensions;
6666
const queryFilters = search ? { text: search } : {};
6767

68-
const { placeholderElement, loadingDisplay, noOptionsDisplay } = ExtensionSelect;
68+
const {
69+
placeholderElement,
70+
loadingDisplay,
71+
noOptionsDisplay,
72+
} = ExtensionSelect;
6973

7074
const { isLoadingSearch, disabled, onChange, size, value } = this.props;
71-
const optGroupLabel = search ? 'Search results' : 'Recently uploaded extensions';
75+
const optGroupLabel = search
76+
? 'Search results'
77+
: 'Recently uploaded extensions';
7278

7379
if (isLoadingSearch) {
7480
displayedList = new List();

src/normandy/components/extensions/ListingActionBar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ export default class ListingActionBar extends React.PureComponent {
4545
checkboxes={columns.toJS()}
4646
label="Columns"
4747
onChange={saveExtensionListingColumns}
48-
options={[{ label: 'Name', value: 'name' }, { label: 'XPI URL', value: 'xpi' }]}
48+
options={[
49+
{ label: 'Name', value: 'name' },
50+
{ label: 'XPI URL', value: 'xpi' },
51+
]}
4952
/>
5053
</Col>
5154
<Col span={8} className="righted">

src/normandy/components/forms/DocumentUrlInput.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ export default class DocumentUrlInput extends React.PureComponent {
3535
}
3636

3737
return (
38-
<Input disabled={disabled} type="url" addonAfter={addonAfter} value={value} {...props} />
38+
<Input
39+
disabled={disabled}
40+
type="url"
41+
addonAfter={addonAfter}
42+
value={value}
43+
{...props}
44+
/>
3945
);
4046
}
4147
}

src/normandy/components/forms/FormItem.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export default class FormItem extends React.PureComponent {
8383

8484
if (trimWhitespace) {
8585
if (config.getValueFromEvent) {
86-
throw Error('config.getValueFromEvent is already defined, do not also use trimWhitespace.');
86+
throw Error(
87+
'config.getValueFromEvent is already defined, do not also use trimWhitespace.',
88+
);
8789
}
8890
}
8991

src/normandy/components/forms/LabeledInput.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ export default class LabeledInput extends React.Component {
4242
<Element onChange={onChange} {...this.getElementProps()} />
4343

4444
{children && (
45-
<span className="label" onClick={this.handleLabelClick} {...this.getLabelProps()}>
45+
<span
46+
className="label"
47+
onClick={this.handleLabelClick}
48+
{...this.getLabelProps()}
49+
>
4650
{children}
4751
</span>
4852
)}

src/normandy/components/pages/Gateway.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ import { Row, Col, Icon, Card } from 'antd';
66
export default class Gateway extends React.PureComponent {
77
render() {
88
return (
9-
<Row className="page-gateway" type="flex" justify="space-around" align="top">
9+
<Row
10+
className="page-gateway"
11+
type="flex"
12+
justify="space-around"
13+
align="top"
14+
>
1015
<Col className="gw-col" xs={24} sm={10} md={8}>
1116
<Card title="Recipes" id="gw-recipes-card">
1217
<Icon type="book" />

src/normandy/components/recipes/ApprovalDetails.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export default class ApprovalDetails extends React.PureComponent {
1717
<dd>{request.getIn(['approver', 'email'])}</dd>
1818

1919
<dt>Responsed</dt>
20-
<dd title={moment(request.get('created')).format('MMMM Do YYYY, h:mm a')}>
20+
<dd
21+
title={moment(request.get('created')).format('MMMM Do YYYY, h:mm a')}
22+
>
2123
{moment(request.get('created')).fromNow()}
2224
</dd>
2325

src/normandy/components/recipes/ApprovalForm.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,20 @@ export default class ApprovalForm extends React.PureComponent {
7575
<SimpleLoadingOverlay isVisible={isSubmitting}>
7676
<FormActions>
7777
<FormActions.Primary>
78-
<Button icon="dislike" onClick={this.handleRejectClick} type="danger" id="af-reject">
78+
<Button
79+
icon="dislike"
80+
onClick={this.handleRejectClick}
81+
type="danger"
82+
id="af-reject"
83+
>
7984
Reject
8085
</Button>
81-
<Button icon="like" onClick={this.handleApproveClick} type="primary" id="af-approve">
86+
<Button
87+
icon="like"
88+
onClick={this.handleApproveClick}
89+
type="primary"
90+
id="af-approve"
91+
>
8292
Approve
8393
</Button>
8494
</FormActions.Primary>

src/normandy/components/recipes/ApprovalRequest.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ export default class ApprovalRequest extends React.PureComponent {
4747
};
4848

4949
async handleSubmit(values, context) {
50-
const { approvalRequest, approveApprovalRequest, rejectApprovalRequest } = this.props;
50+
const {
51+
approvalRequest,
52+
approveApprovalRequest,
53+
rejectApprovalRequest,
54+
} = this.props;
5155

5256
this.setState({
5357
isSubmitting: true,
@@ -68,7 +72,10 @@ export default class ApprovalRequest extends React.PureComponent {
6872
await action(approvalRequest.get('id'), values);
6973
message.success(successMessage);
7074
} catch (error) {
71-
handleError(`Unable to ${context.approved ? 'approve' : 'reject'} request.`, error);
75+
handleError(
76+
`Unable to ${context.approved ? 'approve' : 'reject'} request.`,
77+
error,
78+
);
7279

7380
if (error.data) {
7481
this.setState({ formErrors: error.data });
@@ -120,7 +127,11 @@ export default class ApprovalRequest extends React.PureComponent {
120127
<dd>{approvalRequest.getIn(['creator', 'email'])}</dd>
121128

122129
<dt>Requested</dt>
123-
<dd title={moment(approvalRequest.get('created')).format('MMMM Do YYYY, h:mm a')}>
130+
<dd
131+
title={moment(approvalRequest.get('created')).format(
132+
'MMMM Do YYYY, h:mm a',
133+
)}
134+
>
124135
{moment(approvalRequest.get('created')).fromNow()}
125136
</dd>
126137
</dl>

src/normandy/components/recipes/CloneRecipePage.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,16 @@ export default class CloneRecipePage extends React.PureComponent {
8181
renderHeader() {
8282
const { isLatestRevision, recipe, recipeId, revisionId } = this.props;
8383

84-
const recipeDetailsURL = `/recipe/${recipeId}${isLatestRevision ? '' : `/rev/${revisionId}`}/`;
84+
const recipeDetailsURL = `/recipe/${recipeId}${
85+
isLatestRevision ? '' : `/rev/${revisionId}`
86+
}/`;
8587

8688
const recipeName = recipe.get('name');
8789

8890
// Only display revision hash if we're _not_ on the latest version.
89-
const revisionAddendum = isLatestRevision ? '' : `(Revision: ${revisionId.slice(0, 7)})`;
91+
const revisionAddendum = isLatestRevision
92+
? ''
93+
: `(Revision: ${revisionId.slice(0, 7)})`;
9094
const cloningMessage = `Cloning recipe values from "${recipeName}" ${revisionAddendum}`;
9195

9296
return (
@@ -110,7 +114,12 @@ export default class CloneRecipePage extends React.PureComponent {
110114
<QueryRevision pk={revisionId} />
111115
{this.renderHeader()}
112116

113-
<LoadingOverlay requestIds={[`fetch-recipe-${recipeId}`, `fetch-revision-${revisionId}`]}>
117+
<LoadingOverlay
118+
requestIds={[
119+
`fetch-recipe-${recipeId}`,
120+
`fetch-revision-${revisionId}`,
121+
]}
122+
>
114123
<GenericFormContainer
115124
form={RecipeForm}
116125
formAction={this.formAction}

src/normandy/components/recipes/DetailsActionBar.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@ import {
1212
enableRecipe as enableRecipeAction,
1313
} from 'normandy/state/app/recipes/actions';
1414
import { requestRevisionApproval as requestRevisionApprovalAction } from 'normandy/state/app/revisions/actions';
15-
import { getLatestRevisionIdForRecipe, getRecipe } from 'normandy/state/app/recipes/selectors';
15+
import {
16+
getLatestRevisionIdForRecipe,
17+
getRecipe,
18+
} from 'normandy/state/app/recipes/selectors';
1619
import {
1720
isApprovableRevision,
1821
isLatestApprovedRevision,
1922
isLatestRevision,
2023
isRevisionPendingApproval,
2124
} from 'normandy/state/app/revisions/selectors';
22-
import { getRouterPath, getUrlParam, getUrlParamAsInt } from 'normandy/state/router/selectors';
25+
import {
26+
getRouterPath,
27+
getUrlParam,
28+
getUrlParamAsInt,
29+
} from 'normandy/state/router/selectors';
2330

2431
@withRouter
2532
@connect(

0 commit comments

Comments
 (0)