Skip to content

Commit

Permalink
Change naming from singular defaultProp to plural defaultProps
Browse files Browse the repository at this point in the history
  • Loading branch information
jseminck committed Dec 1, 2018
1 parent 6d9e7bb commit d36872b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rules/require-default-props.js
Expand Up @@ -37,7 +37,7 @@ module.exports = {


/**
* Reports all propTypes passed in that don't have a defaultProp counterpart.
* Reports all propTypes passed in that don't have a defaultProps counterpart.
* @param {Object[]} propTypes List of propTypes to check.
* @param {Object} defaultProps Object of defaultProps to check. Keys are the props names.
* @return {void}
Expand All @@ -55,7 +55,7 @@ module.exports = {
if (forbidDefaultForRequired && defaultProps[propName]) {
context.report(
prop.node,
'propType "{{name}}" is required and should not have a defaultProp declaration.',
'propType "{{name}}" is required and should not have a defaultProps declaration.',
{name: propName}
);
}
Expand All @@ -68,7 +68,7 @@ module.exports = {

context.report(
prop.node,
'propType "{{name}}" is not required, but has no corresponding defaultProp declaration.',
'propType "{{name}}" is not required, but has no corresponding defaultProps declaration.',
{name: propName}
);
});
Expand Down

0 comments on commit d36872b

Please sign in to comment.