Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change naming from singular defaultProp to plural defaultProps #2064

Merged
merged 1 commit into from Dec 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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