eslint-plugin-react
Advanced tools
Changelog
[7.20.4] - 2020.07.26
prop-types
]: handle component returning null ([#2696][] @hank121314)prop-types
]/[function-component-definition
]: Add check for first letter capitalization in functional component detection ([#2699][] @jzabala)prop-types
]: use variable value in prop type fields defined by variables ([#2704][] @jzabala)no-typos
]: warn on a bindingless react
importboolean-prop-naming
: Added test for function invocation of bool ([#2697][] @ajkovar)jsx-curly-brace-presence
, jsx-no-comment-textnodes
: add passing testsno-unused-state
: avoid a loopChangelog
[7.20.3] - 2020-06-30
no-unused-prop-types
]/[prop-types
]: typescript interface support literal type and only FunctionComponent should have propTypes validation ([#2690][] @hank121314)no-unused-prop-types
]/TypeScript: avoid crash on indexable interface ([#2687][] @ljharb)Changelog
[7.20.2] - 2020-06-29
no-unused-prop-types
]: handle optional chaining ([#2679][] @hank121314)jsx-pascal-case
]: fix a false positive with "H1" ([#2683][] @ljharb)jsx-no-useless-fragment
]: avoid a crash when autofixing a self-closing React.Fragment ([#2680][] @ljharb)forbid-prop-types
]: avoid crash ([#2682][] @ljharb)Changelog
[7.20.1] - 2020-06-28
forbid-dom-props
], [function-component-definition
]: fix schema typos ([#2667][] @mflorence99)no-unused-prop-types
]: fix with typescript eslint parser ([#2661][] @eltonio450)forbid-prop-types
]: warn on destructured values as well ([#2676][] @ajkovar)jsx-pascal-case
]: Remove xregexp ([#2636][] @yacinehmito))no-typos
] test fails in eslint v7.3 ([#2678][] @toshi-toma)jsx-ast-utils
, object.entries
, resolve
@types/eslint
, @types/estree
, @types/node
, @typescript-eslint/parser
, eslint-config-airbnb-base
, eslint-plugin-eslint-plugin
, eslint-plugin-import
, typescript
Changelog
[7.20.0] - 2020-05-12
forbid-component-props
][]/[forbid-dom-props
][]: Allow a custom message with forbid props ([#2615][] @mtamhankar1)jsx-no-literals
][]: add ignoreProps
option to ignore props validation ([#2146][] @iiison)jsx-sort-props
][]: only use localeCompare when case is ignored ([#2556][] @tanmoyopenroot)jsx-key
][]: add a failing test case for optional chaining ([#2610][] @JonathanLee-LX)no-unused-state
][]: handle optional chaining ([#2588][] @golopot)jsx-pascal-case
][]: Do not consider namespaces when checking for DOM ([#2638][] @yacinehmito)jsx-curly-spacing
][], [jsx-no-bind
][], usedPropTypes
util: avoid node.start and node.end ([25b1936][] @toshi-toma)jsx-no-target-blank
][]: allow no-referrer
without noopener
by default ([#2043][] @seancrater)button-has-type
][]: improve message when non-static value is used ([aecff62][] @golopot)no-adjacent-inline-elements
][]: prevent crash on nullish children ([#2621][] @Rogdham)prop-types
][]: avoid crash when spreading any type ([#2606][] @golopot))require-render-return
][]: add missing "a" ([#2604][] @leothorp)jsx-no-comment-textnodes
][]: fix for @typescript-eslint/parser
([#2601][] @Axnyff)displayName
][]: avoid a crash when using React.memo ([#2587][] @golopot)no-this-in-sfc
][]: backtick this
([#2616][] @mrflip)function-component-definition
][]: Fix unnamedComponents option examples ([#2608][] @vkrol))operator-linebreak
override ([#2578][] @golopot)button-has-type
: ensure no mistakenly allowed identifiers named button
/submit
/reset
([#2625][] @golopot)displayName
: add a test case ([#2593][] @golopot)@types/eslint
, @types/estree
, @types/node
, @typescript-eslint/parser
, coveralls
, eslint-config-airbnb-base
, eslint-plugin-import
, typescript
Changelog
[7.19.0] - 2020-03-06
style-prop-object
][]: Add allow
option ([#1819][] @hornta)jsx-pascal-case
][]: Support unicode characters ([#2557][] @Svish)prefer-stateless-function
][]: avoid crash on ts empty constructor ([#2582][] @golopot)no-adjacent-inline-elements
][]: avoid a crash ([#2575] @ljharb)no-unused-prop-types
][]: Change the reporting to point to a more accurate node ([#2292][] @jseminck)self-closing-comp
][]: consider JSXMemberExpression as component too ([#2572][] @Belco90)no-unused-prop-types
][]: make markPropTypesAsUsed
work with TSEmptyBodyFunctionExpression
AST node ([#2560][] @guillaumewuip)displayName
][] (but really, propTypes
detection): do not crash on empty flow type spreads ([#2570][] @ljharb)react/
prefix to rule name, for consistencyno-unescaped-entities
][]: skip test cases that are now parsing errors in acorn-jsx@5.2.0 ([#2583] @golopot)Changelog
[7.18.3] - 2020-02-02
jsx-indent
][]: don't check literals not within JSX ([#2564][] @toshi-toma)Changelog
[7.18.2] - 2020-02-01
jsx-indent
][]: avoid a crash on non-string literals ([#2561][] @ljharb)Changelog
[7.18.1] - 2020-02-01
jsx-indent
][]: Does not check indents for JSXText ([#2542][] @toshi-toma)jsx-props-no-spreading
][]: add support for namespaced jsx components ([#2534][] @jonathanpalma)jsx-no-target-blank
][]: allow rel to be an expression ([#2544][] @odinho)sort-comp
][]: |
isn’t a valid regex flag; u
and s
are (@ljharb)markdown-magic
to automatically sort all rules alphabetically ([#1742][] @ybiquitous)jsx-props-no-spreading
][]: fix typo to use correct rule ([#2547][] @jonggyun))Changelog
[7.18.0] - 2020-01-15
require-default-props
][]: add option to ignore functional components ([#2532][] @RedTn)function-component-definition
][]: Enforce a specific function type for function components ([#2414][] @Stefanwullems)no-adjacent-inline-elements
][]: Prevent adjacent inline elements not separated by whitespace ([#1155][] @SeanHayes)jsx-no-script-url
][]: prevent usage of javascript:
URLs ([#2419][] @sergei-startsev)jsx-pascal-case
][]: false negative with namespacing ([#1337][] @mfyuce)jsx-curly-brace-presence
][]: Fix curly-brace-presence
edge cases ([#2523][] @rafbgarcia)prop-types
][]: Does not validate missing propTypes for LogicalExpression ([#2533][] @toshi-toma)no-unknown-property
][]: allowTransparency does not exist in React >= v16.1 ([#1538][] @dawidvdh)jsx-curly-brace-presence
][]: Fix error related to tags line break ([#2521][] @rafbgarcia)no-typos
][]: Compilation error when method name is string instead of identifier ([#2514][] @shijistar)jsx-curly-brace-presence
][]: allow trailing spaces in TemplateLiteral ([#2507][] @doochik)no-unused-prop-types
], [no-unused-state
]: fix false positives when using TS type assertions ([#2536][] @kdmadej)no-render-return-value
][]: Fix title ([#2540][] @micnic)no-typos
]: check static lifecycle methods ([#2006][] @bsonntag)jsx-first-prop-new-line
][]: Fix rule name in "Rule Options" section ([#2535][] @barreira)no-unused-prop-types
][]: Added test cases ([#977][] @dozoisch)array-includes
, object.entries
, object.fromentries
, object.values
, resolve