Skip to content

Commit

Permalink
[Patch] require-default-props: Change naming from singular defaultP…
Browse files Browse the repository at this point in the history
…rop to plural defaultProps
  • Loading branch information
jseminck authored and ljharb committed Dec 1, 2018
1 parent 6d9e7bb commit 6334216
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 75 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 6334216

Please sign in to comment.