Bug 1442485 - Fix/enable eslint 'react/jsx-first-prop-new-line'

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md

Changes made via eslint's `--fix` feature.
This commit is contained in:
Ed Morley 2018-03-01 16:27:39 +00:00
Родитель f268d9e721
Коммит 3964dac1b6
8 изменённых файлов: 42 добавлений и 23 удалений

Просмотреть файл

@ -64,7 +64,6 @@ module.exports = neutrino => {
'quotes': 'off',
'radix': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-first-prop-new-line': 'off',
'react/jsx-max-props-per-line': 'off',
'react/no-array-index-key': 'off',
'react/no-danger': 'off',

Просмотреть файл

@ -107,7 +107,8 @@ export default class PushActionMenu extends React.PureComponent {
<ul className="dropdown-menu pull-right">
{runnableVisible ?
<li title="Hide Runnable Jobs"
<li
title="Hide Runnable Jobs"
className="dropdown-item"
onClick={() => hideRunnableJobsCb()}
>Hide Runnable Jobs</li> :

Просмотреть файл

@ -51,7 +51,8 @@ export class Revision extends React.PureComponent {
>{commitRevision.substring(0, 12)}
</a>
</span>
<Initials title={`${name}: ${email}`}
<Initials
title={`${name}: ${email}`}
author={name}
/>
<span title={this.escapedComment}>

Просмотреть файл

@ -43,7 +43,8 @@ RevisionList.propTypes = {
export function MoreRevisionsLink(props) {
return (
<li>
<a href={props.href}
<a
href={props.href}
data-ignore-job-clear-on-click
target="_blank"
rel="noopener"

Просмотреть файл

@ -31,7 +31,8 @@ class SuggestionsListItem extends React.Component {
<li>
<div className="job-tabs-content">
{(this.props.filerInAddress || this.props.user.is_staff) &&
<a className="btn btn-xs btn-light-bordered"
<a
className="btn btn-xs btn-light-bordered"
onClick={this.fileBugEvent}
title="file a bug for this failure"
>
@ -56,7 +57,8 @@ class SuggestionsListItem extends React.Component {
{/* <!--All other bugs--> */}
{this.props.suggestion.valid_all_others && this.props.suggestion.valid_open_recent &&
<a target="_blank"
<a
target="_blank"
rel="noopener"
href=""
onClick={this.clickShowMore}
@ -107,13 +109,15 @@ function BugListItem(props) {
return (
<li>
<button className="btn btn-xs btn-light-bordered"
<button
className="btn btn-xs btn-light-bordered"
onClick={pinboardServiceEvent}
title="add to list of bugs to associate with all pinned jobs"
>
<i className="fa fa-thumb-tack" />
</button>
<a className={`${props.bugClassName} ml-1`}
<a
className={`${props.bugClassName} ml-1`}
href={bugUrl}
target="_blank"
rel="noopener"
@ -129,7 +133,8 @@ function BugListItem(props) {
function ErrorsList(props) {
const errorListItem = props.errors.map((error, index) =>
(<li key={index}>{error.name} : {error.result}.
<a title="Open in Log Viewer"
<a
title="Open in Log Viewer"
target="_blank"
rel="noopener"
href={error.lvURL}
@ -182,7 +187,8 @@ function FailureSummaryPanel(props) {
props.jobLogUrls.map((job, index) =>
(<li key={index}>
<p className="failure-summary-line-empty mb-0">Log parsing in progress.<br />
<a title="Open the raw log in a new window"
<a
title="Open the raw log in a new window"
target="_blank"
rel="noopener"
href={job.url}

Просмотреть файл

@ -24,7 +24,8 @@ function ClassificationsPane(props) {
<span title={classificationName.name}><i className={`fa ${iconClass}`} />
<span className="ml-1">{classificationName.name}</span></span>
{props.bugs.length > 0 &&
<a target="_blank" rel="noopener" href={getBugUrl(props.bugs[0].bug_id)}
<a
target="_blank" rel="noopener" href={getBugUrl(props.bugs[0].bug_id)}
title={`View bug ${props.bugs[0].bug_id}`}
><em> {props.bugs[0].bug_id}</em></a>}
</li>
@ -63,7 +64,8 @@ function JobDetailsListItem(props) {
<li className="small">
<label>{props.label}</label>
{props.labelHref &&
<a title={props.labelTitle}
<a
title={props.labelTitle}
href={props.labelHref}
onClick={props.labelOnclick}
target={props.labelTarget}
@ -71,7 +73,8 @@ function JobDetailsListItem(props) {
>
{props.labelText} <span className="fa fa-pencil-square-o icon-superscript" />: </a>}
{!props.href ? <span className="ml-1">{props.text}</span> :
<a title={props.title}
<a
title={props.title}
className="ml-1"
href={props.href}
onClick={props.onclick}

Просмотреть файл

@ -16,9 +16,10 @@ const App = () => (
<Navigation />
<main>
<Switch>
<Route exact path="/testview.html" render={props => (hasProps(props.location.search) ?
<Groups {...props} /> :
<NotFound {...props} />)}
<Route
exact path="/testview.html" render={props => (hasProps(props.location.search) ?
<Groups {...props} /> :
<NotFound {...props} />)}
/>
<Route name="search" path="?revision=:revision&repo=:repo" handler={Groups} />
<Route name="notfound" component={NotFound} />

Просмотреть файл

@ -36,7 +36,8 @@ class BugCountComponent extends React.Component {
render() {
return (
<td className="bug-count"
<td
className="bug-count"
onClick={this.onClick}
>
{this.props.test.bugs === undefined ? <Icon name="minus" title="Click to expand and fetch bugs" /> : (
@ -65,7 +66,8 @@ class Platform extends React.Component {
render() {
return (
<span className="platform badge"
<span
className="platform badge"
title={`${this.props.job.jobType.symbol} ${this.props.job.failureClassification.name}`}
>
<Link
@ -104,14 +106,16 @@ class TestComponent extends React.Component {
<div className="bottom-separator"><strong>Test Group: {this.props.test.group}</strong></div>
{this.props.test.jobs.map((job, key) => (
<div key={key}>
<Platform job={job}
<Platform
job={job}
key={key}
platform={platformMap[job.buildPlatform.platform]}
option={this.props.options[job.optionCollectionHash]}
repo={this.props.repo}
revision={this.props.revision}
/>
<LogViewer job={job}
<LogViewer
job={job}
repo={this.props.repo}
/>
{job.tier > 1 && <span className="tier badge">Tier-{job.tier}</span>}
@ -142,7 +146,8 @@ class TestComponent extends React.Component {
{this.props.test.bugs && <div>
<div className="bottom-separator"><strong>Bugs:</strong></div>
{Object.values(this.props.test.bugs).map((bug, key) => (
<div key={key}><Link to={`https://bugzilla.mozilla.org/show_bug.cgi?id=${bug.id}`}
<div key={key}><Link
to={`https://bugzilla.mozilla.org/show_bug.cgi?id=${bug.id}`}
target="_blank"
rel="noopener"
>{bug.id} - {bug.summary}</Link></div>
@ -155,12 +160,14 @@ class TestComponent extends React.Component {
render() {
return (
<td className="test-table">
<span className="test"
<span
className="test"
onClick={this.onClick}
>{this.props.name}</span>
<span className="platform-list">
{this.props.test.jobs.map((job, key) => (
<Platform job={job}
<Platform
job={job}
key={key}
platform={platformMap[job.buildPlatform.platform]}
option={this.props.options[job.optionCollectionHash]}