React-specific linting rules for ESLint
MIT License
Bot releases are hidden (Show)
Published by ljharb over 2 years ago
jsx-curly-brace-presence
: avoid warning on curlies containing quote characters (#3214 @ljharb)jsx-indent
: do not report on non-jsx-returning ternaries that contain null (#3222 @ljharb)jsx-indent
: properly report on returned ternaries with jsx (#3222 @ljharb)no-array-index-key
: detect named-imported cloneElement
/createElement
(#3213 @ljharb)Published by ljharb over 2 years ago
Published by ljharb over 2 years ago
hook-use-state
] rule to enforce symmetric useState hook variable names ([#2921][] @duncanbeevers)jsx-no-target-blank
]: Improve fixer with option allowReferrer
([#3167][] @apepper)jsx-curly-brace-presence
]: add "propElementValues" config option ([#3191][] @ljharb)iframe-missing-sandbox
] rule ([#2753][] @tosmolka @ljharb)no-did-mount-set-state
], [no-did-update-set-state
]: no-op with react >= 16.3 ([#1754][] @ljharb)jsx-sort-props
]: support multiline prop groups ([#3198][] @duhamelgm)jsx-key
]: add warnDuplicates
option to warn on duplicate jsx keys in an array ([#2614][] @ljharb)jsx-sort-props
]: add locale
option ([#3002][] @ljharb)prop-types
], propTypes
: add support for exported type inference ([#3163][] @vedadeepta)no-invalid-html-attribute
]: allow 'shortcut icon' on link
([#3174][] @Primajin)prefer-exact-props
] improve performance for Identifier
visitor ([#3190][] @meowtec)propTypes
: Handle TSTypeReference in no-unused-prop-type ([#3195][] @niik)sort-prop-types
]: avoid repeated warnings of the same node/reason ([#519][] @ljharb)jsx-indent
]: Fix indent handling for closing parentheses ([#620][] @stefanbuck])prop-types
/propTypes
]: follow a returned identifier to see if it is JSX ([#1046][] @ljharb)no-unused-state
]: TS: support getDerivedStateFromProps
as an arrow function ([#2061][] @ljharb)no-array-index-key
]: catch .toString
and String()
usage ([#2813][] @RedTn)function-component-definition
]: do not break on dollar signs ([#3207][] @ljharb)prefer-stateless-function
]: avoid a crash inside doctrine
([#2596][] @ljharb)prop-types
]: catch infinite loop ([#2861][] @ljharb)forbid-prop-types
]: properly report name in error message; check undestructured arguments ([#2945][] @ljharb)jsx-runtime
] link from branch to sha ([#3160][] @tatsushitoji)jsx-no-target-blank
]: Improve readme ([#3169][] @apepper)display-name
]: improve examples ([#3189][] @golopot)no-invalid-html-attribute
]: sort HTML_ELEMENTS and messages ([#3182][] @Primajin)forbid-foreign-prop-types
]: document allowInPropTypes
option ([#1815][] @ljharb)jsx-sort-default-props
]: remove unnecessary code ([#1817][] @ljharb)jsx-no-target-blank
]: fix syntax highlighting ([#3199][] @shamrin)jsx-key
]: improve example ([#3202][] @chnakamura)jsx-key
]: use more AST selectors (@ljharb)Full Changelog: https://github.com/yannickcr/eslint-plugin-react/compare/v7.28.0...v7.29.0
Published by ljharb almost 3 years ago
function-component-definition
: support namedComponents
option being an array by @petersendidit in https://github.com/yannickcr/eslint-plugin-react/pull/3129
jsx-indent-props
: Reset line.isUsingOperator
correctly after ternary (#3146) by @tobiaswaltl in https://github.com/yannickcr/eslint-plugin-react/pull/3157
util.isReactHookCall
by @duncanbeevers in https://github.com/yannickcr/eslint-plugin-react/pull/3156
Full Changelog: https://github.com/yannickcr/eslint-plugin-react/compare/v7.27.1...v7.28.0
Published by ljharb almost 3 years ago
no-unused-class-component-methods
: add getChildContext lifecycle method by @yoyo837 in https://github.com/yannickcr/eslint-plugin-react/pull/3136
prop-types
: fix false positives on renames in object destructuring by @golopot in https://github.com/yannickcr/eslint-plugin-react/pull/3142
Full Changelog: https://github.com/yannickcr/eslint-plugin-react/compare/v7.27.0...v7.27.1
Published by ljharb almost 3 years ago
no-unused-class-component-methods
by @pawelnvk in https://github.com/yannickcr/eslint-plugin-react/pull/2239
no-arrow-function-lifecycle
rule by @ngtan in https://github.com/yannickcr/eslint-plugin-react/pull/1980
propTypes
: add VoidFunctionComponent
to react generic list by @vedadeepta in https://github.com/yannickcr/eslint-plugin-react/pull/3092
no-arrow-function-lifecycle
: prevent crashing on ClassProperty by @AriPerkkio in https://github.com/yannickcr/eslint-plugin-react/pull/3098
eslint-plugin-eslint-plugin
to v4 by @bmish in https://github.com/yannickcr/eslint-plugin-react/pull/3105
display-name
: unwrap TS as
expressions by @ljharb in https://github.com/yannickcr/eslint-plugin-react/pull/3110
no-unstable-components
: improve handling of objects containing render functions by @fizwidget in https://github.com/yannickcr/eslint-plugin-react/pull/3111
prop-types
, propTypes
: add forwardRef<>, ForwardRefRenderFunction<> prop-types by @vedadeepta in https://github.com/yannickcr/eslint-plugin-react/pull/3112
eslint-remote-tester
by @AriPerkkio in https://github.com/yannickcr/eslint-plugin-react/pull/3118
no-invalid-html-attribute
rule by @Nokel81 in https://github.com/yannickcr/eslint-plugin-react/pull/2863
eslint-remote-tester-run-action
by @AriPerkkio in https://github.com/yannickcr/eslint-plugin-react/pull/3120
destructuring-assignment
, component detection: improve component detection by @vedadeepta in https://github.com/yannickcr/eslint-plugin-react/pull/3122
jsx-no-target-blank
: adjust options description by @gebsh in https://github.com/yannickcr/eslint-plugin-react/pull/3124
Full Changelog: https://github.com/yannickcr/eslint-plugin-react/compare/v7.26.1...v7.27.0
Published by ljharb almost 3 years ago
jsx-max-props-per-line
: fix options example by @MrRaiter in https://github.com/yannickcr/eslint-plugin-react/pull/3083
jsx-no-target-blank
: improve error messages by @cutiful in https://github.com/yannickcr/eslint-plugin-react/pull/3088
Full Changelog: https://github.com/yannickcr/eslint-plugin-react/compare/v7.26.0...v7.26.1
Published by ljharb about 3 years ago
no-namespace
rule (#2640 @yacinehmito @ljharb)jsx-max-props-per-line
: add single
and multi
options (#3078 @SIL0RAK)display-name
: Get rid of false position on component detection (#2759 @iiison)no-access-state-in-setstate
: passing test for “don't error if it's not a React Component” (#1873 @kentcdodds)Published by ljharb about 3 years ago
Published by ljharb about 3 years ago
Published by ljharb about 3 years ago
Published by ljharb about 3 years ago
Published by ljharb about 3 years ago
Published by ljharb over 3 years ago
Published by ljharb over 3 years ago
Published by ljharb over 3 years ago
Published by ljharb over 3 years ago
Published by ljharb almost 4 years ago
Published by ljharb almost 4 years ago
Published by ljharb over 4 years ago
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