Skip to content

Commit

Permalink
Enable react/prop-types. (mozilla-services#3977)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Jan 31, 2018
1 parent c3f0599 commit 7165478
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins:
root: true

rules:
consistent-return: off # TODO: remove, and default to mozilla/recommended of "error"
eqeqeq: off # TODO: change to "error"
no-console: [error, {allow: [debug, error, info, trace, warn]}]
no-var: off # TODO: change to "error"
Expand Down
2 changes: 1 addition & 1 deletion server/src/pages/shotindex/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.createModel = function(req) {
}
let serverModel = {
title,
hasDeviceId: req.deviceId || null,
hasDeviceId: req.deviceId !== undefined,
defaultSearch: query || null
};
serverModel.shotsPerPage = req.shotsPerPage;
Expand Down
8 changes: 4 additions & 4 deletions server/src/pages/shotindex/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,16 @@ Body.propTypes = {
abTests: PropTypes.object,
defaultSearch: PropTypes.string,
disableSearch: PropTypes.bool,
downloadUrls: PropTypes.array,
downloadUrls: PropTypes.object,
enableUserSettings: PropTypes.bool,
hasDeviceId: PropTypes.bool,
isExtInstalled: PropTypes.bool,
isOwner: PropTypes.bool,
pageNumber: PropTypes.number,
pageNumber: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
shots: PropTypes.array,
shotsPerPage: PropTypes.number,
shotsPerPage: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
staticLink: PropTypes.func,
totalShots: PropTypes.number
totalShots: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
};

class Card extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion server/src/reactruntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports.HeadTemplate.propTypes = {
hashAnalytics: PropTypes.bool,
messages: PropTypes.object,
noAnalytics: PropTypes.bool,
sentryPublicDSN: PropTypes.bool,
sentryPublicDSN: PropTypes.string,
staticLink: PropTypes.func,
title: PropTypes.string,
userLocales: PropTypes.array
Expand Down

0 comments on commit 7165478

Please sign in to comment.