Bug 1513597 - Enable and fix ESLint react/forbid-prop-types rules (#6308)

Co-authored-by: Tom Prince <mozilla@hocat.ca>
This commit is contained in:
Bola Ahmed Buari 2020-04-23 20:19:25 +01:00 коммит произвёл GitHub
Родитель 7fc7df5b2c
Коммит 1fb930b3e6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
61 изменённых файлов: 220 добавлений и 177 удалений

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

@ -39,7 +39,6 @@ module.exports = {
'react/destructuring-assignment': 'off',
'react/jsx-fragments': 'off',
'react/jsx-props-no-spreading': 'off',
'react/forbid-prop-types': 'off',
'react/prop-types': 'off',
// Override AirBnB's config for this rule to make it more strict.
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md

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

@ -92,25 +92,21 @@ export default class GraphsContainer extends React.Component {
GraphsContainer.propTypes = {
graphOneData: PropTypes.arrayOf(
PropTypes.shape({
date: PropTypes.shape({ Date: PropTypes.string }),
value: PropTypes.number,
data: PropTypes.arrayOf(PropTypes.shape({})),
color: PropTypes.string,
}),
),
graphTwoData: PropTypes.arrayOf(
PropTypes.arrayOf(
PropTypes.shape({
date: PropTypes.shape({ Date: PropTypes.string }),
value: PropTypes.number,
}),
),
PropTypes.arrayOf(
PropTypes.shape({
date: PropTypes.shape({ Date: PropTypes.string }),
value: PropTypes.number,
}),
),
PropTypes.shape({
data: PropTypes.arrayOf(PropTypes.shape({})),
color: PropTypes.string,
}),
PropTypes.shape({
data: PropTypes.arrayOf(PropTypes.shape({})),
color: PropTypes.string,
}),
),
children: PropTypes.object.isRequired,
children: PropTypes.element.isRequired,
};
GraphsContainer.defaultProps = {

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

@ -85,14 +85,11 @@ Layout.propTypes = {
location: PropTypes.shape({
search: PropTypes.string,
}).isRequired,
datePicker: PropTypes.oneOfType([PropTypes.shape({}), PropTypes.bool]),
datePicker: PropTypes.element.isRequired,
header: PropTypes.oneOfType([PropTypes.shape({}), PropTypes.bool]),
table: PropTypes.oneOfType([PropTypes.shape({}), PropTypes.bool]),
graphOneData: PropTypes.arrayOf(PropTypes.shape({})),
graphTwoData: PropTypes.arrayOf(
PropTypes.arrayOf(PropTypes.shape({})),
PropTypes.arrayOf(PropTypes.shape({})),
),
graphTwoData: PropTypes.arrayOf(PropTypes.shape({})),
tableData: PropTypes.arrayOf(PropTypes.shape({})),
graphData: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.shape({})),
@ -119,7 +116,6 @@ Layout.defaultProps = {
tree: null,
table: null,
header: null,
datePicker: null,
};
export default Layout;

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

@ -307,9 +307,9 @@ CustomJobActions.propTypes = {
isLoggedIn: PropTypes.bool.isRequired,
notify: PropTypes.func.isRequired,
toggle: PropTypes.func.isRequired,
decisionTaskMap: PropTypes.object.isRequired,
job: PropTypes.object,
currentRepo: PropTypes.object.isRequired,
decisionTaskMap: PropTypes.shape({}).isRequired,
job: PropTypes.shape({}),
currentRepo: PropTypes.shape({}).isRequired,
};
CustomJobActions.defaultProps = {

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

@ -252,10 +252,10 @@ class KeyboardShortcuts extends React.Component {
}
KeyboardShortcuts.propTypes = {
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
pinJob: PropTypes.func.isRequired,
unPinAll: PropTypes.func.isRequired,
children: PropTypes.array.isRequired,
children: PropTypes.arrayOf(PropTypes.element).isRequired,
clearSelectedJob: PropTypes.func.isRequired,
updateJobDetails: PropTypes.func.isRequired,
showOnScreenShortcuts: PropTypes.func.isRequired,
@ -268,9 +268,9 @@ KeyboardShortcuts.propTypes = {
}),
).isRequired,
notify: PropTypes.func.isRequired,
pinnedJobs: PropTypes.object.isRequired,
pinnedJobs: PropTypes.shape({}).isRequired,
clearAllOnScreenNotifications: PropTypes.func.isRequired,
selectedJob: PropTypes.object,
selectedJob: PropTypes.shape({}),
};
KeyboardShortcuts.defaultProps = {

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

@ -859,8 +859,8 @@ export class BugFilerClass extends React.Component {
BugFilerClass.propTypes = {
isOpen: PropTypes.bool.isRequired,
toggle: PropTypes.func.isRequired,
suggestion: PropTypes.object.isRequired,
suggestions: PropTypes.array.isRequired,
suggestion: PropTypes.shape({}).isRequired,
suggestions: PropTypes.arrayOf(PropTypes.object).isRequired,
fullLog: PropTypes.string.isRequired,
parsedLog: PropTypes.string.isRequired,
reftestUrl: PropTypes.string.isRequired,

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

@ -428,15 +428,15 @@ class DetailsPanel extends React.Component {
}
DetailsPanel.propTypes = {
currentRepo: PropTypes.object.isRequired,
user: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
user: PropTypes.shape({}).isRequired,
resizedHeight: PropTypes.number.isRequired,
classificationTypes: PropTypes.array.isRequired,
classificationMap: PropTypes.object.isRequired,
classificationTypes: PropTypes.arrayOf(PropTypes.object).isRequired,
classificationMap: PropTypes.shape({}).isRequired,
setPinBoardVisible: PropTypes.func.isRequired,
isPinBoardVisible: PropTypes.bool.isRequired,
pushList: PropTypes.array.isRequired,
selectedJob: PropTypes.object,
pushList: PropTypes.arrayOf(PropTypes.object).isRequired,
selectedJob: PropTypes.shape({}),
};
DetailsPanel.defaultProps = {

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

@ -647,13 +647,13 @@ class PinBoard extends React.Component {
PinBoard.propTypes = {
recalculateUnclassifiedCounts: PropTypes.func.isRequired,
decisionTaskMap: PropTypes.object.isRequired,
jobMap: PropTypes.object.isRequired,
classificationTypes: PropTypes.array.isRequired,
decisionTaskMap: PropTypes.shape({}).isRequired,
jobMap: PropTypes.shape({}).isRequired,
classificationTypes: PropTypes.arrayOf(PropTypes.object).isRequired,
isLoggedIn: PropTypes.bool.isRequired,
isPinBoardVisible: PropTypes.bool.isRequired,
pinnedJobs: PropTypes.object.isRequired,
pinnedJobBugs: PropTypes.object.isRequired,
pinnedJobs: PropTypes.shape({}).isRequired,
pinnedJobBugs: PropTypes.shape({}).isRequired,
addBug: PropTypes.func.isRequired,
removeBug: PropTypes.func.isRequired,
unPinJob: PropTypes.func.isRequired,
@ -662,12 +662,12 @@ PinBoard.propTypes = {
setClassificationComment: PropTypes.func.isRequired,
setSelectedJob: PropTypes.func.isRequired,
notify: PropTypes.func.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
failureClassificationId: PropTypes.number.isRequired,
failureClassificationComment: PropTypes.string.isRequired,
selectedJobFull: PropTypes.object,
selectedJobFull: PropTypes.shape({}),
email: PropTypes.string,
revisionTips: PropTypes.array,
revisionTips: PropTypes.arrayOf(PropTypes.object),
};
PinBoard.defaultProps = {

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

@ -612,13 +612,13 @@ class ActionBar extends React.PureComponent {
ActionBar.propTypes = {
pinJob: PropTypes.func.isRequired,
decisionTaskMap: PropTypes.object.isRequired,
user: PropTypes.object.isRequired,
selectedJobFull: PropTypes.object.isRequired,
decisionTaskMap: PropTypes.shape({}).isRequired,
user: PropTypes.shape({}).isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
logParseStatus: PropTypes.string.isRequired,
notify: PropTypes.func.isRequired,
jobLogUrls: PropTypes.array,
currentRepo: PropTypes.object.isRequired,
jobLogUrls: PropTypes.arrayOf(PropTypes.object),
currentRepo: PropTypes.shape({}).isRequired,
isTryRepo: PropTypes.bool,
logViewerUrl: PropTypes.string,
logViewerFullUrl: PropTypes.string,

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

@ -59,9 +59,9 @@ export default function ClassificationsPanel(props) {
}
ClassificationsPanel.propTypes = {
currentRepo: PropTypes.object.isRequired,
classification: PropTypes.object.isRequired,
classificationMap: PropTypes.object.isRequired,
job: PropTypes.object.isRequired,
bugs: PropTypes.array.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
classification: PropTypes.shape({}).isRequired,
classificationMap: PropTypes.shape({}).isRequired,
job: PropTypes.shape({}).isRequired,
bugs: PropTypes.arrayOf(PropTypes.object).isRequired,
};

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

@ -114,7 +114,7 @@ export default function LogItem(props) {
}
LogItem.propTypes = {
logUrls: PropTypes.array.isRequired,
logUrls: PropTypes.arrayOf(PropTypes.object).isRequired,
logViewerUrl: PropTypes.string,
logViewerFullUrl: PropTypes.string,
};

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

@ -46,7 +46,7 @@ export default function LogUrls(props) {
}
LogUrls.propTypes = {
logUrls: PropTypes.array.isRequired,
logUrls: PropTypes.arrayOf(PropTypes.object).isRequired,
logViewerUrl: PropTypes.string,
logViewerFullUrl: PropTypes.string,
};

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

@ -20,7 +20,7 @@ function StatusPanel(props) {
}
StatusPanel.propTypes = {
selectedJobFull: PropTypes.object.isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
};
export default StatusPanel;

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

@ -84,13 +84,13 @@ class SummaryPanel extends React.PureComponent {
}
SummaryPanel.propTypes = {
bugs: PropTypes.array.isRequired,
user: PropTypes.object.isRequired,
currentRepo: PropTypes.object.isRequired,
classificationMap: PropTypes.object.isRequired,
selectedJobFull: PropTypes.object.isRequired,
latestClassification: PropTypes.object,
jobLogUrls: PropTypes.array,
bugs: PropTypes.arrayOf(PropTypes.object).isRequired,
user: PropTypes.shape({}).isRequired,
currentRepo: PropTypes.shape({}).isRequired,
classificationMap: PropTypes.shape({}).isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
latestClassification: PropTypes.shape({}),
jobLogUrls: PropTypes.arrayOf(PropTypes.object),
jobDetailLoading: PropTypes.bool,
logParseStatus: PropTypes.string,
logViewerUrl: PropTypes.string,

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

@ -45,7 +45,7 @@ function RelatedBugSaved(props) {
RelatedBugSaved.propTypes = {
deleteBug: PropTypes.func.isRequired,
bug: PropTypes.object.isRequired,
bug: PropTypes.shape({}).isRequired,
};
function RelatedBug(props) {
@ -67,7 +67,7 @@ function RelatedBug(props) {
RelatedBug.propTypes = {
deleteBug: PropTypes.func.isRequired,
bugs: PropTypes.array.isRequired,
bugs: PropTypes.arrayOf(PropTypes.object).isRequired,
};
function TableRow(props) {
@ -112,8 +112,8 @@ function TableRow(props) {
TableRow.propTypes = {
deleteClassification: PropTypes.func.isRequired,
classification: PropTypes.object.isRequired,
classificationMap: PropTypes.object.isRequired,
classification: PropTypes.shape({}).isRequired,
classificationMap: PropTypes.shape({}).isRequired,
};
function AnnotationsTable(props) {
@ -145,8 +145,8 @@ function AnnotationsTable(props) {
AnnotationsTable.propTypes = {
deleteClassification: PropTypes.func.isRequired,
classifications: PropTypes.array.isRequired,
classificationMap: PropTypes.object.isRequired,
classifications: PropTypes.arrayOf(PropTypes.object).isRequired,
classificationMap: PropTypes.shape({}).isRequired,
};
class AnnotationsTab extends React.Component {
@ -250,12 +250,12 @@ class AnnotationsTab extends React.Component {
}
AnnotationsTab.propTypes = {
classificationMap: PropTypes.object.isRequired,
bugs: PropTypes.array.isRequired,
classifications: PropTypes.array.isRequired,
classificationMap: PropTypes.shape({}).isRequired,
bugs: PropTypes.arrayOf(PropTypes.object).isRequired,
classifications: PropTypes.arrayOf(PropTypes.object).isRequired,
recalculateUnclassifiedCounts: PropTypes.func.isRequired,
notify: PropTypes.func.isRequired,
selectedJobFull: PropTypes.object.isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
};
export default connect(null, { notify, recalculateUnclassifiedCounts })(

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

@ -53,7 +53,7 @@ export default class PerformanceTab extends React.PureComponent {
PerformanceTab.propTypes = {
repoName: PropTypes.string.isRequired,
perfJobDetail: PropTypes.array,
perfJobDetail: PropTypes.arrayOf(PropTypes.object),
revision: PropTypes.string,
};

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

@ -330,9 +330,9 @@ class SimilarJobsTab extends React.Component {
SimilarJobsTab.propTypes = {
repoName: PropTypes.string.isRequired,
classificationMap: PropTypes.object.isRequired,
classificationMap: PropTypes.shape({}).isRequired,
notify: PropTypes.func.isRequired,
selectedJobFull: PropTypes.object.isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
};
export default connect(null, { notify })(SimilarJobsTab);

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

@ -226,22 +226,22 @@ class TabsPanel extends React.Component {
}
TabsPanel.propTypes = {
classificationMap: PropTypes.object.isRequired,
jobDetails: PropTypes.array.isRequired,
classificationMap: PropTypes.shape({}).isRequired,
jobDetails: PropTypes.arrayOf(PropTypes.object).isRequired,
repoName: PropTypes.string.isRequired,
classifications: PropTypes.array.isRequired,
classifications: PropTypes.arrayOf(PropTypes.object).isRequired,
togglePinBoardVisibility: PropTypes.func.isRequired,
isPinBoardVisible: PropTypes.bool.isRequired,
pinnedJobs: PropTypes.object.isRequired,
bugs: PropTypes.array.isRequired,
pinnedJobs: PropTypes.shape({}).isRequired,
bugs: PropTypes.arrayOf(PropTypes.object).isRequired,
clearSelectedJob: PropTypes.func.isRequired,
selectedJobFull: PropTypes.object.isRequired,
perfJobDetail: PropTypes.array,
suggestions: PropTypes.array,
selectedJobFull: PropTypes.shape({}).isRequired,
perfJobDetail: PropTypes.arrayOf(PropTypes.object),
suggestions: PropTypes.arrayOf(PropTypes.object),
jobRevision: PropTypes.string,
errors: PropTypes.array,
errors: PropTypes.arrayOf(PropTypes.object),
bugSuggestionsLoading: PropTypes.bool,
jobLogUrls: PropTypes.array,
jobLogUrls: PropTypes.arrayOf(PropTypes.object),
logParseStatus: PropTypes.string,
logViewerFullUrl: PropTypes.string,
reftestUrl: PropTypes.string,

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

@ -54,10 +54,10 @@ function BugListItem(props) {
}
BugListItem.propTypes = {
bug: PropTypes.object.isRequired,
suggestion: PropTypes.object.isRequired,
bug: PropTypes.shape({}).isRequired,
suggestion: PropTypes.shape({}).isRequired,
addBug: PropTypes.func.isRequired,
selectedJobFull: PropTypes.object.isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
bugClassName: PropTypes.string,
title: PropTypes.string,
};

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

@ -29,5 +29,5 @@ export default function ErrorsList(props) {
}
ErrorsList.propTypes = {
errors: PropTypes.array.isRequired,
errors: PropTypes.arrayOf(PropTypes.object).isRequired,
};

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

@ -164,11 +164,11 @@ class FailureSummaryTab extends React.Component {
FailureSummaryTab.propTypes = {
addBug: PropTypes.func.isRequired,
pinJob: PropTypes.func.isRequired,
selectedJobFull: PropTypes.object.isRequired,
suggestions: PropTypes.array,
errors: PropTypes.array,
selectedJobFull: PropTypes.shape({}).isRequired,
suggestions: PropTypes.arrayOf(PropTypes.object),
errors: PropTypes.arrayOf(PropTypes.object),
bugSuggestionsLoading: PropTypes.bool,
jobLogUrls: PropTypes.array,
jobLogUrls: PropTypes.arrayOf(PropTypes.object),
logParseStatus: PropTypes.string,
reftestUrl: PropTypes.string,
logViewerFullUrl: PropTypes.string,

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

@ -97,7 +97,7 @@ export default class SuggestionsListItem extends React.Component {
}
SuggestionsListItem.propTypes = {
selectedJobFull: PropTypes.object.isRequired,
suggestion: PropTypes.object.isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
suggestion: PropTypes.shape({}).isRequired,
toggleBugFiler: PropTypes.func.isRequired,
};

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

@ -228,9 +228,9 @@ export default class ActiveFilters extends React.Component {
}
ActiveFilters.propTypes = {
filterModel: PropTypes.object.isRequired,
filterBarFilters: PropTypes.array.isRequired,
filterModel: PropTypes.shape({}).isRequired,
filterBarFilters: PropTypes.arrayOf(PropTypes.object).isRequired,
isFieldFilterVisible: PropTypes.bool.isRequired,
toggleFieldFilterVisible: PropTypes.func.isRequired,
classificationTypes: PropTypes.array.isRequired,
classificationTypes: PropTypes.arrayOf(PropTypes.object).isRequired,
};

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

@ -130,12 +130,12 @@ function FiltersMenu(props) {
}
FiltersMenu.propTypes = {
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
pinJobs: PropTypes.func.isRequired,
setSelectedJob: PropTypes.func.isRequired,
getAllShownJobs: PropTypes.func.isRequired,
selectedJob: PropTypes.object,
user: PropTypes.object.isRequired,
selectedJob: PropTypes.shape({}),
user: PropTypes.shape({}).isRequired,
};
FiltersMenu.defaultProps = {

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

@ -106,7 +106,7 @@ class NotificationsMenu extends React.Component {
}
NotificationsMenu.propTypes = {
storedNotifications: PropTypes.array.isRequired,
storedNotifications: PropTypes.arrayOf(PropTypes.object).isRequired,
clearStoredNotifications: PropTypes.func.isRequired,
};

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

@ -104,10 +104,10 @@ PrimaryNavBar.propTypes = {
setUser: PropTypes.func.isRequired,
setCurrentRepoTreeStatus: PropTypes.func.isRequired,
toggleFieldFilterVisible: PropTypes.func.isRequired,
filterModel: PropTypes.object.isRequired,
repos: PropTypes.array.isRequired,
filterModel: PropTypes.shape({}).isRequired,
repos: PropTypes.arrayOf(PropTypes.object).isRequired,
serverChanged: PropTypes.bool.isRequired,
user: PropTypes.object.isRequired,
user: PropTypes.shape({}).isRequired,
duplicateJobsVisible: PropTypes.bool.isRequired,
groupCountsExpanded: PropTypes.bool.isRequired,
pushHealthVisibility: PropTypes.string.isRequired,

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

@ -100,5 +100,5 @@ export default function ReposMenu(props) {
}
ReposMenu.propTypes = {
repos: PropTypes.array.isRequired,
repos: PropTypes.arrayOf(PropTypes.object).isRequired,
};

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

@ -390,8 +390,8 @@ class SecondaryNavBar extends React.PureComponent {
SecondaryNavBar.propTypes = {
updateButtonClick: PropTypes.func.isRequired,
serverChanged: PropTypes.bool.isRequired,
filterModel: PropTypes.object.isRequired,
repos: PropTypes.array.isRequired,
filterModel: PropTypes.shape({}).isRequired,
repos: PropTypes.arrayOf(PropTypes.object).isRequired,
setCurrentRepoTreeStatus: PropTypes.func.isRequired,
allUnclassifiedFailureCount: PropTypes.number.isRequired,
recalculateUnclassifiedCounts: PropTypes.func.isRequired,

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

@ -33,5 +33,5 @@ export default function TierIndicator(props) {
}
TierIndicator.propTypes = {
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
};

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

@ -53,5 +53,5 @@ export default function TiersMenu(props) {
}
TiersMenu.propTypes = {
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
};

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

@ -224,6 +224,10 @@ export default class WatchedRepo extends React.Component {
WatchedRepo.propTypes = {
repoName: PropTypes.string.isRequired,
unwatchRepo: PropTypes.func.isRequired,
repo: PropTypes.object.isRequired,
repo: PropTypes.shape({
name: PropTypes.string,
dvcs_type: PropTypes.string,
pushLogUrl: PropTypes.string,
}).isRequired,
setCurrentRepoTreeStatus: PropTypes.func.isRequired,
};

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

@ -314,9 +314,9 @@ FuzzyJobFinder.propTypes = {
notify: PropTypes.func.isRequired,
toggle: PropTypes.func.isRequired,
decisionTaskId: PropTypes.string,
jobList: PropTypes.array,
filteredJobList: PropTypes.array,
currentRepo: PropTypes.object.isRequired,
jobList: PropTypes.arrayOf(PropTypes.object),
filteredJobList: PropTypes.arrayOf(PropTypes.object),
currentRepo: PropTypes.shape({}).isRequired,
};
FuzzyJobFinder.defaultProps = {

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

@ -139,8 +139,8 @@ export default class JobButtonComponent extends React.Component {
}
JobButtonComponent.propTypes = {
job: PropTypes.object.isRequired,
filterModel: PropTypes.object.isRequired,
job: PropTypes.shape({}).isRequired,
filterModel: PropTypes.shape({}).isRequired,
repoName: PropTypes.string.isRequired,
visible: PropTypes.bool.isRequired,
resultStatus: PropTypes.string.isRequired,

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

@ -171,9 +171,9 @@ export class JobGroupComponent extends React.Component {
}
JobGroupComponent.propTypes = {
group: PropTypes.object.isRequired,
group: PropTypes.shape({}).isRequired,
repoName: PropTypes.string.isRequired,
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
filterPlatformCb: PropTypes.func.isRequired,
pushGroupState: PropTypes.string.isRequired,
duplicateJobsVisible: PropTypes.bool.isRequired,

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

@ -54,9 +54,9 @@ export default class JobsAndGroups extends React.Component {
}
JobsAndGroups.propTypes = {
groups: PropTypes.array.isRequired,
groups: PropTypes.arrayOf(PropTypes.object).isRequired,
repoName: PropTypes.string.isRequired,
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
filterPlatformCb: PropTypes.func.isRequired,
pushGroupState: PropTypes.string.isRequired,
duplicateJobsVisible: PropTypes.bool.isRequired,

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

@ -112,9 +112,9 @@ export default class Platform extends React.PureComponent {
}
Platform.propTypes = {
platform: PropTypes.object.isRequired,
platform: PropTypes.shape({}).isRequired,
repoName: PropTypes.string.isRequired,
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
pushGroupState: PropTypes.string.isRequired,
duplicateJobsVisible: PropTypes.bool.isRequired,
groupCountsExpanded: PropTypes.bool.isRequired,

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

@ -681,9 +681,11 @@ class Push extends React.PureComponent {
}
Push.propTypes = {
push: PropTypes.object.isRequired,
currentRepo: PropTypes.object.isRequired,
filterModel: PropTypes.object.isRequired,
push: PropTypes.shape({}).isRequired,
currentRepo: PropTypes.shape({
name: PropTypes.string,
}).isRequired,
filterModel: PropTypes.shape({}).isRequired,
isLoggedIn: PropTypes.bool.isRequired,
notificationSupported: PropTypes.bool.isRequired,
getAllShownJobs: PropTypes.func.isRequired,
@ -695,7 +697,7 @@ Push.propTypes = {
notify: PropTypes.func.isRequired,
isOnlyRevision: PropTypes.bool.isRequired,
pushHealthVisibility: PropTypes.string.isRequired,
decisionTaskMap: PropTypes.object.isRequired,
decisionTaskMap: PropTypes.shape({}).isRequired,
};
const mapStateToProps = ({

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

@ -238,8 +238,10 @@ PushActionMenu.propTypes = {
runnableVisible: PropTypes.bool.isRequired,
isLoggedIn: PropTypes.bool.isRequired,
revision: PropTypes.string.isRequired,
currentRepo: PropTypes.object.isRequired,
decisionTaskMap: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({
name: PropTypes.string,
}).isRequired,
decisionTaskMap: PropTypes.shape({}).isRequired,
pushId: PropTypes.number.isRequired,
hideRunnableJobs: PropTypes.func.isRequired,
showRunnableJobs: PropTypes.func.isRequired,

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

@ -403,12 +403,14 @@ class PushHeader extends React.Component {
}
PushHeader.propTypes = {
push: PropTypes.object.isRequired,
push: PropTypes.shape({
id: PropTypes.number,
}).isRequired,
pushId: PropTypes.number.isRequired,
pushTimestamp: PropTypes.number.isRequired,
author: PropTypes.string.isRequired,
revision: PropTypes.string.isRequired,
filterModel: PropTypes.object.isRequired,
filterModel: PropTypes.shape({}).isRequired,
runnableVisible: PropTypes.bool.isRequired,
showRunnableJobs: PropTypes.func.isRequired,
hideRunnableJobs: PropTypes.func.isRequired,
@ -420,15 +422,15 @@ PushHeader.propTypes = {
expandAllPushGroups: PropTypes.func.isRequired,
notificationSupported: PropTypes.bool.isRequired,
getAllShownJobs: PropTypes.func.isRequired,
selectedRunnableJobs: PropTypes.array.isRequired,
selectedRunnableJobs: PropTypes.arrayOf(PropTypes.object).isRequired,
collapsed: PropTypes.bool.isRequired,
notify: PropTypes.func.isRequired,
jobCounts: PropTypes.object.isRequired,
jobCounts: PropTypes.shape({}).isRequired,
pushHealthVisibility: PropTypes.string.isRequired,
decisionTaskMap: PropTypes.object.isRequired,
decisionTaskMap: PropTypes.shape({}).isRequired,
watchState: PropTypes.string,
currentRepo: PropTypes.object.isRequired,
pushHealthStatusCallback: PropTypes.func,
currentRepo: PropTypes.shape({}).isRequired,
};
PushHeader.defaultProps = {

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

@ -145,13 +145,16 @@ PushJobs.propTypes = {
setSelectedJob: PropTypes.func.isRequired,
toggleSelectedRunnableJob: PropTypes.func.isRequired,
repoName: PropTypes.string.isRequired,
push: PropTypes.object.isRequired,
push: PropTypes.shape({
id: PropTypes.number,
revision: PropTypes.string,
}).isRequired,
pushGroupState: PropTypes.string.isRequired,
runnableVisible: PropTypes.bool.isRequired,
duplicateJobsVisible: PropTypes.bool.isRequired,
groupCountsExpanded: PropTypes.bool.isRequired,
platforms: PropTypes.array.isRequired,
filterModel: PropTypes.object.isRequired,
platforms: PropTypes.arrayOf(PropTypes.object).isRequired,
filterModel: PropTypes.shape({}).isRequired,
};
export default connect(null, { setSelectedJob, togglePinJob })(PushJobs);

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

@ -207,9 +207,11 @@ class PushList extends React.Component {
PushList.propTypes = {
repoName: PropTypes.string.isRequired,
user: PropTypes.object.isRequired,
filterModel: PropTypes.object.isRequired,
pushList: PropTypes.array.isRequired,
user: PropTypes.shape({
isLoggedIn: PropTypes.bool,
}).isRequired,
filterModel: PropTypes.shape({}).isRequired,
pushList: PropTypes.arrayOf(PropTypes.object).isRequired,
fetchNextPushes: PropTypes.func.isRequired,
fetchPushes: PropTypes.func.isRequired,
pollPushes: PropTypes.func.isRequired,
@ -221,13 +223,13 @@ PushList.propTypes = {
allUnclassifiedFailureCount: PropTypes.number.isRequired,
pushHealthVisibility: PropTypes.string.isRequired,
clearSelectedJob: PropTypes.func.isRequired,
pinnedJobs: PropTypes.object.isRequired,
pinnedJobs: PropTypes.shape({}).isRequired,
setSelectedJobFromQueryString: PropTypes.func.isRequired,
getAllShownJobs: PropTypes.func.isRequired,
jobMap: PropTypes.object.isRequired,
jobMap: PropTypes.shape({}).isRequired,
notify: PropTypes.func.isRequired,
revision: PropTypes.string,
currentRepo: PropTypes.object,
currentRepo: PropTypes.shape({}),
};
PushList.defaultProps = {

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

@ -96,7 +96,10 @@ function PushLoadErrors(props) {
PushLoadErrors.propTypes = {
loadingPushes: PropTypes.bool.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({
url: PropTypes.string,
pushLogUrl: PropTypes.string,
}).isRequired,
repoName: PropTypes.string.isRequired,
revision: PropTypes.string,
};

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

@ -54,7 +54,7 @@ class PaginationGroup extends React.Component {
}
PaginationGroup.propTypes = {
pageNums: PropTypes.array.isRequired,
pageNums: PropTypes.arrayOf(PropTypes.number).isRequired,
page: PropTypes.number,
count: PropTypes.number,
fetchData: PropTypes.func.isRequired,

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

@ -101,9 +101,9 @@ RevisionInformation.propTypes = {
originalRevision: PropTypes.string,
newProject: PropTypes.string,
newRevision: PropTypes.string,
originalResultSet: PropTypes.object,
newResultSet: PropTypes.object,
selectedTimeRange: PropTypes.object,
originalResultSet: PropTypes.shape({}),
newResultSet: PropTypes.shape({}),
selectedTimeRange: PropTypes.shape({}),
};
RevisionInformation.defaultProps = {

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

@ -244,12 +244,12 @@ class ClassificationGroup extends React.PureComponent {
}
ClassificationGroup.propTypes = {
group: PropTypes.array.isRequired,
group: PropTypes.arrayOf(PropTypes.object).isRequired,
name: PropTypes.string.isRequired,
repo: PropTypes.string.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
revision: PropTypes.string.isRequired,
user: PropTypes.object.isRequired,
user: PropTypes.shape({}).isRequired,
notify: PropTypes.func.isRequired,
unfilteredLength: PropTypes.number.isRequired,
hasRetriggerAll: PropTypes.bool,

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

@ -133,7 +133,7 @@ CommitHistory.propTypes = {
id: PropTypes.number,
}).isRequired,
revision: PropTypes.string.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
};
export default CommitHistory;

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

@ -120,13 +120,13 @@ class GroupedTests extends PureComponent {
}
GroupedTests.propTypes = {
group: PropTypes.array.isRequired,
group: PropTypes.arrayOf(PropTypes.object).isRequired,
groupedBy: PropTypes.string.isRequired,
orderedBy: PropTypes.string.isRequired,
revision: PropTypes.string.isRequired,
repo: PropTypes.string.isRequired,
currentRepo: PropTypes.object.isRequired,
user: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
user: PropTypes.shape({}).isRequired,
notify: PropTypes.func.isRequired,
};

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

@ -365,5 +365,5 @@ export default class Health extends React.PureComponent {
}
Health.propTypes = {
location: PropTypes.object.isRequired,
location: PropTypes.shape({}).isRequired,
};

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

@ -47,7 +47,11 @@ export default class JobListMetric extends React.PureComponent {
}
JobListMetric.propTypes = {
data: PropTypes.object.isRequired,
data: PropTypes.shape({
name: PropTypes.string.isRequired,
result: PropTypes.string.isRequired,
details: PropTypes.array.isRequired,
}).isRequired,
repo: PropTypes.string.isRequired,
revision: PropTypes.string.isRequired,
setExpanded: PropTypes.func.isRequired,

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

@ -77,7 +77,7 @@ export default class Metric extends React.PureComponent {
Metric.propTypes = {
result: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
children: PropTypes.object.isRequired,
children: PropTypes.element.isRequired,
setExpanded: PropTypes.func.isRequired,
expanded: PropTypes.bool,
};

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

@ -51,13 +51,13 @@ export default class Navigation extends React.PureComponent {
}
Navigation.propTypes = {
user: PropTypes.object.isRequired,
user: PropTypes.shape({}).isRequired,
setUser: PropTypes.func.isRequired,
repo: PropTypes.string.isRequired,
revision: PropTypes.string.isRequired,
notify: PropTypes.func.isRequired,
result: PropTypes.string,
children: PropTypes.object,
children: PropTypes.element,
};
Navigation.defaultProps = {

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

@ -248,8 +248,10 @@ TestFailure.propTypes = {
key: PropTypes.string.isRequired,
}).isRequired,
repo: PropTypes.string.isRequired,
currentRepo: PropTypes.object.isRequired,
user: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
user: PropTypes.shape({
isLoggedIn: PropTypes.bool,
}).isRequired,
revision: PropTypes.string.isRequired,
notify: PropTypes.func.isRequired,
groupedBy: PropTypes.string.isRequired,

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

@ -91,10 +91,18 @@ export default class TestMetric extends React.PureComponent {
}
TestMetric.propTypes = {
data: PropTypes.object.isRequired,
user: PropTypes.object.isRequired,
data: PropTypes.shape({
name: PropTypes.string.isRequired,
result: PropTypes.string.isRequired,
details: PropTypes.shape({
needInvestigation: PropTypes.array.isRequired,
knownIssues: PropTypes.array.isRequired,
unsupported: PropTypes.array.isRequired,
}).isRequired,
}).isRequired,
user: PropTypes.shape({}).isRequired,
repo: PropTypes.string.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepo: PropTypes.shape({}).isRequired,
revision: PropTypes.string.isRequired,
notify: PropTypes.func.isRequired,
setExpanded: PropTypes.func.isRequired,

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

@ -87,7 +87,7 @@ class UnsupportedGroup extends React.PureComponent {
}
UnsupportedGroup.propTypes = {
group: PropTypes.array.isRequired,
group: PropTypes.arrayOf(PropTypes.object).isRequired,
name: PropTypes.string.isRequired,
revision: PropTypes.string.isRequired,
className: PropTypes.string,

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

@ -65,7 +65,7 @@ export default class JobDetails extends React.PureComponent {
}
JobDetails.propTypes = {
jobDetails: PropTypes.array,
jobDetails: PropTypes.arrayOf(PropTypes.object),
};
JobDetails.defaultProps = {

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

@ -132,7 +132,16 @@ export default class JobInfo extends React.PureComponent {
}
JobInfo.propTypes = {
job: PropTypes.object.isRequired,
job: PropTypes.shape({
signature: PropTypes.string,
title: PropTypes.string,
taskId: PropTypes.string,
buildPlatform: PropTypes.string,
jobTypeName: PropTypes.string,
buildArchitecture: PropTypes.string,
buildOs: PropTypes.string,
submitTimestamp: PropTypes.string,
}).isRequired,
extraFields: PropTypes.arrayOf(
PropTypes.exact({
title: PropTypes.string.isRequired,

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

@ -112,5 +112,8 @@ Revision.propTypes = {
author: PropTypes.string.isRequired,
revision: PropTypes.string.isRequired,
}).isRequired,
repo: PropTypes.object.isRequired,
repo: PropTypes.shape({
url: PropTypes.string,
revisionHrefPrefix: PropTypes.string,
}).isRequired,
};

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

@ -47,5 +47,7 @@ export default class RevisionLinkify extends React.Component {
RevisionLinkify.propTypes = {
children: PropTypes.string.isRequired,
repo: PropTypes.object.isRequired,
repo: PropTypes.shape({
url: PropTypes.string,
}).isRequired,
};

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

@ -33,9 +33,11 @@ export class RevisionList extends React.PureComponent {
RevisionList.propTypes = {
revision: PropTypes.string.isRequired,
revisions: PropTypes.array.isRequired,
revisions: PropTypes.arrayOf(PropTypes.object).isRequired,
revisionCount: PropTypes.number.isRequired,
repo: PropTypes.object.isRequired,
repo: PropTypes.shape({
pushLogUrl: PropTypes.string,
}).isRequired,
widthClass: PropTypes.string,
};

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

@ -22,7 +22,7 @@ const StatusProgress = props => {
};
StatusProgress.propTypes = {
counts: PropTypes.object.isRequired,
counts: PropTypes.objectOf(PropTypes.number).isRequired,
};
export default StatusProgress;

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

@ -139,7 +139,11 @@ class Login extends React.Component {
Login.propTypes = {
setUser: PropTypes.func.isRequired,
user: PropTypes.object,
user: PropTypes.shape({
email: PropTypes.string,
isLoggedIn: PropTypes.bool,
fullName: PropTypes.string,
}),
notify: PropTypes.func,
};