Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Aug 6, 2018
1 parent c6892cf commit 93deab6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/amo/components/Addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const slugIsPositiveID = (slug) => {
export class AddonBase extends React.Component {
static propTypes = {
config: PropTypes.object,
RatingManager: PropTypes.element,
addon: PropTypes.object.isRequired,
RatingManager: PropTypes.func,
addon: PropTypes.object,
clientApp: PropTypes.string.isRequired,
// This prop is passed in by withInstallHelpers()
defaultInstallSource: PropTypes.string.isRequired,
Expand All @@ -78,7 +78,7 @@ export class AddonBase extends React.Component {
}).isRequired,
installStatus: PropTypes.string.isRequired,
userAgentInfo: PropTypes.object.isRequired,
addonsByAuthors: PropTypes.array.isRequired,
addonsByAuthors: PropTypes.array,
};

static defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/amo/components/LandingPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class LandingPageBase extends React.Component {
// This is a bug; addonTypeOfResults is used in
// `componentWillReceiveProps()`.
// eslint-disable-next-line react/no-unused-prop-types
addonTypeOfResults: PropTypes.string.isRequired,
addonTypeOfResults: PropTypes.string,
// This is a bug; context is used in `setViewContextType()`.
// eslint-disable-next-line react/no-unused-prop-types
context: PropTypes.string.isRequired,
Expand Down
4 changes: 2 additions & 2 deletions src/core/components/InstallButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class InstallButtonBase extends React.Component {
headerURL: PropTypes.string,
i18n: PropTypes.object.isRequired,
iconURL: PropTypes.string,
id: PropTypes.string,
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
install: PropTypes.func.isRequired,
installTheme: PropTypes.func.isRequired,
// See ReactRouterLocationType in 'core/types/router'
Expand All @@ -98,7 +98,7 @@ export class InstallButtonBase extends React.Component {
uninstall: PropTypes.func.isRequired,
updateURL: PropTypes.string,
useButton: PropTypes.bool,
userAgentInfo: PropTypes.string.isRequired,
userAgentInfo: PropTypes.object.isRequired,
version: PropTypes.string,
_InstallTrigger: PropTypes.object,
_config: PropTypes.object,
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/InstallSwitch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class InstallSwitchBase extends React.Component {
headerURL: PropTypes.string,
i18n: PropTypes.object.isRequired,
iconURL: PropTypes.string,
id: PropTypes.string,
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
install: PropTypes.func.isRequired,
installTheme: PropTypes.func.isRequired,
installURL: PropTypes.string,
Expand Down
6 changes: 3 additions & 3 deletions src/core/installAddon.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ export class WithInstallHelpers extends React.Component {
// See ReactRouterLocationType from 'core/types/router'
location: PropTypes.object,
platformFiles: PropTypes.object,
name: PropTypes.string.isRequired,
status: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
name: PropTypes.string,
status: PropTypes.string,
type: PropTypes.string,
userAgentInfo: PropTypes.object.isRequired,
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/middleware/security.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getNoScriptStyles(
`src/${appName}/noscript.css`,
);
try {
return fs.readFileSync(cssPath);
return fs.readFileSync(cssPath, 'utf8');
} catch (e) {
if (e.code !== 'ENOENT') {
_log.info(`noscript styles could not be parsed from ${cssPath}`);
Expand Down

0 comments on commit 93deab6

Please sign in to comment.