Skip to content

Commit 6334216

Browse files
jseminckljharb
authored andcommitted
[Patch] require-default-props: Change naming from singular defaultProp to plural defaultProps
1 parent 6d9e7bb commit 6334216

File tree

2 files changed

+75
-75
lines changed

2 files changed

+75
-75
lines changed

lib/rules/require-default-props.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737

3838

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

6969
context.report(
7070
prop.node,
71-
'propType "{{name}}" is not required, but has no corresponding defaultProp declaration.',
71+
'propType "{{name}}" is not required, but has no corresponding defaultProps declaration.',
7272
{name: propName}
7373
);
7474
});

0 commit comments

Comments
 (0)