airbnb-prop-types
Advanced tools
Changelog
v2.17.0 - 2024-05-23
childrenOf
/childrenOfType
/childrenSequenceOf
: support fragments via renderableChildren
helper #71
5032f7f
c92c5c4
8586801
npmignore
0a366a6
6539947
auto-changelog
1255cd7
array.prototype.find
, array.prototype.flatmap
, function.prototype.name
, is-regex
, object-is
, object.assign
, object.entries
, prop-types
, prop-types-exact
7ed89ae
@babel/cli
, @babel/core
, @babel/register
, eslint
, eslint-plugin-import
, eslint-plugin-jsx-a11y
, eslint-plugin-react
af140ff
@babel/cli
, @babel/core
, @babel/register
, enzyme-adapter-react-helper
, eslint
, eslint-plugin-react
e560291
object-is
, object.assign
, react-is
4f12896
engines.node
9c6f8e6
aud
in posttest e9fb91a
2b14af0
is-regex
5c7bd2b
42d5f4d
predicate
validatorfunding
fieldhas
(#67)array.prototype.find
, function.prototype.name
, is-regex
, object.entries
, object-is
, react-is
@babel/cli
, @babel/core
, @babel/register
, airbnb-browser-shims
, enzyme
, enzyme-adapter-react-helper
, eslint
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-react
, enzyme-adapter-react-helper
, object-inspect
, object.values
, reflect.ownkeys
, rimraf
, safe-publish-latest
or
testsreact-is
enzyme-adapter-react-helper
, eslint
, eslint-config-airbnb
, rimraf
, safe-publish-latest
npm run test:prepare
in node >= 4node
v12
stringEndsWith
(#59)getComponentName
/componentWithName
: get display name from forwardRefs (#64)array.prototype.find
, function.prototype.name
@babel/cli
, @babel/core
, @babel/register
, babel-plugin-istanbul
, babel-preset-airbnb
, enzyme
, enzyme-adapter-react-helper
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-jsx-a11y
, eslint-plugin-react
ref
: Remove arity check (#57)ref
: ensure that the prop value is not a component (#55)ref
(#54)prop-types
, react-is
@babel/cli
, @babel/core
, @babel/register
, airbnb-browser-shims
, babel-plugin-istanbul
, babel-preset-airbnb
, enzyme
, enzyme-adapter-react-helper
, eslint
empty
elementType
: support forwardRefs and Context Provider/Consumerobject.entries
airbnb-browser-shims
, chai
, enzyme
, enzyme
, enzyme-adapter-react-helper
, eslint
, eslint-plugin-jsx-a11y
, eslint-plugin-react
, eslint-plugin-import
has
, prop-types
, prop-types-exact
enzyme
, enzyme-adapter-react-helper
, eslint
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-jsx-a11y
, eslint-plugin-react
, safe-publish-latest
componentWithName
: allow it to take a list of HOC names to strip off before validating (#41)eslint-plugin-import
, eslint-plugin-react
node
v10
requiredBy
validator (#30)stringStartsWith
booleanSome
object-is
instead of Object.is
prop-types
, function.prototype.name
, object.assign
, prop-types-exact
airbnb-browser-shims
, babel-cli
, babel-plugin-istanbul
, babel-plugin-transform-replace-object-assign
, babel-register
, chai
, eslint
, eslint-config-airbnb
, eslint-plugin-jsx-a11y
, eslint-plugin-react
, eslint-plugin-import
, react
, rimraf
node
v9
; pin included builds to LTS; use nvm install-latest-npm
enzyme-adapter-react-helper
nonNegativeInteger
: mock should match reality and not be a noopThunk, only a noopmapper
function to uniqueArrayOf
(#29, #28)function.prototype.name
eslint
, eslint-config-airbnb
getComponentName
more robust in IE (#27)prop-types-exact
babel-preset-airbnb
, chai
, eslint-plugin-airbnb
, eslint-plugin-import
, eslint-plugin-jsx-a11y
restrictedProp
: ensure it passes with a custom message when nullaryrestrictedProp
: add ability to overwrite error with custom function (#22)Object.assign
by transforming to object.assign
prop-types
babel-plugin-istanbul
, chai
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-jsx-a11y
, eslint-plugin-react
, mocha
node
v8
; npm
v5
+ breaks on node
< v4nyc
childrenHavePropXorChildren
Ensure validator skips over falsy childrenprop-types
babel-plugin-istanbul
, mocha
, nyc
, react
prop-types
package instead of React.PropTypes
array.prototype.find
, prop-types
babel-cli
, babel-register
, eslint
, nyc
, react
componentWithName
: throw if given a non-string/non-regex nameor
: ensure it works with explicitNull
(#12)between
: avoid React PropType warning by using valuesOf
instead of PropTypes.objectOf
or
: add some extra tests; remove unnecessary oneOfType
wrapperchildrenOfType
: add support for *
which supports anything.babel-cli
, babel-register
, eslint
, rimraf
, babel-plugin-istanbul
, eslint-plugin-react
childrenOfType
: partially revert fc0e37f84e1537a875c30d0db69b5121d790eb40childrenSequenceOf
sequenceOf
between
: allow it to take props-taking number thunks as option values as well.between
shape
nonNegativeNumber
elementType
childrenOf
object
keysOf
(#8)valuesOf
isPrimitive
and isPlainObject
helperswrapValidator
helperrenderableChildren
helpergetComponentName
helpernChildren
, restrictedProp
, childrenHavePropXorChildren
: add isRequired
for consistencyand
: isRequired
validator typeName should indicate such.npm run coverage
integer
eslint
, rimraf
numericString
explicitNull
airbnb-js-shims
, babel-cli
, babel-register
, eslint-plugin-react
childrenOfType
: improve the error messageeslint
, eslint-config-airbnb
, eslint-plugin-jsx-a11y
mutuallyExclusiveTrueProps
babel-cli
, babel-preset-airbnb
, babel-register
, eslint
.isRequired
NODE_ENV
is production
, export mocks instead of real validatorsuniqueArray
/uniqueArrayOf
withShape
restrictedProp
)safe-publish-latest
to devDepseslint
, eslint-config-airbnb
, eslint-plugin-import
, eslint-plugin-react
, eslint-plugin-jsx-a11y
, mocha
, react
; add missing babel-register
node
v7
forbidExtraProps
: add the componentName into the error messageforbidPropTypes
: allow propTypes to be processed multiple timesforbidPropTypes
: fix unknown props error messageforbidExtraProps
babel-cli
and
combinatorisRequired
to nonNegativeInteger
eslint-plugin-react
, mocha
mutuallyExclusiveProps
: include the “current” prop in the exclusives listisRequired
to mutuallyExclusiveProps
; ensure mutuallyExclusiveProps
is not required by defaultisRequired
to componentWithName
; ensure componentWithName
is not required by defaultsafe-publish-latest