Releases: jsx-eslint/eslint-plugin-react
Releases · jsx-eslint/eslint-plugin-react
v7.8.0-rc.0
Added
- Add support for fragments to
react-in-jsx-scope(#1758) - Add support for Flow generic PropType to
require-default-props(#1724 @miziak) - Add component whitelist option to
forbid-component-props(#1732 @ThiefMaster) - Add support for React 16.3 lifecycle methods to
no-unused-prop-types(#1681 @bvaughn) - Add support for React 16.3 lifecycle methods to
sort-comp(#1767 @joe-denea) - Add support for React 16.3 lifecycle methods to
no-typos - Add support for
prevStateandnextStatetono-unused-state(#1759) - Add warnings for
componentWillMount,componentWillReceivePropsandcomponentWillUpdatelifecycle methods inno-deprecated(#1750 @sergei-startsev)
Fixed
- Fix
no-typosfalse positive on customPropTypeclasses (#1389 @brettdh) - Fix
boolean-prop-namingto handle required props (#1389 @louisscruz) - Fix
jsx-curly-brace-presenceto allow whitespace JSX container (#1717 @sharmilajesupaul) - Fix
jsx-no-bindto handle ternary conditions (#1722 @gwenaellarmet)
Changed
- Documentation improvements (#1699 @ronanmathew, #1743 @ybiquitous, #1753 @awthwathje, #1783 @chentsulin, #1703 @ferhatelmas)
v7.7.0
Added
forbid-foreign-prop-types: addallowInPropTypesoption (#1655 @iansu)- Add
jsx-max-depthrule (#1260 @chriswong)
Fixed
no-access-state-in-setstate: Exclude references to this.state in setState callback (#1610 @pfhayes)no-danger-with-children: prevent infinite loop (#1571 @ljharb)sort-prop-types: Fix sortShapeProp when shape is not an object literal (#1669 @justinanastos)jsx-child-element-spacing: fix error location (#1666 @pfhayes)no-unused-prop-types: fix for createClass (#1675 @yuri-sakharov)prop-types: include nextProps checking in shouldComponentUpdate (#1690 @amerryma)jsx-curly-spacing: refactor to fix start and end-braces in a single pass (#1414 @s-h-a-d-o-w)
Changed
jsx-child-element-spacing: add missing docs (#1665 @pfhayes); fix docs (#1670 @SammyM)
v7.6.1
Fixed
- Flow: fix crash in
prop-typeswith recursive type annotations (#1653 @jetpacmonkey) - Fix
no-unknown-propertyto properly recognizecrossOrigininstead ofcrossorigin, and allow it onlinktags. (#1659 @jzDev) - Fix
no-access-state-in-setstateto handle object spread (#1657 @ljharb)
v7.6.0
Added
- Add
forbid-dom-propsrule (#1562 @davazp) - Add
jsx-child-element-spacingrule (#1515 @pfhayes) - Add
no-this-in-sfcrule (#1435 @jomasti) - Add
jsx-sort-default-propsrule (#281 @b0gok) - Add
messageoption toboolean-prop-naming(#1588 @louisscruz) - Add
beforeClosingoption tojsx-tag-spacing(#1396 @cjskillingstad) - Add
instance-methodsandinstance-variablestosort-comp(#599 @RDGthree) - Add
propWrapperFunctionssupport forboolean-prop-naming(#1478 @jomasti) - Add warning for
React.addons.TestUtilsinno-deprecated(#1644 @nirnaor) - Add URL to rule documentation to the rules metadata (#1635 @Arcanemagus)
Fixed
- Fix crashes in
no-access-state-in-setstate(#1559 @jomasti, #1611 @pfhayes) - Fix crash in
require-optimizationwhen encountering arrays with empty items as values in object (#1621 @kamataryo) - Fix crash in
no-unused-prop-typeswhen passing an empty function as a PropType (#1542 #1581 @kevinzwhuang) - Fix crash in
no-typoswhen usingPropType.shapewithout arguments (#1471 @mrichmond) - Fix crash when using Unions in flow propTypes (#1468 @justinanastos)
- Fix missing meta in
jsx-tag-spacing(#1650 @flyerhzm) - Fix
no-unused-stateto detect usage ofthis.stateas an object (#1572) - Fix
no-access-state-in-setstateto detect when thestatevariable is destructured fromthis.state(#1597 @jaaberg) - Fix
jsx-no-literalsto correctly find string literals part of BinaryExpressions (#1511 @jaaberg) - Fix
no-typosfalse positive on custom propTypes with isRequired (#1607 @lfades) - Fix
prop-typesto check fornextPropsincomponentWillReceiveProps(#1636 @xjmdoo) - Fix
no-unknown-propertyto not pascal-casingcrossoriginattribute and only allow it on script/img/video (#1642 @ljharb)
Changed
- Improve
jsx-wrap-multilinesauto fix (#1576 @sharmilajesupaul) - Export
defaultConfigfromsort-comprule for programmatic use (#1578 @Andarist) - Documentation improvements (#1552 @TSMMark, #1566 @lukeapage, #1624 @alexilyaev, @ljharb)
- Update dependencies (@ljharb)
v7.5.1
v7.5.0
Added
- Add
jsx-one-expression-per-linerule (#1497 @TSMMark) - Add
destructuring-assignmentrule (#1462 @DianaSuvorova) - Add
no-access-state-in-setstaterule (#1374 @jaaberg) - Add
button-has-typerule (#1525 @Hypnosphi) - Add warnings for
React.DOMfactories inno-deprecated(#1530 @backjo) - Add
sortShapePropoption tosort-prop-types(#1476 @jomasti) - Add
parens-new-lineoption tojsx-wrap-multilines(#1475 @jomasti) - Add
checkContextTypesandcheckChildContextTypesoptions toforbid-prop-types(#1533 @jomasti) - Add
forbidDefaultForRequiredoption torequire-default-props(#1524 @jomasti) - Add new nodes support to
jsx-wrap-multilines(#1384 @evgeny-petukhov)
Fixed
- Fix
jsx-curly-brace-presenceauto fix by bailing out when some chars exist (#1479 #1449 @jackyho112) - Fix
boolean-prop-namingcrash with Object spread (#1485 @track0x1) - Fix
no-unused-stateto correctly handle arrow function class method (#1363 @jackyho112) - Fix incompatibility with
typescript-eslint-parser(#1496 @timothykang) - Fix
jsx-no-bindto only warn for props and account for variable declaration (#1444 #1395 #1417 @jackyho112) - Fix
no-props-unused-propsto handle props usage in custom prop validators (#1518 @petersendidit) - Fix
prefer-stateless-functionto account forcontextTypesanddefaultProps(#1521 @jomasti) - Fix
jsx-no-comment-textnodesto not warn when using two slashes via html entities at the beginning of a literal (#1517 @jomasti) - Fix
default-props-match-prop-typescrash (#1499 @jomasti) - Fix
no-unused-prop-typesto handle props used in thesetStateupdate callback (#1507 @petersendidit) - Fix alignment bug in
jsx-indent(#1246 @jseminck)
Changed
v7.4.0
Added
- Add Flow 0.53 support (#1376 @jseminck)
- Add
jsx-curly-brace-presencerule (#1310 @jackyho112) - Add support for Flow IntersectionTypeAnnotation to
prop-typesandno-unused-prop-types(#1364 #1323 @jseminck) - Add support for Flow TypedArgument to
no-unused-prop-types(#1412 @jseminck) - Add support for Flow ClassExpressions to
prop-types(#1400 @jseminck) - Add support for Flow read-only props to
no-unused-prop-types(#1388 @jseminck) - Add more tests for
prop-typesandno-unused-prop-types(#1381 @DianaSuvorova) - Add support for increment and decrement operations to
no-direct-mutation-state(#1386 @zpao)
Fixed
- Fix
no-unused-stateto ignore computed property keys (#1361 @jackyho112) - Fix
no-typoscrash (#1406 @jseminck) - Fix
boolean-prop-namingcrash (#1409 @EvHaus) - Fix
prop-typesandno-unused-prop-typescrash with IntersectionTypeAnnotation (#1413 @jseminck)
Changed
- Documentation improvements (#1392 @xcatliu, #1403 @piperchester, #1432 @jneuendorf)
v7.4.0-rc.1
v7.4.0-rc.0
Added
- Add Flow 0.53 support (#1376 @jseminck)
- Add
jsx-curly-brace-presencerule (#1310 @jackyho112) - Add support for Flow IntersectionTypeAnnotation to
prop-typesandno-unused-prop-types(#1364 #1323 @jseminck) - Add support for Flow TypedArgument to
no-unsed-prop-types(#1412 @jseminck) - Add support for Flow ClassExpressions to
prop-types(#1400 @jseminck) - Add support for Flow read-only props to
no-unused-prop-types(#1388 @jseminck) - Add more tests for
prop-typesandno-unused-prop-types(#1381 @DianaSuvorova)
Fixed
- Fix
no-unused-stateto ignore computed property keys (#1361 @jackyho112) - Fix
no-typoscrash (#1406 @jseminck) - Fix
boolean-prop-namingcrash (#1409 @EvHaus)
Changed
- Documentation improvements (#1392 @xcatliu, #1403 @piperchester)
v7.3.0
Added
- Add checks for
propTypes,contextTypesandchildContextTypestono-typos(#213 @DianaSuvorova)
Fixed
- Fix
boolean-prop-namingcrash (#1369 @EvHaus) - Fix
no-typoscrash (#1353 @jseminck) - Fix
require-default-propsstopping when it finds a component without props (#1380 @brgibson) - Fix
no-direct-mutation-statedetection with nested components (#1382)