Change Log
May 11, 2026 · View on GitHub
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. This change log adheres to standards from Keep a CHANGELOG.
Unreleased
Added
- [
async-server-action]: add rule (#3729 @jorgezreik) jsx-props-no-multi-spaces: improve autofix for multi-line (#3930 @justisb)jsx-handler-names: support namespaced component names (#3943 @takuji)jsx-no-leaked-render: addignoreAttributesoption (#3441 @aleclarson)jsx-sort-props: addsortFirstoption (#3965 @loderunner)jsx-no-literals: addrestrictedAttributesoption (#3950 @ushiboy)forbid-dom-props: AdddisallowedValuesoption for forbidden props (#3877 @makxca)
Fixed
no-unknown-property: allowonLoadonbody(#3923 @DerekStapleton)no-unknown-property: allowclosedbyondialog(#3980 @ljharb)no-unknown-property: addonScrollEndandonScrollEndCaptureevents as known properties (#3958 @xfeeefeee)- Remove extra space from CLI warning (#3942 @junaidkbr)
jsx-key: detect missing keys in return statement with ternary operator (#3928 @hyeonbinHur)jsx-key: detect missing keys in logical expressions (#3986 @yalperg)display-name: avoid false positive when React is shadowed (#3926 @hyeonbinHur)no-unused-prop-types: detect used props in nested components (#3955 @avaice)
Changed
react-in-jsx-scope,jsx-uses-react: automatically disable when React >= 19 is detected ([#XXXX][] @jonkoops)- [Docs]
no-array-index-key: add template literal examples (#3978 @akahoshi1421)
7.37.5 - 2025.04.03
Fixed
no-unknown-property: allow shadow root attrs on<template>(#3912 @ljharb)prop-types: supportComponentPropsWithReffrom a namespace import (#3651 @corydeppen)jsx-no-constructed-context-values: detect constructed context values in React 19<Context>usage (#3910 @TildaDares)no-unknown-property: allowtransform-originonrect(#3914 @ljharb)
Changed
- [Docs]
button-has-type: clean up phrasing (#3909 @hamirmahal)
7.37.4 - 2025.01.12
Fixed
no-unknown-property: supportonBeforeToggle,popoverTarget,popoverTargetActionattributes (#3865 @acusti)- [types] fix types of flat configs (#3874 @ljharb)
7.37.3 - 2024.12.23
Fixed
no-danger: avoid a crash on a nested component name (#3833 @ljharb)- [Fix] types: correct generated type declaration (#3840 @ocavue)
no-unknown-property: supportprecedenceprop in react 19 (#3829 @acusti)prop-types: props missing in validation when using generic types from a namespace import (#3859 @rbondoc96)
Changed
- [Tests]
jsx-no-script-url: Improve tests (#3849 @radu2147) - [Docs] fix broken links:
default-props-match-prop-types,jsx-boolean-value,jsx-curly-brace-presence,jsx-no-bind,no-array-index-key,no-is-mounted,no-render-return-value,require-default-props(#3841 @bastiendmt)
7.37.2 - 2024.10.22
Fixed
destructuring-assignment: fix false negative when usingtypeof props.a(#3835 @golopot)
Changed
- [Refactor]
destructuring-assignment: usegetParentStatelessComponent(#3835 @golopot)
7.37.1 - 2024.10.01
Fixed
- [meta] do not npmignore
d.tsfiles (#3836 @ljharb)
Changed
- [readme] Fix shared settings link (#3834 @MgenGlder)
7.37.0 - 2024.09.26
Added
- add type generation (#3830 @voxpelli)
no-unescaped-entities: add suggestions (#3831 @StyleShit)forbid-component-props: addallowedForPatterns/disallowedForPatternsoptions (#3805 @Efimenko)no-unstable-nested-components: addpropNamePatternto support custom render prop naming conventions (#3826 @danreeves)
Changed
- [readme] flat config example for react 17+ (#3824 @GabenGar)
7.36.1 - 2024.09.12
Fixed
no-is-mounted: fix logic in method name check (#3821 @Mathias-S)jsx-no-literals: Avoid crashing on valueless boolean props (#3823 @reosarevok)
7.36.0 - 2024.09.12
Added
no-string-refs: allow this.refs in > 18.3.0 (#3807 @henryqdineen)jsx-no-literalsAddelementOverridesoption and the ability to ignore this rule on specific elements (#3812 @Pearce-Ropion)forward-ref-uses-ref: add rule for checking ref parameter is added ([#3667][] @NotWoods)
Fixed
function-component-definition,boolean-prop-naming,jsx-first-prop-new-line,jsx-props-no-multi-spaces,propTypes: use type args (#3629 @HenryBrown0)- JSX pragma: fail gracefully (#3632 @ljharb)
jsx-props-no-spreading: addexplicitSpreadoption to schema (#3799 @ljharb)
Changed
- [Tests] add @typescript-eslint/parser v6 (#3629 @HenryBrown0)
- [Tests] add @typescript-eslint/parser v7 and v8 (#3629 @hampustagerud)
- [Docs]
no-danger: update broken link (#3817 @lucasrmendonca) - [types] add jsdoc type annotations (#3731 @y-hsgw)
- [Tests]
button-has-type: add test case with spread (#3731 @y-hsgw)
7.35.2 - 2024.09.03
Fixed
jsx-curly-brace-presence: avoid autofixing attributes with double quotes to a double quoted attribute (#3814 @ljharb)
7.35.1 - 2024.09.02
Fixed
jsx-curly-brace-presence: do not trigger on strings containing a quote character (#3798 @akulsr0)
7.35.0 - 2024.07.19
Added
- support eslint v9 (#3759 @mdjermanovic)
- export flat configs from plugin root and fix flat config crash (#3694 @bradzacher @mdjermanovic)
- add
jsx-props-no-spread-multi(#3724 @SimonSchick) forbid-component-props: addpropNamePatternto allow / disallow prop name patterns (#3774 @akulsr0)jsx-handler-names: support ignoring component names (#3772 @akulsr0)- version settings: Allow react defaultVersion to be configurable (#3771 @onlywei)
jsx-closing-tag-location: addline-alignedoption (#3777 @kimtaejin3)no-danger: addcustomComponentNamesoption (#3748 @akulsr0)
Fixed
no-invalid-html-attribute: substitute placeholders in suggestion messages (#3759 @mdjermanovic)sort-prop-types: single line type ending without semicolon (#3784 @akulsr0)require-default-props: report when required props have default value (#3785 @akulsr0)
Changed
- [Refactor]
variableUtil: Avoid creating a single flat variable scope for each lookup (#3782 @DanielRosenwasser)
7.34.4 - 2024.07.13
Fixed
prop-types: fixclassNamemissing in prop validation false negative (#3749 @akulsr0)sort-prop-types: Check for undefined before accessingnode.typeAnnotation.typeAnnotation(#3779 @tylerlaprade)
7.34.3 - 2024.06.18
Fixed
prop-types: null-check rootNode before calling getScope (#3762 @crnhrv)boolean-prop-naming: avoid a crash with a spread prop (#3733 @ljharb)jsx-boolean-value:assumeUndefinedIsFalsewithnevermust not allow explicittruevalue (#3757 @6uliver)no-object-type-as-default-prop: enable rule for components with many parameters (#3768 @JulienR1)jsx-key: incorrect behavior for checkKeyMustBeforeSpread with map callbacks (#3769 @akulsr0)
7.34.2 - 2024.05.24
Fixed
boolean-prop-naming: avoid a crash with a non-TSTypeReference type (#3718 @developer-bandi)jsx-no-leaked-render: invalid report if left eside is boolean (#3746 @akulsr0)jsx-closing-bracket-location: message shows{{details}}when there are no details (#3759 @mdjermanovic)no-invalid-html-attribute: ensure error messages are correct (#3759 @mdjermanovic, @ljharb)
Changed
- [Refactor] create various eslint utils to fix eslint deprecations (#3759 @mdjermanovic, @ljharb)
7.34.1 - 2024.03.15
Fixed
jsx-no-leaked-render: prevent wrongly adding parens (#3700 @developer-bandi)boolean-prop-naming: detect TS interfaces (#3701 @developer-bandi)boolean-prop-naming: literalType error fix (#3704 @developer-bandi)boolean-prop-naming: allow TSIntersectionType (#3705 @developer-bandi)no-unknown-property: supportpopover,popovertarget,popovertargetactionattributes (#3707 @ljharb)no-unknown-property: only matchdata-*attributes containing-(#3713 @silverwind)checked-requires-onchange-or-readonly: correct options that were behaving opposite (#3715 @jaesoekjjang)boolean-prop-naming: avoid a crash with a non-TSTypeReference type (#3718 @developer-bandi)
Changed
boolean-prop-naming: improve error message (@ljharb)
7.34.0 - 2024.03.03
Added
sort-prop-types: give errors on TS types (#3615 @akulsr0)no-invalid-html-attribute: add support forapple-touch-startup-imagerelattributes inlinktags (#3638 @thomashockaday)no-unknown-property: add requireDataLowercase option (#3645 @HermanBilous)no-unknown-property: adddisplaystyleon<math>(#3652 @lounsbrough)prefer-read-only-props,prop-types, component detection: allow components to be async functions (#3654 @pnodet)no-unknown-property: supportonResizeon audio/video tags (#3662 @caesar1030)jsx-wrap-multilines: addneveroption to prohibit wrapping parens on multiline JSX (#3668 @reedws)jsx-filename-extension: addignoreFilesWithoutCodeoption to allow empty files (#3674 @burtek)jsx-boolean-value: addassumeUndefinedIsFalseoption (#3675 @developer-bandi)linkAttributesetting,jsx-no-target-blank: support multiple properties (#3673 @burtek)jsx-no-script-url: addincludeFromSettingsoption to supportlinkAttributessetting (#3673 @burtek)jsx-one-expression-per-line: addnon-jsxoption to allow non-JSX children in one line (#3677 @burtek)- add
checked-requires-onchange-or-readonlyrule (#3680 @jaesoekjjang)
Fixed
jsx-no-leaked-render: preserve RHS parens for multiline jsx elements while fixing (#3623 @akulsr0)jsx-key: detect conditional returns (#3630 @yialo)jsx-newline: prevent a crash whenallowMultilines(#3633 @ljharb)no-unknown-property: use a better regex to avoid a crash (#3666 @ljharb @SCH227)prop-types: handle nested forwardRef + memo (#3679 @developer-bandi)no-unknown-property: addfetchPriority(#3697 @SevereCloud)forbid-elements: prevent a crash oncreateElement()(#3632 @ljharb)
Changed
jsx-boolean-value: make error messages clearer (#3691 @developer-bandi)- [Refactor]
propTypes: extract type params to var (#3634 @HenryBrown0) - [Refactor]
boolean-prop-naming: invert if statement (#3634 @HenryBrown0) - [Refactor]
function-component-definition: exit early if no type params (#3634 @HenryBrown0) - [Refactor]
jsx-props-no-multi-spaces: extract type parameters to var (#3634 @HenryBrown0) - [Docs]
jsx-key: fix correct example (#3656 @developer-bandi) - [Tests]
jsx-wrap-multilines: passing tests (#3545 @burtek) - [Docs]
iframe-missing-sandbox: fix link to iframe attribute on mdn (#3690 @nnmrts) - [Docs]
hook-use-state: fix an undefined variable (#3626 @chentsulin)
7.33.2 - 2023.08.15
Fixed
no-deprecated: prevent false positive on commonjs import (#3614 @akulsr0)no-unsafe: report on the method instead of the entire component (@ljharb)no-deprecated: report on the destructured property instead of the entire variable declarator (@ljharb)no-deprecated: report on the imported specifier instead of the entire import statement (@ljharb)no-invalid-html-attribute: report more granularly (@ljharb)
7.33.1 - 2023.07.29
Fixed
require-default-props: fix config schema (#3605 @controversial)jsx-curly-brace-presence: Revert #3538 due to issues with intended string type casting usage (#3611 @taozhou-glean)sort-prop-types: ensure sort-prop-types respects noSortAlphabetically (#3610 @caesar1030)
7.33.0 - 2023.07.19
Added
display-name: addcheckContextObjectsoption (#3529 @JulesBlm)jsx-first-prop-new-line: addmultipropoption (#3533 @haydncomley)no-deprecated: add React 18 deprecations (#3548 @sergei-startsev)forbid-component-props: adddisallowedForoption (#3417 @jacketwpbb)
Fixed
no-array-index-key: consider flatMap (#3530 @k-yle)jsx-curly-brace-presence: handle single and only expression template literals (#3538 @taozhou-glean)no-unknown-property: allowonLoadonsource(@ljharb)jsx-first-prop-new-line: ensure autofix preserves generics in component name (#3546 @ljharb)no-unknown-property: allowfillprop on<symbol>(#3555 @stefanprobst)display-name,prop-types: when checking for a capitalized name, ignore underscores entirely (#3560 @ljharb)no-unused-state: avoid crashing on a class field function with destructured state (#3568 @ljharb)no-unused-prop-types: allow using spread with object expression in jsx (#3570 @akulsr0)- Revert "
destructuring-assignment: Handle destructuring of useContext in SFC" (#3583 #2797 @102) prefer-read-only-props: add TS support (#3593 @HenryBrown0)
Changed
- [Docs]
jsx-newline,no-unsafe,static-property-placement: Fix code syntax highlighting (#3563 @nbsp1221) - [readme] resore configuration URL (#3582 @gokaygurcan)
- [Docs]
jsx-no-bind: reword performance rationale (#3581 @gpoole)
- [Docs]
jsx-first-prop-new-line: add missingmultipropvalue (#3598 @dzek69)
7.32.2 - 2023.01.28
Fixed
- configs: restore
parserOptionsin legacy configs ([#3523][] @ljharb) jsx-no-constructed-context-values,jsx-no-useless-fragment: add a rule schema (@ljharb) (no-unknown-property: addfillfor<marker>(#3525 @alexey-koran)
7.32.1 - 2023.01.16
Fixed
- prevent circular dependency in index and "all" config (#3519 @ljharb)
destructuring-assignment: do not force destructuring of optionally chained properties (#3520 @ljharb)
7.32.0 - 2023.01.10
Added
- support new config system (#3429 @jjangga0214)
hook-use-state: addallowDestructuredStateoption (#3449 @ljharb)- add
sort-default-propsand deprecatejsx-sort-default-props(#1861 @alexzherdev) - add
no-object-type-as-default-proprule (#2848 @cyan33 @fengkx)
Fixed
- configs: avoid legacy config system error (#3461 @ljharb)
sort-prop-types: restore autofixing (#3452, #3471 @ROSSROSALES)no-unknown-property: do not checkfbselements (#3494 @brianogilvie)jsx-newline: No newline between comments and jsx elements (#3493 @justmejulian)jsx-no-leaked-render: Don't report errors on empty strings if React >= v18 (#3488 @himanshu007-creator)no-invalid-html-attribute: convert autofix to suggestion (#3474 @himanshu007-creator @ljharb)jsx-no-leaked-render: fix removing parentheses for conditionals (#3502 @akulsr0)jsx-no-leaked-render: invalid fixes in coerce mode (#3511 @akulsr0)destructuring-assignment: Handle destructuring of useContext in SFC (#2797 @Zinyon @ljharb)
Changed
- [Docs]
jsx-no-leaked-render: Remove mentions of empty strings for React 18 (#3468 @karlhorky) - [Docs] update
eslint-doc-generatorto v1.0.0 (#3499 @bmish) - [meta] add issue template (#3483 @ROSSROSALES)
- [Docs] Use emoji for jsx-runtime config and config file for eslint-doc-generator (#3504 @bmish)
- [Docs]
prefer-exact-props: fix example flow syntax (#3510 @smackfu) - [Perf] use
anyOfinstead ofoneOf(@ljharb @remcohaszing)
7.31.11 - 2022.11.17
Fixed
jsx-no-target-blank: allow ternaries with literals (#3464 @akulsr0)no-unknown-property: addinertattribute (#3484 @ljharb)jsx-key: detect keys in logical expression and conditional expression (#3490 @metreniuk)
Changed
- [Perf] component detection: improve performance by avoiding traversing parents unnecessarily (#3459 @golopot)
- [Docs]
forbid-component-props: inclusive language w/ allowlist (#3473 @AndersDJohnson) - [Docs] automate doc generation with
eslint-doc-generator(#3469 @bmish)
7.31.10 - 2022.10.10
Fixed
no-unknown-property: allowallowFullScreenoniframe(#3455 @almeidx)
7.31.9 - 2022.10.09
Fixed
no-unknown-property: adddialogattributes (#3436 @ljharb)no-arrow-function-lifecycle: when converting from an arrow, remove the semi and wrapping parens (#3337 @ljharb)jsx-key: Ignore elements insideReact.Children.toArray()(#1591 @silvenon)jsx-no-constructed-context-values: fix false positive for usage in non-components (#3448 @golopot)static-property-placement: warn on nonstatic expected-statics (#2581 @ljharb)no-unknown-property: properly tag-restrict case-insensitive attributes (@ljharb)no-unknown-property: allowwebkitDirectoryoninput, case-insensitive (#3454 @ljharb)
Changed
- [Docs]
no-unknown-property: fix typo in link (#3445 @denkristoffer) - [Perf] component detection: improve performance by optimizing getId (#3451 @golopot)
- [Docs]
no-unstable-nested-components: Warn about memoized, nested components (#3444 @eps1lon)
7.31.8 - 2022.09.08
Fixed
no-unknown-property: addviewBoxonmarker(#3416 @ljharb)no-unknown-property: addnoModuleonscript(#3414 @ljharb)no-unknown-property: allowonLoadon<object>(#3415 @OleksiiKachan)no-multi-comp: do not detect a function property returning only null as a component (#3412 @ljharb)no-unknown-property: allowabbron<th>and<td>(#3419 @OleksiiKachan)no-unknown-property: addviewBoxforpattern,symbol,view(#3424 @MNBuyskih)no-unknown-property: addalignon all the tags that support it (#3425 @ljharb)
Changed
- [meta] npmignore markdownlint config (#3413 @jorrit)
7.31.7 - 2022.09.05
Fixed
no-unknown-property: avoid warning onfbtnodes entirely (#3391 @ljharb)no-unknown-property: adddownloadproperty support foraandarea(#3394 @HJain13)no-unknown-property: allowwebkitAllowFullScreenandmozAllowFullScreen(#3396 @ljharb)no-unknown-property:controlsList, notcontrolList(#3397 @ljharb)no-unknown-property: add more capture event properties (#3402 @sjarva)no-unknown-property: Add more one word properties found in DefinitelyTyped's react/index.d.ts (#3402 @sjarva)no-unknown-property: Mark onLoad/onError as supported on iframes (#3398 @maiis, #3406 @akx)no-unknown-property: allowimageSrcSetandimageSizesattributes on<link>(#3407 @terrymun)no-unknown-property: addborder;focusableon<svg>(#3404 #3404 @ljharb)no-unknown-property: React lowercasesdata-attrs (#3395 @ljharb)no-unknown-property: addvalignon table components (#3389 @ljharb)
7.31.6 - 2022.09.04
Fixed
no-unknown-property:onErrorandonLoadboth work onimgandscript(#3388 @ljharb)no-unknown-property: data-* attributes can have numbers (#3390 @sjarva)no-unknown-property: add more audio/video attributes (#3390 @sjarva)no-unknown-property: move allowfullscreen to case ignored attributes (#3390 @sjarva)no-unknown-property: fill works on line, mask, and use elements (#3390 @sjarva)no-unknown-property: add onMouseMoveCapture as valid react-specific attribute (#3390 @sjarva)no-unknown-property: make onLoad and onError be accepted on more elements (#3390 @sjarva)
Changed
- [Docs]
no-unknown-property: add a mention about using ignores properties with libraries that add props (#3390 @sjarva)
7.31.5 - 2022.09.03
Fixed
no-unknown-property: add propertiesonToggle,fill,as, and pointer events (#3385 @sjarva)no-unknown-property: adddefaultCheckedproperty (#3385 @sjarva)no-unknown-property: add touch and media event related properties (#3385 @sjarva)no-unknown-property:childrenis always an acceptable prop; iframes havescrolling; video hasplaysInline(#3385 @ljharb)
7.31.4 - 2022.09.03
Fixed
no-unknown-property: supportcheckedon inputs (#3383 @ljharb)
7.31.3 - 2022.09.02
Fixed
no-unknown-property: add SVG and meta properties (#3381 @AhmadMayo)
7.31.2 - 2022.09.02
Fixed
jsx-key: avoid a crash with optional chaining (#3371 @ljharb)jsx-sort-props: avoid a crash with spread props (#3376 @ljharb)no-unknown-property: properly recognize valid data- and aria- attributes (#3377 @sjarva)no-unknown-property: properly recognize unknown HTML/DOM attributes (#3377 @sjarva)
Changed
- [Docs]
jsx-sort-props: replace ref string with ref variable (#3375 @Luccasoli) - [Refactor]
no-unknown-property: improve jsdoc; extract logic to separate functions (#3377 @sjarva) - [Refactor]
no-unknown-property: update DOM properties to include also one word properties (#3377 @sjarva)
7.31.1 - 2022.08.26
Fixed
jsx-key: fix detecting missing key inArray.from's mapping function (#3369 @sjarva)jsx-no-leaked-render: coerce strategy now allows a ternary (#3370 @sjarva)
7.31.0 - 2022.08.24
Added
jsx-newline: addallowMultilineoption when prevent option is true (#3311 @TildaDares)forbid-dom-props: adddisallowedForoption (#3338 @TildaDares)
Fixed
jsx-no-literals: properly error on children with noAttributeStrings: true (#3317 @TildaDares)jsx-key: catch key errors inside conditional statements (#3320 @TildaDares)display-name: Accept forwardRef and Memo nesting in newer React versions (#3321 @TildaDares)jsx-key: avoid a crash from optional chaining from #3320 (#3327 @ljharb)jsx-key: avoid a crash on a non-array node.body from #3320 (#3328 @ljharb)display-name: fix false positive for assignment of function returning null (#3331 @apbarrero)display-name: fix identifying_as a capital letter (#3335 @apbarrero)require-default-props: avoid a crash when function has no props param (#3350 @noahnu)display-name, component detection: fix HOF returning null as Components (#3347 @jxm-math)forbid-prop-types: Ignore objects that are not of type React.PropTypes (#3326 @TildaDares)display-name, component detection: fix false positive for HOF returning only nulls and literals (#3305 @golopot)jsx-no-target-blank: False negative when rel attribute is assigned using ConditionalExpression (#3332 @V2dha)jsx-no-leaked-render: autofix nested "&&" logical expressions (#3353 @hduprat)jsx-sort-props: sorted attributes now respect comments (#3358 @ROSSROSALES)
Changed
- [Refactor]
jsx-indent-props: improved readability of the checkNodesIndent function (#3315 @caroline223) - [Tests]
jsx-indent,jsx-one-expression-per-line: add passing test cases (#3314 @ROSSROSALES) - [Refactor]
boolean-prop-naming,jsx-indent: avoid assigning to arguments (#3316 @caroline223) - [Docs]
sort-comp: add class component examples (#3339 @maurer2) - [Docs]
jsx-no-useless-fragment: add more examples of correct code (#3349 @karlhorky) - [Docs]
jsx-boolean-value: add jsdoc types for helper functions (#3344 @caroline223) - [readme] remove dead codeclimate badge, add actions badge (@ljharb)
- [readme] Remove dead david-dm badge (#3262 @ddzz)
- [Refactor]
jsx-closing-bracket-location,jsx-no-bind: fix eslint issues (#3351 @caroline223) - [Tests]
function-component-definition: add passing test cases (#3355 @TildaDares) - [Docs]
jsx-no-target-blank: Fix link to link-type-noreferrer (#3319 @Luccasoli) - [Docs] document which rules provide suggestions (#3359, #3365 @bmish)
- [Docs] Consistent rule descriptions and doc sections (#3361 @bmish)
- [Docs] Standardize deprecated rule notice (#3364 @bmish)
- [Docs] Fix typos (#3366 @bmish)
- [Docs] Add markdownlint for documentation formatting consistency (#3367 @bmish)
- [Docs] Add config notice to rule docs (#3362 @bmish)
7.30.1 - 2022.06.23
Fixed
display-name: fix false positive for HOF returning only nulls (#3291 @golopot)jsx-no-leaked-render: avoid unnecessary negation operators and ternary branches deletion (#3299 @Belco90)display-name: fix false positive when using memo (#3304 @golopot)
Changed
- [Docs]
jsx-tag-spacing: rename option from #3264 ([#3294[] @ljharb) - [Docs]
jsx-key: split the examples (#3293 @ioggstream)
7.30.0 - 2022.05.18
Added
destructuring-assignment: add optiondestructureInSignature(#3235 @golopot)no-unknown-property: Allow crossOrigin on image tag (SVG) (#3251 @zpao)jsx-tag-spacing: Addmultiline-alwaysoption (#3260, #3264 @Nokel81)function-component-definition: replacevarbyconstin certain situations (#3248 @JohnBerd @SimeonC)- add
jsx-no-leaked-render(#3203 @Belco90) require-default-props: add optionfunctions(#3249 @nix6839)jsx-newline: AddallowMultilinesoption (#3311 @TildaDares)
Fixed
hook-use-state: Allow UPPERCASE setState setter prefixes (#3244 @duncanbeevers)propTypes: addVFCto react generic type param map (#3230 @dlech)no-unused-state: avoid a crash (#3258 @WillyLiaoWH @ljharb)jsx-no-useless-fragment: use proper apostrophe in error message (#3266 @develohpanda)propTypes: handle imported types/interface in forwardRef generic (#3280 @vedadeepta)button-has-type: fix exception for<button type>(#3255 @meowtec)no-unstable-nested-components: Improve error message and catch React.memo() (#3247 @zacharyliu)
Changed
- [readme] remove global usage and eslint version from readme (#3254 @aladdin-add)
- [Refactor] fix linter errors (#3261 @golopot)
- [Docs]
no-unused-prop-types: fix syntax errors (#3259 @mrdulin) - [Refactor] improve performance for detecting function components (#3265 @golopot)
- [Refactor] improve performance for detecting class components (#3267 @golopot)
- [Refactor]
no-deprecated: improve performance (#3271 @golopot) - [Refactor]
no-did-mount-set-state,no-did-update-set-state,no-will-update-set-state: improve performance (#3272 @golopot) - [Refactor] improve performance by avoiding unnecessary
Components.detect(#3273 @golopot) - [Refactor] add
isParenthesizedAST util (#3203 @Belco90) - [Docs]
default-props-match-prop-types,require-default-props,sort-prop-types: fix typos (#3279 @nix6839) - [Refactor] improve performance of rule merging (#3281 @golopot)
- [Refactor] improve performance of component detection (#3276 @golopot)
7.29.4 - 2022.03.13
Fixed
no-unused-state: avoid a crash on a class field gDSFP (#3236 @ljharb)boolean-prop-naming: handle React.FC, intersection, union types (#3241 @ljharb)
7.29.3 - 2022.03.03
Fixed
no-unused-state: avoid a crash on type-only gDSFP declarations (#3225 @ljharb)jsx-curly-brace-presence: the string "never" defaults topropElementValuesasignore(#3228 @ljharb)propTypes: addVFCto react generic list (#3230 @ljharb)
7.29.2 - 2022.02.25
Fixed
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-importedcloneElement/createElement(#3213 @ljharb)
7.29.1 - 2022.02.25
Fixed
jsx-key: prevent false "missing array key" warning (#3215 @ljharb)jsx-indent: avoid checking returns sans jsx (#3218 @ljharb)jsx-key: avoid a crash (#3220 @ljharb)- version settings: avoid a crash with an invalid version (#3219 @ljharb)
7.29.0 - 2022.02.24
Added
- add
hook-use-staterule to enforce symmetric useState hook variable names (#2921 @duncanbeevers) jsx-no-target-blank: Improve fixer with optionallowReferrer(#3167 @apepper)jsx-curly-brace-presence: add "propElementValues" config option (#3191 @ljharb)- add
iframe-missing-sandboxrule (#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: addwarnDuplicatesoption to warn on duplicate jsx keys in an array (#2614 @ljharb)jsx-sort-props: addlocaleoption (#3002 @ljharb)
Fixed
prop-types,propTypes: add support for exported type inference (#3163 @vedadeepta)no-invalid-html-attribute: allow 'shortcut icon' onlink(#3174 @Primajin)prefer-exact-propsimprove performance forIdentifiervisitor (#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: supportgetDerivedStateFromPropsas an arrow function (#2061 @ljharb)no-array-index-key: catch.toStringandString()usage (#2813 @RedTn)function-component-definition: do not break on dollar signs (#3207 @ljharb)prefer-stateless-function: avoid a crash insidedoctrine(#2596 @ljharb)prop-types: catch infinite loop (#2861 @ljharb)forbid-prop-types: properly report name in error message; check undestructured arguments (#2945 @ljharb)
Changed
- [readme] change [
jsx-runtime] link from branch to sha (#3160 @tatsushitoji) - [Docs] HTTP => HTTPS (#3133 @Schweinepriester)
- [readme] Some grammar fixes (#3186 @JJ)
- [Docs]
jsx-no-target-blank: Improve readme (#3169 @apepper) - [Docs]
display-name: improve examples (#3189 @golopot) - [Refactor]
no-invalid-html-attribute: sort HTML_ELEMENTS and messages (#3182 @Primajin) - [Docs]
forbid-foreign-prop-types: documentallowInPropTypesoption (#1815 @ljharb) - [Refactor]
jsx-sort-default-props: remove unnecessary code (#1817 @ljharb) - [Docs]
jsx-no-target-blank: fix syntax highlighting (#3199 @shamrin) - [Docs]
jsx-key: improve example (#3202 @chnakamura) - [Refactor]
jsx-key: use more AST selectors (@ljharb)
7.28.0 - 2021.12.22
Added
function-component-definition: support namedComponents option being an array (#3129 @petersendidit)
Fixed
jsx-indent-props: Resetline.isUsingOperatorcorrectly after ternary (#3146 @tobiaswaltl)
Changed
- [Refactor]
no-arrow-function-lifecycle,no-unused-class-component-methods: use report/messages convention (@ljharb) - [Tests] component detection: Add testing scaffolding (#3149 @duncanbeevers)
- [New] component detection: track React imports (#3149 @duncanbeevers)
- [New] component detection: add
util.isReactHookCall(#3156 @duncanbeevers)
7.27.1 - 2021.11.18
Fixed
no-invalid-html-attribute: allowlinkrelto haveapple-touch-icon,mask-icon(#3132 @ljharb)no-unused-class-component-methods: addgetChildContextlifecycle method (#3136 @yoyo837)prop-types: fix false positives on renames in object destructuring (#3142 @golopot)no-arrow-function-lifecycle: fix invalid autofix from a concise arrow method to a regular one (#3145 @ljharb)display-name: avoid false positives on non-creatClass object expressions (#3144 @ljharb)
Changed
- [readme] fix syntax typo (#3141 @moselhy)
7.27.0 - 2021.11.09
Added
- support eslint 8.x (#3059 @MichaelDeBoey @ljharb)
no-unused-class-component-methods: Handle unused class component methods (#2166 @jakeleventhal @pawelnvk)- add
no-arrow-function-lifecycle(#1980 @ngtan) - add support for
@typescript-eslint/parserv5 (@ljharb) no-invalid-html-attribute: add rule (#2863 @Nokel81)
Fixed
propTypes: addVoidFunctionComponentto react generic list (#3092 @vedadeepta)jsx-fragments,jsx-no-useless-fragment: avoid a crash on fragment syntax intypescript-eslintparser (@ljharb)jsx-props-no-multi-spaces: avoid a crash on long member chains in tag names intypescript-eslintparser (@ljharb)no-unused-prop-types,usedPropTypes: avoid crash with typescript-eslint parser (@ljharb)display-name: unwrap TSasexpressions (#3110 @ljharb)destructuring-assignment: detect refs nested in functions (#3102 @ljharb)- [
no-unstable-components]: improve handling of objects containing render function properties (#3111 @fizwidget) prop-types,propTypes: add forwardRef<>, ForwardRefRenderFunction<> prop-types (#3112 @vedadeepta)no-typos: prevent a crash when using private methods (@ljharb)destructuring-assignment, component detection: improve component detection (#3122 @vedadeepta)no-invalid-html-attribute: avoid crash on spread props (#3126 @ljharb)
Changed
- [Tests] test on the new babel eslint parser (#3113 @ljharb)
- [Docs]
jsx-no-target-blank: adjust options description (#3124 @gebsh)
7.26.1 - 2021.09.29
Fixed
no-namespace: fix crash on non-string React.createElement name (#3082 @ljharb)no-namespace: avoid crash on non-string createElement values (#3085 @ljharb)jsx-no-target-blank: improve error messages (#3088 @cutiful)
Changed
- [Docs]
jsx-max-props-per-line: fix options example (#3083 @MrRaiter)
7.26.0 - 2021.09.20
Added
- add
no-namespacerule (#2640 @yacinehmito @ljharb) jsx-max-props-per-line: addsingleandmultioptions (#3078 @SIL0RAK)
Fixed
display-name: Get rid of false position on component detection (#2759 @iiison)
Changed
no-access-state-in-setstate: passing test for “don't error if it's not a React Component” (#1873 @kentcdodds)
7.25.3 - 2021.09.19
Fixed
prop-types,propTypes: bail out unknown generic types inside func params (#3076 @vedadeepta)
Changed
- [readme] Update broken link for configuration files (#3071 @prateek3255)
- [Refactor] create/extract
isCreateElementandisDestructuredFromPragmaImportutils (@ljharb)
7.25.2 - 2021.09.16
Fixed
- [
jsx-no-useless-fragments]: Handle insignificant whitespace correctly whenallowExpressionsistrue(#3061 @benj-dobs) prop-types,propTypes: handle implicitchildrenprop in react's generic types (#3064 @vedadeepta)display-name: fix arrow function returning result of function call with JSX arguments being interpreted as component (#3065 @danielfinke)jsx-no-target-blank: avoid crash on attr-only href (#3066 @ljharb @gaz77a)jsx-uses-vars: ignore lowercase tag names (#3070 @alanorozco)
7.25.1 - 2021.08.29
Fixed
no-this-in-sfc, component detection: Improve stateless component detection (#3056 @Wesitos)
7.25.0 - 2021.08.27
Added
- [
jsx-no-useless-fragments]: add option to allow single expressions in fragments (#3006 @mattdarveniza) - add
prefer-exact-propsrule (#1547 @jomasti) jsx-no-target-blank: addformsoption (#1617 @jaaberg)jsx-pascal-case: addallowLeadingUnderscoreoption (#3039 @pangaeatech)no-children-prop: AddallowFunctionsoption (#1903 @alexzherdev)- [
jsx-runtime]: setparserOptions.jsxPragmafor@typescript-eslint/parser(bb64df65 @ljharb)
Fixed
- component detection: use
estraverseto improve component detection (#2992 @Wesitos) destructuring-assignment,no-multi-comp,no-unstable-nested-components, component detection: improve component detection (#3001 @vedadeepta)no-deprecated: fix crash on rest elements (#3016 @ljharb)destructuring-assignment: get the contextName correctly (#3025 @ohhoney1)no-typos: prevent crash on styled components and forwardRefs (#3036 @ljharb)destructuring-assignment, component detection: handle default exports edge case (#3038 @vedadeepta)no-typos: fix crash on private methods (#3043 @ljharb)jsx-no-bind: handle local function declarations (#3048 @p7g)prop-types,propTypes: handle React.* TypeScript types (#3049 @vedadeepta)prop-types,propTypes: add handling forFC<Props>, improve tests (#3051 @vedadeepta)prop-types,propTypes: prevent crash introduced in #3051 (#3053 @ljharb)
Changed
- [Docs]
jsx-no-bind: updates discussion of refs (#2998 @dimitropoulos) - [Refactor]
utils/Components: correct spelling and delete unused code (#3026 @ohhoney1) - [Docs]
jsx-uses-react,react-in-jsx-scope: documentreact/jsx-runtimeconfig (#3018 @pkuczynski @ljharb) - [Docs]
require-default-props: fix small typo (#2994 @evsasse) - [Tests] add weekly scheduled smoke tests (#2963 @AriPerkkio)
- [Docs] improve instructions for
jsx-runtimeconfig (#3052 @ljharb)
7.24.0 - 2021.05.27
Added
- component detection: add componentWrapperFunctions setting (#2713 @@jzabala @LandonSchropp)
no-unused-prop-types: add ignore option (#2972 @grit96)- version detection: support recursive processor virtual filename (#2965 @JounQin)
Fixed
jsx-handler-names: properly substitute value into message (#2975 @G-Rath)jsx-uses-vars: ignore namespaces (#2985 @remcohaszing)jsx-no-undef: ignore namespaces (#2986 @remcohaszing)jsx-child-element-spacing: Don't flag whitespace around<br/>tags (#2989 @pascalpp)
Changed
- [Docs]
jsx-newline: Fix minor spelling error on rule name (#2974 @DennisSkoko) - [Refactor]
void-dom-elements-no-children: improve performance - [readme] fix missing trailing commas (#2980 @sugardon)
- [readme] fix broken anchor link (#2982 @vzvu3k6k)
- [Docs]
jsx-child-element-spacing: fixes sentence which ends abruptly (#2990 @pascalpp)
7.23.2 - 2021.04.08
Fixed
jsx-max-depth: Prevent getting stuck in circular references (#2957 @AriPerkkio)jsx-no-target-blank: fix handling ofwarnOnSpreadAttributesbeing false (#2953 @Nokel81)forbid-dom-props: supportJSXNamespacedName(#2961 @mrtnzlml)forbid-component-props: supportJSXNamespacedName(@ljharb)
Changed
- Fix CHANGELOG.md (#2950 @JounQin)
7.23.1 - 2021.03.23
Fixed
- version detection: support processor virtual filename (#2949 @JounQin)
7.23.0 - 2021.03.22
Added
jsx-no-target-blank: add fixer (#2862 @Nokel81)jsx-pascal-case: support minimatchignoreoption (#2906 @bcherny)jsx-pascal-case: supportallowNamespaceoption (#2917 @kev-y-huang)jsx-newline: Add prevent option (#2935 @jsphstls)no-unstable-nested-components: Prevent creating unstable components inside components (#2750 @AriPerkkio)- added
jsx-runtimeconfig, for the modern JSX runtime transform (@ljharb)
Fixed
jsx-no-constructed-context-values: avoid a crash withas XTS code (#2894 @ljharb)jsx-no-constructed-context-values: avoid a crash with boolean shorthand (#2895 @ljharb)static-property-placement: do not report non-components (#2893 @golopot)no-array-index-key: support optional chaining (#2897 @SyMind)no-typos: avoid a crash on bindinglessprop-typesimport; add warning (#2899 @ljharb)jsx-curly-brace-presence: ignore containers with comments (#2900 @golopot)destructuring-assignment: fix a false positive for local prop namedcontextin SFC (#2929 @SyMind)jsx-no-target-blank: Allow rel="noreferrer" whenallowReferreris true (#2925 @edemaine)boolean-prop-naming: add check for typescript "boolean" type (#2930 @vedadeepta)- version detection: Add tests that verify versioning works for sibling and child projects (#2943 @jcrosetto)
jsx-curly-newline: Update error messages (#2933 @jbrower2)
Changed
- [Docs]
jsx-no-constructed-context-values: fix invalid example syntax (#2910 @kud) - [readme] Replace lists of rules with tables in readme (#2908 @motato1)
- [Docs] added missing curly braces (#2923 @Muditxofficial)
7.22.0 - 2020.12.29
Added
jsx-key: addedcheckKeyMustBeforeSpreadoption for new jsx transform (#2835 @morlay)jsx-newline: add new rule (#2693 @jzabala)jsx-no-constructed-context-values: add new rule which checks when the value passed to a Context Provider will cause needless rerenders (#2763 @dylanOshima)jsx-indent-props: addignoreTernaryOperatoroption (#2846 @SebastianZimmer)jsx-no-target-blank: AddwarnOnSpreadAttributesoption (#2855 @michael-yx-wu)
Fixed
display-name/component detection: avoid a crash on anonymous components (#2840 @ljharb)prop-types: function in class that returns a component causes false warning in typescript (#2843 @SyMind)jsx-no-target-blank: avoid a crash with a non-string literal (#2851 @ljharb)jsx-no-script-url: avoid crash with booleanhref(#2871 @ljharb, @AriPerkkio)no-typos: avoid crash with computed method name (#2870 @ljharb, @AriPerkkio)jsx-max-depth: avoid crash with childless jsx child (#2869 @ljharb, @AriPerkkio)jsx-wrap-multilines: fix crash withdeclarations that are on a new line after=(#2875 @ljharb)no-unknown-property: avoid crash with prop named with Object.prototype key (#2879 @ljharb, @AriPerkkio)prop-types: default argument does not count as props-types declaration (#2877 @golopot)jsx-props-no-multi-spaces: fix a false positive for beside comments (#2878 @golopot)jsx-no-undef: handle the TS parser combined with an invalid ecmaVersion (#2882 @ljharb)no-unused-prop-types: applyskipShapePropsto exact types (#2883 @golopot)no-danger-with-children/style-prop-object/no-adjacent-inline-elements: add category, URL (#2891 @thofmann)
Docs
no-unused-prop-types: Add new example to rule (#2852 @thehereward)prop-types: fix example (#2881 @technote-space)
7.21.5 - 2020.10.19
Fixed
jsx-indent-props: Apply indentation when using brackets (#2826 @Moong0122)jsx-handler-names: Skip inline handlers when checkInlineFunction=false (#2833 @onigoetz)
Changed
- [Tests]
jsx-indent-props: Add passing test (#2823 @Hypnosphi)
7.21.4 - 2020.10.09
Fixed
no-unused-prop-types: Silence false positive onnevertype in TS (#2815 @pcorpet)jsx-indent-props: Apply indentation when operator is used in front of the upper line (#2808, #2820 @Moong0122)- [Deps] update
jsx-ast-utils(#2822 jsx-eslint/jsx-ast-utils#102 @ljharb)
7.21.3 - 2020.10.02
Fixed
prop-types: fix Cannot read property 'type' of undefined error when destructured param (#2807 @minwe)no-typos: avoid crash on spread syntax in createReactClass object (#2816 @ljharb @Songyu-Wang)
7.21.2 - 2020.09.24
Fixed
prop-types: handle RestElement in destructured param (#2805 @hank121314)
7.21.1 - 2020.09.23
Fixed
jsx-handler-names: avoid a crash when an inline prop is not a MemberExpression (#2803 @willheslam)
7.21.0 - 2020.09.22
Added
button-has-type: support trivial ternary expressions (#2748 @Hypnosphi)jsx-handler-names: addcheckInlineFunctionoption (#2761 @dididy)jsx-no-literals: addnoAttributeStringsoption (#2782 @TaLeaMonet)prop-types: add support forPropTypes.exact(#2740 @jzabala)jsx-filename-extension: Add allow option (#2746 @remcohaszing)
Fixed
function-component-definition: ignore object properties (#2771 @stefan-wullems)forbid-component-props: Implemented support for "namespaced" components (#2767 @mnn)prefer-read-only-props: support Flow$ReadOnly(#2772, #2779, #2770 @karolina-benitez)jsx-handler-names: handle whitespace (#2789 @AriPerkkio)prop-types: Detect TypeScript types for destructured default prop values (#2780 @sunghyunjo)jsx-pascal-case: Handle single character namespaced component (#2791 @daviferreira)jsx-closing-bracket-location: Intag-aligned, made a distinction between tabs and spaces (#2796 @Moong0122)jsx-handler-names: false positive when handler name begins with number (#1689 @jsphstls)prop-types: Detect JSX returned by sequential expression (#2801 @mikol)jsx-props-no-multi-spaces: "Expected no line gap between" false positive (#2792 @karolina-benitez)no-unknown-property: check attributes with any input case (#2790 @julienw)prop-types/no-unused-prop-types: handle CallExpression in ReturnType (#2802 @hank121314)jsx-uses-react: mark fragment variables as used (#2775 @remcohaszing)no-unused-prop-types: improve component declared props detection ([#2755][] @jzabala)jsx-props-no-multi-spaces: Show error in multi-line props (#2756 @iiison)
Changed
- [Tests]
jsx-one-expression-per-line: add passing tests (#2799 @TaLeaMonet) - [Tests]
prop-types: add test (#2757 @jzabala)
7.20.6 - 2020.08.12
Fixed
jsx-curly-brace-presence: fix multiline comment case (#2716 @ljharb)jsx-no-useless-fragment: accept fragments with call expressions (#2744 @hasparus)jsx-no-literalswith allowStrings doesn't work in props (#2736 @karolina-benitez)no-find-dom-node: Improve error message (#2741 @ecraig12345)no-typos/no-unused-prop-types/propType detection: Support typescript props interface extension and TSTypeAliasDeclaration (#2721 @hank121314)no-this-in-sfc/component detection: add arrow function to list of allowed position for component (#2708 @jzabala)no-access-state-in-setstate: add check for class component (#2711 @jzabala)prop-types/component detection: avoid a crash when a localcreateElementidentifier exists (#2733 @ljharb)
Changed
no-unused-prop-types: add test assigning this.props to a variable
7.20.5 - 2020.07.28
Fixed
jsx-curly-brace-presence: disable disallowed JSX text chars check in props (#2710 @jzabala)no-unused-state: check for class expression (#2712 @jzabala)prop-types: handle anonymous functions (#2730, #2731 @odinho @wKich @jzabala)
Docs
- [Docs]
no-access-state-in-setstate: fix example (#2724 @youngjuning)
7.20.4 - 2020.07.26
Fixed
- improve algorithm to check if a variable is coming from the pragma ([#2706][] @jzabala)
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 bindinglessreactimport
Changed
- [Tests]
boolean-prop-naming: Added test for function invocation of bool (#2697 @ajkovar) - [Tests]
jsx-curly-brace-presence,jsx-no-comment-textnodes: add passing tests - [Refactor]
no-unused-state: avoid a loop
7.20.3 - 2020-06-30
Fixed
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)
7.20.2 - 2020-06-29
Fixed
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)
7.20.1 - 2020-06-28
Fixed
forbid-dom-props,function-component-definition: fix schema typos (#2667 @mflorence99)no-unused-prop-types: fix with typescript eslint parser (#2661 @eltonio450)
Changed
forbid-prop-types: warn on destructured values as well (#2676 @ajkovar)- relax JSX pragma regexp (#2643 @gfmio)
- Cache detected React version (#2673 @lencioni)
- [refactor]
jsx-pascal-case: Remove xregexp (#2636 @yacinehmito)) - [Tests] a
no-typostest fails in eslint v7.3 ([#2678][] @toshi-toma) - [Deps] update
jsx-ast-utils,object.entries,resolve - [Dev Deps] update
@types/eslint,@types/estree,@types/node,@typescript-eslint/parser,eslint-config-airbnb-base,eslint-plugin-eslint-plugin,eslint-plugin-import,typescript
7.20.0 - 2020-05-12
Added
- support eslint v7 (#2635 @ljharb, @toshi-toma)
forbid-component-props/forbid-dom-props: Allow a custom message with forbid props (#2615 @mtamhankar1)jsx-no-literals: addignorePropsoption to ignore props validation (#2146 @iiison)
Fixed
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,usedPropTypesutil: avoid node.start and node.end (25b1936 @toshi-toma)jsx-no-target-blank: allowno-referrerwithoutnoopenerby 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)
Docs
- Clean up examples in rule docs (#2546 @silvenon)
- [readme] Add Rules of Hooks to Other useful plugins section (#2633 @petetnt)
no-this-in-sfc: backtickthis(#2616 @mrflip)function-component-definition: Fix unnamedComponents option examples (#2608 @vkrol))
Changed
- [Deps] Move "semver" to devDependencies (#2595 @rajivshah3)
- [eslint] remove
operator-linebreakoverride (#2578 @golopot) - [Tests]
button-has-type: ensure no mistakenly allowed identifiers namedbutton/submit/reset(#2625 @golopot) - [Tests]
displayName: add a test case (#2593 @golopot) - [Dev Deps] update
@types/eslint,@types/estree,@types/node,@typescript-eslint/parser,coveralls,eslint-config-airbnb-base,eslint-plugin-import,typescript
7.19.0 - 2020-03-06
Added
style-prop-object: Addallowoption (#1819 @hornta)jsx-pascal-case: Support unicode characters (#2557 @Svish)
Fixed
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: makemarkPropTypesAsUsedwork withTSEmptyBodyFunctionExpressionAST node (#2560 @guillaumewuip)- [
displayName][] (but really,propTypesdetection): do not crash on empty flow type spreads (#2570 @ljharb)
Changed
- [readme] Small visual inconsistency (#2568 @arvigeus)
- [docs] add
react/prefix to rule name, for consistency no-unescaped-entities: skip test cases that are now parsing errors in acorn-jsx@5.2.0 (#2583 @golopot)
7.18.3 - 2020-02-02
Fixed
jsx-indent: don't check literals not within JSX (#2564 @toshi-toma)
7.18.2 - 2020-02-01
Fixed
jsx-indent: avoid a crash on non-string literals (#2561 @ljharb)
7.18.1 - 2020-02-01
Fixed
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;uandsare (@ljharb)
Changed
- [Docs] use
markdown-magicto automatically sort all rules alphabetically (#1742 @ybiquitous) - [Docs]
jsx-props-no-spreading: fix typo to use correct rule (#2547 @jonggyun))
7.18.0 - 2020-01-15
Added
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 ofjavascript:URLs (#2419 @sergei-startsev)
Fixed
jsx-pascal-case: false negative with namespacing (#1337 @mfyuce)jsx-curly-brace-presence: Fixcurly-brace-presenceedge 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)
Changed
- [Docs]
no-render-return-value: Fix title (#2540 @micnic) - [Refactor]: remove unused codes in util/propTypes (#2288 @golopot)
no-typos: check static lifecycle methods (#2006 @bsonntag)- [Docs]
jsx-first-prop-new-line: Fix rule name in "Rule Options" section (#2535 @barreira) - [Tests]
no-unused-prop-types: Added test cases (#977 @dozoisch) - [Tests] avoid running tests on pretest job
- [meta] Move eslint-plugin-eslint-plugin to devDeps (#2510 @nstepien)
- [Deps] update
array-includes,object.entries,object.fromentries,object.values,resolve
7.17.0 - 2019-11-28
Added
jsx-no-target-blank: addallowReferreroption (#2478 @eps1lon)jsx-handler-names: addcheckLocalVariablesoption (#2470 @aub)prop-types: Support Flow Type spread (#2446 @moroine)jsx-props-no-spreading: addexplicitSpreadoption to allow explicit spread of props (#2449 @pawelnvk)jsx-no-target-blank: warn ontarget={'_blank'}expressions (#2451 @timkraut)function-component-definition: Enforce a specific function type for function components (#2414 @Stefanwullems)
Fixed
sort-prop-types,jsx-sort-default-props: disable broken autofix (#2505 @webOS101)no-typos: improve report location (#2468 @golopot)jsx-no-literals: trim whitespace forallowedStringscheck (#2436 @cainlevy)jsx-curly-brace-presence: Fix filter of undefined error with whitespace inside jsx attr curlies (#2460 @dustinyoste)no-render-return-value: should warn when used in assignment expression ([#2462][] @jichu4n)jsx-curly-brace-presence: allow trailing spaces in literal (#2448 @doochik)
Changed
- [Deps] update
jsx-ast-utils,object.fromentries,resolve - [eslint] fix func-names and change object-shorthand to 'always' (#2483 @golopot)
- [Docs]
jsx-first-prop-new-line: Fix documentation formatting (#2489 @pjg) - [Docs]
prop-types: Update 'skipUndeclared' in rule options (#2504 @cjnickel) - [Docs]
jsx-first-prop-new-line: fix wrong rule name (#2500 @zgayjjf) - [eslint] enable eslint-plugin-eslint-plugin (#2469 @golopot)
- [Docs]
jsx-props-no-multi-spaces: suggest using core rule instead (#2463 @golopot) - [Docs]
jsx-first-prop-new-line: add rule options (#2465 @SerdarMustafa1) - [Docs]
jsx-no-target-blank: Add section about overriding for trusted links (#2438 @aschriner) - [Docs] fix typo (#2453 @cainwatson)
- [Docs]
no-unused-prop-types: clean up prose (#2273 @coryhouse) - [Docs]
jsx-no-bind: add section about React Hooks (#2443 @kdex)
7.16.0 - 2019-10-04
Added
jsx-sort-default-props: make rule fixable (#2429 @emroussel)
Fixed
jsx-no-useless-fragment: usearray-includesover.includesfor back compat (@ljharb)jsx-curly-brace-presence: allow necessary white-space literal (#2437 @uniqname)jsx-curly-brace-presence: warns incorrectly on trailing whitespace (#2431 @BC-M)no-unused-prop-types: false positive when nested destructuring (#2428 @golopot)
7.15.1 - 2019-10-01
Fixed
jsx-curly-brace-presence: bail out checks when JSXElements are passed as props (#2426 @vedadeepta)
Changed
- [Docs]
prefer-es6-class: Fix typos (#2425 @spencerbyw)
7.15.0 - 2019-09-30
Added
- add
jsx-no-useless-fragmentrule (#2261 @golopot) - [
jsx-handler-name][]: allowfalseto disableeventHandlerPrefix/eventHandlerPropPrefix(#2410 @tanmoyopenroot) sort-comp: addstatic-variablesgrouping (#2408 @vedadeepta)jsx-no-literals: AddallowedStringsoption (#2380 @benhollander)no-multi-comp: Added handling forforwardRefandmemowrapping components declared in the same file (#2184 @jenil94)jsx-pascal-case:allowAllCapsoption now allowsSCREAMING_SNAKE_CASE(#2364 @TylerR909)
Fixed
jsx-indent: Fix false positive when a jsx element is the last statement within a do expression (with tests) (#2200 @Kenneth-KT)jsx-curly-brace-presence: fix jsx tags in braces (#2422 @tanmoyopenroot)display-name: Fix false positives (#2399 @BPScott)jsx-curly-brace-presence: report unnecessary curly braces with children on next line (#2409 @vedadeepta)no-unused-prop-types: false positive with callback (#2375 @golopot)- Fix prop-types detection collision on renamed props (#2383 @yannickcr)
jsx-sort-props: use localeCompare rather than comparison operator (#2391 @tanmoyopenroot)jsx-pascal-case: allow one-letter-named components (#2395 @Haegin)jsx-wrap-multilines: fix incorrect formatting (#2392 @tanmoyopenroot)require-optimization: fix when using arrow function in class components (#2385 @jenil94)no-deprecated: Deprecate cWM/cWRP/cWU lifecycle methods since React 16.9.0 (#2378 @meowtec)jsx-key: improve docs and confusing error message (#2367 @kaykayehnn)- Recognize props wrapped in flow $ReadOnly<> utility type (#2361 @lukeapage)
prop-types: false positive with setState updator (#2359 @golopot)
Changed
- [Docs]
no-access-state-in-setstate: update grammar ([#2418][] @neaumusic) jsx-curly-brace-presence,jsx-one-expression-per-line,no-danger-with-children: addisWhiteSpacestolib/util/jsx(#2409 @vedadeepta)
7.14.3 - 2019-07-23
Fixed
- Fix
prop-typesto ignore validation when Flow indexers are used (#2330 @yannickcr) - Fix error being thrown after the first warning when react version cannot be detected (#2336 @abhishekdev)
- Fix component detection when
memoandforwardRefare used together (#2349 @yannickcr)
Changed
- Documentation improvements (@ljharb, #2354 @golopot)
7.14.2 - 2019-06-24
Fixed
- Fix
prop-typescrash on for...of destructuring (#2326 @yannickcr)
7.14.1 - 2019-06-24
Fixed
- Fix
prop-typescrash on multiple destructuring (#2319 @golopot)
7.14.0 - 2019-06-23
Added
- Add
jsx-curly-newlinerule (#1493 @golopot) - Add support for nested destructuring to
prop-types(#296 #1422 @golopot) - Add support for variables defined as props to
prop-typesandno-unused-prop-types(#442 #833 #1002 #1116 #1257 #1764 @golopot) - Add
checkFragmentShorthandoption tojsx-key(#2316 @kaykayehnn)
Fixed
- Fix
no-did-mount-set-stateandno-did-update-set-stateto handle cDU and cDM defined as class properties (#1595 @jaaberg) - Fix
sort-prop-typescash when a shape PropType is defined in a variable (#1749 @alexzherdev) - Fix
no-unused-statefalse positive when using state of non-lifecycle method (#2274 @golopot) - Fix
static-property-placementfalse positive when accessing static property inside method (#2283 @dmason30) - Fix [
prop-type][] detection for annotated props with default value (#2298 @yannickcr)
Changed
- Add ESLint 6.0.0 as valid peerDependency (@yannickcr)
- Improve
no-render-return-valueperformance (#2259 @golopot) - Change
jsx-sort-propsto report errors only on the identifier (#2312 @MrHen) - Change to warn only once if react version cannot be detected (#2276 @ljharb)
- Documentation improvements (#2263 @dimitropoulos, #2262 @ybiquitous, #2295 @battaglr, #2302 @Jason-Cooke, #2303 @golopot)
- Code refactoring (#2265 #2267 #2286 #2294 @golopot, @ljharb)
- Tests improvements (#2304 #1047 @golopot, @yannickcr)
7.13.0 - 2019-05-03
Added
- Make
jsx-sort-propsfully fixable (#2250, @guliashvili) boolean-prop-naming: addvalidateNestedoption to validate shape prop names (#2234, @pawelnvk)- add
static-property-placementrule (#2193, @dmason30) - add "detect" for flow version (#2233, @jedwards1211)
jsx-indent: AddindentLogicalExpressionsoption (#2227, @mdnsk)- add
jsx-props-no-spreading(#2191, @ashbhir) no-string-refs: AddednoTemplateLiteraloption (#2167, @jenil94)- add
linkComponentssetting (#2116, @gbakernet) jsx-no-target-blank: add support forlinkComponentssetting (#2116, @gbakernet)- Add
state-in-constructorrule (#1945, @lukyth) - Add
prefer-read-only-propsrule (#2110, @golopot) no-unescaped-entities: more friendly error message; add config to adjust (#2016, @stevemao)
Fixed
jsx-props-no-multi-spaces: support generic components (ts) (#2256, @mateuszsokola)prop-types: fix case with destructuring and default param (#2246, @golopot)prefer-stateless-function: Ignoring pure components without props and context usage (#2238, @pawelnvk)propTypes: resolveSuperParameterPropsType: add null check (#2232, @jedwards1211)self-closing-comp: stop reporting single-line spaces (#2210, @golopot)require-render-return: more accurate report location (#2229, @golopot)sort-prop-types: Fix sorting props with numeric keys (#2230, @pawelnvk)display-name: fix false negative around nested functions (#2225, @dwelle)no-unknown-property: fix case like<Foo.bar>(#2207, @golopot)jsx-curly-brace-presence: accept multiline template string (#2203, @golopot)jsx-one-expression-per-line: fix when using tabs (#2198, @Ohar)prop-types: Fix false positive on computed member expression (#2202, @golopot)jsx-sort-default-props: fix case with spread (#2182, @VincentLanglet)no-this-in-sfc: Fix false positive on SFC defined as object property (#2147, @yannickcr)sort-comp: correctly recognize instance variables declared without explicit value (#2183, @yannickcr)no-unused-state: fix set state callback destructing & state use inside callback ([#2151][], @barakyosi)no-multi-comp: correctly ignore wrapped stateless components: (#2145, @yannickcr)display-name: avoid crash on for..of (#2137, @ljharb)
Changed
- [Docs]
no-access-state-in-setstate: Use syntax highlighting for examples ([#2160][], @pReya) - [Docs]
jsx-fragments: add "fixable" note (#2143, @joshunger) - [Docs] Added shared settings info, React version default note (#2180, @samsch)
- [Tests]
jsx-curly-spacing: add regression test case (#2206, @ColCh)
7.12.4 - 2019-01-16
Fixed
no-unused-prop-types: avoid a crash (#2131, @ljharb)prop-types: avoid further crashes from nonexistent nodes in unusedPropTypes (#2127, @ljharb)prop-types: Read name of callee object (#2125, @CrOrc)prop-types: Ignore reassignments when matching props declarations with components (#2051, #1957, @yannickcr)prop-types,no-unused-prop-types,require-default-props: Detect components with return statement in switch/case (#2118, @yannickcr)
Changed
7.12.3 - 2019-01-04
Fixed
jsx-indent: Prevent crash on valueless props (#2120, @jomasti)jsx-fragments: avoid crashing on self-closing fragments (#2113, @alexzherdev)no-unused-prop-types: Fix propType detection inside class bodies (#2115, @drx)no-unused-prop-types: fix issue with propTypes misclassifying props (#2111, @drx)display-name: fix false positive forReact.memo(#2109, @jomasti)
Changed
- [Docs] add a missing comma in the JSON settings (#2117, @haideralsh)
- [Docs] update README to document React version detection (#2114, @mohsinulhaq)
7.12.2 - 2019-01-02
Fixed
prop-types: avoid crash on used prevProps (#2095, @ljharb)- Version warning: Link does not end with '.' (#2103, @yoyo837))
forbid-prop-types: fix crash with propWrapper check on MemberExpressions (#2104, @ljharb)
7.12.1 - 2019-01-01
Fixed
no-unused-state: Fix crash with class fields (#2098, @jomasti)prop-types: Fix false positives inside lifecycle methods (#2099, @jomasti)jsx-max-depth: avoid a crash (#2102, @ljharb)jsx-wrap-multilines: avoid crash when no trailing newline (#2100, @ljharb)
Changed
- Fix CHANGELOG.md (#2097, @alexzherdev)
7.12.0 - 2018-12-27
Added
no-typos: Support createClass (#1828, @alexzherdev)- Support detecting React.forwardRef/React.memo (#2089, @jomasti)
jsx-indent: addcheckAttributesoption for JSX attribute indentation (#2086, @jomasti)- Change allowed
propWrapperFunctionssetting values (#2065, @jomasti) - add
jsx-fragmentsrule to enforce fragment syntax (#1994, @alexzherdev) - Support "detect" option for React version setting (#1978, @alexzherdev)
- Support shorthand fragment syntax in many rules (#1956, @alexzherdev)
jsx-no-literals: print node value in warning message (#2008, @jlgonzalezdev)
Fixed
jsx-max-depth: Fix depth of JSX siblings in a JSXEpressionContainer (#1824, @alexzherdev)no-array-index-key: fix in React.Children methods (#2085, @himynameisdave)no-unused-state: handle functional setState (#2084, @jomasti)- version errors should log to stderr, not stdout (#2082, @ljharb)
no-deprecated: Disable legacy lifecycle methods linting for now (#2069, @sergei-startsev)- ensure that react and flow versions can be numbers (#2056, @ljharb)
forbid-foreign-prop-types: ensureallowInPropTypesoption applies to class fields (#2040, @Sheile)jsx-wrap-multilines: catch single missing newlines (#1984, @MrHen)jsx-first-prop-new-line: Fix for parsers (like TypeScript) (#2026, @HauptmannEck)sort-comp: Fix fixer in case of more than 10 props (#2012, @tihonove)no-unused-stateDon't depend on state parameter name (#1829, @alexzherdev)no-this-in-sfcfix for class properties (#1995, @sergei-startsev)no-this-in-sfcfix rule behavior for arrow functions inside a class field (#1989, @sergei-startsev)destructuring-assignment: handle nested props usage (#1983, @alexzherdev)sort-prop-types: fix string property order (#1977, @metreniuk)jsx-no-target-blank: don’t crash when there’s no value (#1949, @ljharb)prop-types,no-unused-prop-types: better handle object spread (#1939, @alexzherdev)
Changed
jsx-fragments: improve message text (#2032, @alexzherdev)no-unsafe: handle all unsafe life-cycle methods (#2075, @sergei-startsev)require-default-props: Change error message naming from singular defaultProp to plural defaultProps (#2064, @jseminck)- [Refactor] Extract used
propTypesdetection (#1946, @alexzherdev) - [Refactor] Extract
defaultPropsdetection (#1942, @alexzherdev) - [Refactor] Extract required
propTypesdetection (#2001, @alexzherdev) - [Docs]
no-did-mount-set-state,no-did-update-set-state,no-will-update-set-state: fix docs URLs (#2090, @JBallin) - [Docs] Remove statement on GC in jsx-no-bind (#2067, @rickhanlonii)
- [Docs]
jsx-sort-props: Fix small mistake (#2044, @dimitarnestorov) - [Docs]
no-unescaped-entities: add more escape examples (#2015, @stevemao) - [Docs]
display-name: mention defaultignoreTranspilerNamevalue (#2002, @OliverJAsh) - [Docs]
jsx-no-target-blank: Add full example (#1988, @atomcorp) - [Docs] Update
jsx-no-target-blank.md (#1953, @brunocoelho) - [Changelog] fix "Ignore class properties" contributor (#1941, @alexzherdev)
- [Tests] Remove redundant
require('babel-eslint')from tests (#2004, @sergei-startsev) - [Tests]
prop-types: Add tests for prop-types destructuring (#2029, @sstern6) - [Tests]
display-name: add false positive component detection for destructured createElement (#1098, @arian)
7.11.1 - 2018-08-14
Fixed
- stop crashing when assigning to propTypes (#1932, @alexzherdev)
Changed
7.11.0 - 2018-08-13
Added
jsx-one-expression-per-line: add "allow" option (#1924, @alexzherdev)sort-prop-types: add autofix (#1891, @finnp)jsx-no-bind: Add ignoreDOMComponents option (#1868, @alexzherdev)- Output a warning if React version is missing in settings (#1857, @alexzherdev)
Fixed
destructuring-assignment: Ignore class properties (#1909, @alexandernanberg)destructuring-assignment, component detection: ignore components with confidence = 0 (#1907, @alexzherdev)boolean-prop-naming: Handle inline Flow type (#1905, @alexzherdev)jsx-props-no-multi-spaces: Handle member expressions (#1890, @alexzherdev)sort-comp: Allow methods to belong to any matching group (#1858, @nosilleg)jsx-sort-props: FixreservedFirst(#1883, @fleischie)prop-types: (flow) Stop crashing on undefined or null properties (#1860, @nicholas-l)no-unknown-property: Make attribute "charset" valid (#1863, @silvenon)no-deprecated: report identifier AST node instead of the class node (#1854, @jsnajdr)button-has-type: Account for pragma (#1851, @alexzherdev)button-has-type: improve error message when an identifier is used as the value (#1874, @ljharb)- support JSXText nodes alongside Literal nodes (@ljharb)
Changed
- Extract propTypes detection code (#1911, @alexzherdev)
- Fix broken links in changelog (#1849, @alexzherdev)
no-unused-state: combine spread visitors (@ljharb)jsx-one-expression-per-line: Fix JSX Syntax in docs (#1867, @peter-mouland)jsx-max-depth,jsx-sort-default-props: add missing docs urls (#1880, @flyerhzm)jsx-indent: add test cases (#1892, @alexzherdev)prop-types: add test cases (#1898, @alexzherdev)- Add a helper function for determining function-like expressions (#1914, @alexzherdev)
jsx-props-no-multi-spaces: update docs (#1918, @BenRichter)
7.10.0 - 2018-06-24
Added
- Allow eslint ^5 (#1843 @papandreou, @ljharb)
no-unsaferule (#1831, #1830 @sergei-startsev)no-will-update-set-state: Account forUNSAFE_methods (#1845, #1844 @alexzherdev)
Fixed
no-typos: Fix static propTypes handling (#1827, #1677 @alexzherdev)destructuring-assignment: Allow LHS (#1825, #1728 @alexzherdev)no-unused-prop-types: Fix crash when encountering mixed union and intersection flow types (#1806 @yannickcr)
Changed
- Typo fixes in
jsx-no-target-blank(#1805 @ferhatelmas))
7.9.1 - 2018-06-03
- Nothing was fixed; this is a republish with some updated deps. (#1804 @ljharb)
7.9.0 - 2018-06-03
Added
- Add
jsx-props-no-multi-spacesrule (#1755 @ThiefMaster) - Add
firstoption tojsx-indent-props(#398 @ThiefMaster) - Add
enforceDynamicLinksoption tojsx-no-target-blank(#1737 @kenearley)
Fixed
- Fix static lifecycle methods validation in
sort-comp(#1793 @lynxtaa) - Fix crash in
no-typoswhen encountering anonymous react imports (#1796 @jsg2021) - Fix ESLint 3 support (#1779)
Changed
- Documentation improvements (#1794 @lencioni)
- Update Travis CI configuration to test on multiple ESLint verions
7.8.2 - 2018-05-13
Fixed
- Fix crash in
boolean-prop-namingwhen encountering a required shape prop type (#1791 @pcorpet)
7.8.1 - 2018-05-12
Fixed
- Fix crash in
no-deprecatedwhen encountering a class constructor (#1785 @taddei)
7.8.0 - 2018-05-11
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)
7.7.0 - 2018-02-19
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)
7.6.1 - 2018-01-28
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)
7.6.0 - 2018-01-25
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)
7.5.1 - 2017-11-19
Fixed
- Fix
jsx-no-bindcrash (#1543 @jomasti) - Fix
no-unused-prop-typescrash (#1542 @jomasti)
Changed
- Documentation improvements (#1546 @jseminck)
7.5.0 - 2017-11-18
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-unused-prop-typesto 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
- Documentation improvements (#1438 @jseminck, #1464 @AlaaAttya, #1494 @piperchester, #1467 @felicio, #1512 @adam-golab)
- Code refactoring (#1423 #1398 @jseminck, #1500 #1514 @Aladdin-ADD, #1502 @SimenB, #1508 #1526 @jomasti, @ljharb)
- Update dependencies (#1450 @leebyron, @ljharb)
7.4.0 - 2017-09-24
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
7.3.0 - 2017-08-21
Added
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)
Changed
- Documentation improvements (#1383 @mjomble)
7.2.1 - 2017-08-14
Fixed
- Fix
forbid-prop-typescrash on identifiers (#1352 @ljharb) - Fix
boolean-prop-namingcrash with propTypes wrapper (#1354 @dustinsoftware) - Fix
prop-typesfalse positive with local variableprops(#1288 @DianaSuvorova) - Fix wrapped propTypes detection (#1366)
Changed
- Documentation improvements (#1123 @penx)
7.2.0 - 2017-08-09
Added
- Add
no-unused-staterule (#1103 @wbinnssmith) - Add
boolean-prop-namingrule (#1264 @EvHaus) - Add
no-typosrule (#1189 @jseminck, #1294 @haridusenadeera) - Add auto fix for
jsx-sort-props(#1273 @Overload119) - Add
gettersandsettersgroups tosort-comp(#100 @RDGthree) - Add
noStringsoption tojsx-no-literals(#1202 @deecewan) - Add inverse option for
always/nevertojsx-boolean-value(#1249 @ljharb)
Fixed
- Fix
no-direct-mutation-stateto disallowthis.statemutation in constructor (#832 @burabure) - Fix
jsx-no-target-blankcrash on emptyrelattribute (#1269 @dustinsoftware) - Fix
sort-compcomponent detection withClassExpression(#1076 @webOS101) - Fix
no-unused-prop-typesdetection with async class properties and methods (#1053 @benstepp) - Fix
void-dom-elements-no-childrencrash (#1226 @kokobeware) - Fix
no-danger-with-childrento ignore line breaks (#1262) - Fix
no-danger-with-childrencrash with undefined (#1287) - Fix
jsx-no-target-blankcrash (#1296 @jseminck) - Fix
no-unused-prop-typesto no longer ignore components with no used props (#1303 @DianaSuvorova) - Fix
jsx-no-duplicate-propscrash (#969 @marcelmokos) - Fix
jsx-no-literalsfalse positives (#1301 @davidyorr) - Fix
no-find-dom-nodedetection with named imports (#785 @Hypnosphi) - Fix proTypes-related rules detection with wrapped propTypes (#1266 @dustinsoftware)
- Fix
no-unused-prop-typesdetection with propTypes wrapped in a function (#1253 @dustinsoftware) - Fix
no-unused-prop-typesdetection with destructured use of properties (#816 @DianaSuvorova) - Fix
no-unused-prop-typesdetection with inline functions (#1309 @DianaSuvorova) - Fix
no-unused-prop-typesskipShapePropsoption with Flow annotations (#1335 @DianaSuvorova) - Fix
jsx-curly-spacingschema incompatibility with ESLint 4.2.0 (#1290 @jseminck)
Changed
- Documentation improvements (#1261 @mminer, #1005 @yooungt13, #1289 @konekoya, #1308 @xcatliu, #1306 @egberts, #1329 #1344 @DianaSuvorova)
- ES6-ify codebase (#1274 #1277 #1281 @dfilipidisz)
- Code refactoring (@ljharb)
- Update Travis CI and AppVeyor CI configurations (@lencioni)
7.1.0 - 2017-06-13
Added
- Add
default-props-match-prop-typesrule (#1022 @webOS101) - Add
no-redundant-should-component-updaterule (#985 @jomasti) - Add
jsx-closing-tag-locationrule (#1206 @rsolomon) - Add auto fix for
jsx-max-props-per-line(#949 @snowypowers) - Add support for lifecycle methods with
nextProps/prevPropsinno-unused-prop-types(#1213 @jseminck) - Add Flow SuperTypeParameters support to
prop-types(#1236 @gpeal) - Add
childrenoption tojsx-curly-spacing(#857 @fatfisz)
Fixed
- Fix
prefer-stateless-functionignorePureComponentsoption when using class expressions (#1122 @dreid) - Fix
void-dom-elements-no-childrencrash (#1195 @oliviertassinari) - Fix
require-default-propsquoteddefaultPropsdetection (#1201) - Fix
jsx-sort-propsbug withignoreCaseandcallbacksLastoptions set totrue(#1175 @jseminck) - Fix
no-unused-prop-typesfalse positive (#1183 #1135 @jseminck) - Fix
jsx-no-target-blankto not issue errors for non-external URLs (#1216 @gfx) - Fix
prop-typesquoted Flow types detection (#1132 @ethanjgoldberg) - Fix
no-array-index-keycrash withkeywithout value (#1242 @jseminck)
Changed
- Set ESLint 4.0.0 as valid peerDependency
- Dead code removal (#1227 @jseminck)
- Update dependencies (@ljharb)
- Documentation improvements (#1071 @adnasa, #1199 @preco21, #1222 @alexilyaev, #1231 @vonovak, #1239 @webOS101, #1241 @102)
7.0.1 - 2017-05-13
Fixed
- Fix
jsx-curly-spacingallowMultilineoption being undefined in some cases (#1179 @fatfisz) - Fix
jsx-curly-spacingnewline with object literals bug (#1180 @fatfisz) - Fix
prop-typesto not mark class static function as valid propTypes definition (#1174) - Fix
prop-typescrash with Flow spread operator (#1178) - Fix
void-dom-elements-no-childrencrash on faultycreateElementdetection (#1101) - Fix
require-default-propserror message for quoted props (#1161)
Changed
7.0.0 - 2017-05-06
Added
- Add
no-will-update-set-staterule (#1139 @ManThursday) - Add import and destructuring support to
no-deprecated - Add
reservedFirstoption tojsx-sort-props(#1134 @MatthewHerbst)
Breaking
- Update rules for React 15.5.0:
- Add warnings for
React.PropTypesandReact.createClassinno-deprecated(#1148 @Calyhre) - Update
createClasscomponent factory tocreateReactClass. This is used for React component detection, if you still usingReact.createClassuse the shared settings to specifycreateClassas component factory
- Add warnings for
- Drop Node.js < 4 support (#1038 @ljharb)
- Add
no-danger-with-childrenrule to recommended rules (#748 @ljharb) - Add
no-string-refsrule to recommended rules (#749 @ljharb) - Add
jsx-keyrule to recommended rules (#750 @ljharb) - Add
jsx-no-comment-textnodesrule to recommended rules (#751 @ljharb) - Add
jsx-no-target-blankrule to recommended rules (#752 @ljharb) - Add
no-unescaped-entitiesrule to recommended rules (#841 @ljharb) - Add
no-children-proprule to recommended rules (#842 @ljharb) - Remove deprecated
wrap-multilinesrule, usejsx-wrap-multilinesinstead - Remove deprecated
no-comment-textnodesrule, usejsx-no-comment-textnodesinstead - Remove deprecated
require-extensionrule, use the eslint-plugin-importextensionsrule instead - Deprecate
jsx-space-before-closingrule, use thejsx-tag-spacingrule instead.jsx-space-before-closingstill works but will trigger a warning (#1070 @afairb) jsx-first-prop-new-linedefault is nowmultiline-multiprop(#802 @kokarn)jsx-wrap-multilinesnow checks arrow functions without block body. It can be deactivated in rule options (#790 @ColCh)jsx-no-undefwill not check the global scope by default. You can force it with theallowGlobalsoption (#1013 @jomasti)
Fixed
- Fix
no-unused-prop-typesfalse positive withnextProps(#1079 @Kerumen) - Fix
prefer-stateless-functionto not warn on classes with decorators (#1034 @benstepp)
Changed
- Update dependencies (#1119 @danez)
- Documentation improvements (#1121 @omerzach, #1130 @dreid, #1131 @shoesandsocks, #1149 @Adzz, #1151 @MatthewHerbst, #1167 @Slumber86)
6.10.3 - 2017-03-20
Fixed
- Revert #1057 due to issues with
jsx-indent(#1117)
6.10.2 - 2017-03-19
Fixed
- Fix
jsx-indentindentation calculation with nested JSX (#1117)
6.10.1 - 2017-03-19
Fixed
- Fix
jsx-indentauto fix with tabs (#1057 @kentcdodds @webOS101) - Fix
jsx-indentcrash (#1061 @iancmyers) - Fix
void-dom-elements-no-childrencrash and fix it to only checks for a createElement call from React (#1073 @jomasti) - Fix component detection that caused a false positive in
no-multi-comp(#1088 @benstepp)
6.10.0 - 2017-02-16
Added
- Add
forbid-foreign-prop-typesrule (#696 @iancmyers) - Add
void-dom-elements-no-childrenrule (#709 @lencioni) - Add
forbid-elementsrule (#887 @kentor) - Add
noSortAlphabeticallyoption tojsx-sort-props(#541 #786 @markus101) - Add
whenoption tojsx-max-props-per-line(#878 @kentor) - Add support for
nextPropstoprop-types(#814)
Fixed
- Fix
require-default-propscrash (#1029) - Fix
require-default-propsrule when using Flow type from assignment (#1043 @wyze @CarlRosell) - Fix
style-prop-objectto not warn with explicitnullorundefined(#812 @ljharb) - Fix
no-unused-prop-typesprops detection in stateless components (#885 @BarryThePenguin) - Fix
display-namefalse positive withdocument.createElement(#996 @jomasti) - Fix ESLint 2 compatibility (@ljharb)
Changed
- Tests improvements (@ljharb)
- Documentation improvements (#958 @Jorundur, #1010 @amilajack, #1041 @EvNaverniouk, #1050 @lencioni, #1062 @dguo)
6.9.0 - 2017-01-08
Added
- Add support for variable reference to
sort-prop-types(#622)
Fixed
- Fix Node.js 0.10 support (#1000 @ljharb)
- Fix
prop-typesto correctly assign props to components (#991)
Changed
- Documentation improvements (#995 @rutsky)
6.8.0 - 2016-12-05
Added
- Add
no-array-index-keyrule (#978 @lencioni) - Add
require-default-propsrule (#528 @vitorbal) - Add support for flow variance syntax to
prop-types(#961 @ajhyndman)
Fixed
- Fix
jsx-indentwith multiline jsx in ternaries (#966) - Fix component detection to ignore async functions (#989 @taion)
- Fix
jsx-curly-spacingautofix to not delete comments (#648) - Fix auto-enabling of
eslint-plugin-reactin exported configurations (#984 @jamischarles)
Changed
- Update dependencies
- Documentation improvements (#960 @evilebottnawi, #973 @JamesWatling, #982 @captbaritone)
6.7.1 - 2016-11-15
Fixed
- Fix
jsx-tag-spacingcrash when options object isn't passed (#955 @daltones)
6.7.0 - 2016-11-14
Added
- Add
jsx-tag-spacingrule (#693 @Kovensky)
Fixed
- Fix
jsx-indentfor parenthesized ternaries (#945 @voxpelli) - Fix
jsx-indentfor multiline ternaries - Fix
jsx-indentfor arrays in jsx (#947) - Fix
no-danger-with-childrencrash with spread on global variables (#921) - Fix
jsx-wrap-multilinesternaries handling (#916)
Changed
- Enable
no-unused-prop-typesskipShapePropsoption by default to limit false positive (#953 @everdimension)
6.6.0 - 2016-11-06
Added
- Add
jsx-first-prop-new-lineauto fix (#886 @snowypowers)
Fixed
- Fix
no-unused-prop-typescrash with destructured prop-types (#938) - Fix
jsx-indentin multi-line conditional expressions (#901, #907) - Fix
sort-compbad error message if 2 methods in the same group must be moved (#507)
Changed
- Documentation improvements (#941 @pwmckenna)
6.5.0 - 2016-11-01
Added
- Add tab support to
jsx-closing-bracket-locationauto fixer (#909 @arperry) - Add tab and space support to
jsx-indentauto fixer (#608 @jayphelps) - Add
multiline-multipropoption tojsx-first-prop-new-line(#883 @kentor)
Fixed
- Fix
forbid-component-propscrash with self reference JSX element (#839 @xeodou) - Fix
jsx-indentto ignore lines starting by literals (#900) - Fix
no-set-stateto correctly detectsetStatein arrow functions (#931)
Changed
- Update dependencies
- Add
deprecatedmetadata to deprecated rules (#911 @randycoulman) - Auto-enable
eslint-plugin-reactin exported configurations (#925 @MoOx) - Documentation improvements (#910 @Wilfred, #932 @gnarf)
6.4.1 - 2016-10-10
Fixed
- Fix
jsx-indentfor arrays (#897, #898) - Fix
jsx-indentto allow multi-line logical expressions with one level of indent (#896)
6.4.0 - 2016-10-09
Added
- Add
skipUndeclaredoption toprop-types(#846 @pfhayes)
Fixed
- Fix
jsx-no-bindcrash on arrow functions (#854) - Fix
display-namefalse negative on es6-style method inReact.createClass(#852) - Fix
prefer-stateless-functionto allow components withchildContextTypes(#853) - Fix
no-children-propspread support (#862 @randycoulman) - Fix
no-unused-prop-typesto ignore validation when spread is used (#840) - Fix
jsx-closing-bracket-locationfor multi-line prop (#889) - Fix
jsx-indentin multi-line function calls (#895) - Fix
jsx-indentin multi-line logical expressions (#540)
Changed
- Update dependencies
- Documentation improvements (#860 @fson, #863 @corydolphin, #830 @eelyafi, #876 @manovotny, #877 @gaearon)
6.3.0 - 2016-09-20
Added
- Add
no-children-proprule (#720 @benstepp) - Add
no-unescaped-entitiesrule (#681 @pfhayes) - Add JSXExpressionContainer support to
jsx-indentrule (#838 @eelyafi)
Fixed
- Fix
style-prop-objectcrash (#834) - Fix
style-prop-objectfalse positive on computed properties (#820) - Fix
style-prop-objectto deal with null and spread props that can't be resolved (#809 #812 @petersendidit)
6.2.2 - 2016-09-15
Fixed
- Fix
no-unused-prop-typescrash (#825 @EvNaverniouk) - Fix
jsx-no-target-blankcrash (#821)
6.2.1 - 2016-09-13
Fixed
- Fix false positive in
no-unused-prop-types(#792 @EvNaverniouk) - Fix
jsx-no-target-blankto target only anchor elements (#793 @aduth) - Fix
jsx-no-target-blankto be case insensitive #796 @dmnd) - Fix
jsx-uses-varsshadowed variables handling (#799)
Changed
- Update dependencies
- Documentation improvements (@ljharb, #794 @dougshamoo, #813 @AndiDog, #815 @chris-vaszauskas)
6.2.0 - 2016-08-28
Added
- Add
no-unused-prop-typesrule (#226 @EvNaverniouk) - Add
style-prop-objectrule (#715 @petersendidit) - Add auto fix for
self-closing-comp(#770 @pl12133) - Add support for
typeAnnotationsinsort-comp(#235 @dozoisch) - Add support for
PureComponentinprefer-stateless-function(#781 @tiemevanveen)
Fixed
- Fix
jsx-uses-varsto work better withprefer-const. You'll need to upgrade to ESLint 3.4.0 to completely fix the compatibility issue (#716) - Fix
require-render-returncrash (#784) - Fix related components detection in
prop-types(#735) - Fix component detection to ignore functions expression without a parent component
Changed
- Update dependencies
- Documentation improvements (@lencioni)
6.1.2 - 2016-08-17
Fixed
- Fix nested spread handling in
no-danger-with-children(#771 @petersendidit)
Changed
- Documentation improvements
6.1.1 - 2016-08-16
Fixed
- Fix
prop-typeson annotated components (#766) - Fix
no-danger-with-childrenspread support (#767 @petersendidit)
Changed
- Documentation improvements (#769 @daltones)
6.1.0 - 2016-08-14
Added
- Add
React.PureComponentsupport (#737) - Add
forbid-component-propsrule (#314 @lencioni) - Add
no-danger-with-childrenrule (#710 @petersendidit) - Add pragma for
createClassfactory method (#725 @zurawiki)
Fixed
- Fix Node.js 0.10 support (#746)
- Fix
prop-typeson annotated components (#729) - Fix
require-optimizationtest for function declaration (#744 @Tom910) - Fix
jsx-uses-varsto handle nested object properties (#761 @yayalice) - Fix rules metadata
Changed
- Update dependencies
- Documentation improvements (#759 @embrown, #703 #753 @lencioni, #739 @ljharb, #731 @wKich, #745 @petersendidit, #659 @dguo)
6.0.0 - 2016-08-01
Added
- Add an
allshareable configuration with all rules enabled (#674 @pfhayes) - Add
no-find-dom-noderule (#678) - Add
shorthandLastoption tojsx-sort-props(#391 @mathieumg) - Add
allowDecoratorsoption torequire-optimization(#669 @Tom910)
Breaking
- Deprecate
require-extensionrule, use the eslint-plugin-importextensionsrule instead.require-extensionstill works but will trigger a warning - Enable
allow-in-funcmode by default inno-did-mount-set-stateandno-did-update-set-staterules (#702 @lencioni) - Enable html tags check by default in
self-closing-comp - Remove
pragmaoption fromjsx-uses-react, use the shared settings to specify a custom pragma (#700 @lencioni) - Remove
reactoption fromno-deprecatedrule, use the shared settings to specify the React version (#700 @lencioni) - Add
require-render-returnrule to recommended rules - Remove
no-dangerfrom recommended rules (#636 @mjackson) - Remove
no-did-mount-set-stateandno-did-update-set-statefrom recommended rules (#596) - Remove deprecated
jsx-sort-prop-typesrule, usesort-prop-typesinstead (#549 @lencioni) - Rename
no-comment-textnodestojsx-no-comment-textnodes.no-comment-textnodesstill works but will trigger a warning (#668 @lencioni) - Rename
wrap-multilinestojsx-wrap-multilines.wrap-multilinesstill works but will trigger a warning (#668 @lencioni) - Add ESLint as peerDependency (#657 @jokeyrhyme)
- Add Node.js 0.10 as minimum required version (#657 @jokeyrhyme)
Fixed
- Fix
jsx-handler-namesincorrectly flaggingonly(#571 @lencioni) - Fix spread props cash in
jsx-no-target-blank(#679 @randycoulman) - Fix
require-optimizationwarning on stateless components (#687) - Fix
jsx-uses-varsthat incorrectly marked some variables as used (#694 @lencioni) - Fix
no-unknown-propertycheck on SVG attributes (#718) - Fix
jsx-no-bindreporting errors on render functions that don't return JSX (#663 @petersendidit) - Fix
jsx-closing-bracket-locationautofix whenlocationis set toprops-aligned(#684 @pfhayes) - Fix
prop-typesfor destructured arguments being assigned to the parent stateless component in some cases (#698) - Fix
prop-typesfor JSX return being assigned to the parent function in some cases (#504) - Fix
jsx-curly-spacingfor reporting on JSX content by mistake (#671) - Fix
prop-typescrash when accessing constructor on props (#654) - Fix
jsx-filename-extensionto not check filenames on text input (#662 @ljharb) - Fix
jsx-no-comment-textnodesincorrectly catching urls (#664 @petersendidit)
Changed
- Only report
jsx-filename-extensionwarning once per file (#660 @mathieumg) - Update SVG and DOM attribute list for
no-unknown-property - Update rules to use the new ESLint rule format (#661 @petersendidit)
- Update dependencies
- Documentation improvements (#724 @lencioni)
- Update Travis CI and AppVeyor CI configurations (@ljharb)
5.2.2 - 2016-06-17
Fixed
- Fix
jsx-no-bindcrash (#641)
5.2.1 - 2016-06-17
Fixed
- Fix
jsx-pascal-casefor namespaced components (#637 @evcohen)
5.2.0 - 2016-06-17
Added
- Add
require-optimizationrule (#240 @EvNaverniouk) - Add
jsx-filename-extensionrule (#495 @lencioni) - Add
no-render-return-valuerule (#531 @iamdustan) - Add
no-comment-textnodesrule (#616 @benvinegar) - Add
objectLiteralsoption tojsx-curly-spacing(#388, #211 @casesandberg @ljharb) - Add option to
self-closing-compto check html tags (#572 @gitim) - Add
ignoreoption tono-unknown-propertyrule (#631 @insin) - Add support for ES7 bind operator to
jsx-handler-names(#630) - Add support for explicit declaration that class extends React.Component (#68 @gausie)
Fixed
- Fix
jsx-closing-bracket-locationmultiline prop support (#493 @tuures) - Fix
prop-typesfor props that where not assigned to the right component (#591) - Fix
display-namewhen JSON style is used for defining components (#590 @gitim) - Fix
jsx-no-bindfor bind detection in render when assigned to a variable (#474 @petersendidit) - Fix
jsx-curly-spacingfor spread operator (#606 @gitim) - Fix
sort-compcrash on spread operator (#624) - Fix
prop-typescrash when destructuring props with spread only
Changed
- Update dependencies
- Add doctrine as a dependency (#68 @gausie)
- Add jsx-ast-utils as a dependency (#634 @evcohen)
- Documentation improvements (#594 @lencioni, #598 @mLuby, #633 @appsforartists)
5.1.1 - 2016-05-10
Fixed
- Fix
require-render-returncrash (#589)
5.1.0 - 2016-05-10
Added
- Add
jsx-no-target-blankrule (#582 @Gasparila) - Add
allowAllCapsandignoreoptions tojsx-pascal-case(#575) - Add class properties support to
require-render-return(#564)
Fixed
- Fix
jsx-closing-bracket-locationfixer (#533 @dtinth) - Fix
require-render-returnto only check valid render methods (#563) - Fix detection to allow simple
thisusage in fonctional components (#576) - Fix
forbid-prop-typescrash (#579) - Fix comment handling in
jsx-curly-spacing(#584)
Changed
5.0.1 - 2016-04-18
Fixed
- Fix
require-render-returnto not check stateless functions (#550)
5.0.0 - 2016-04-17
Added
- Add
jsx-first-prop-new-linerule (#410 @jseminck)
Breaking
- Update rules for React 15:
- Add warnings for
LinkedStateMixin,ReactPerf.printDOMandReactPerf.getMeasurementsSummaryMapinno-deprecated - Allow stateless components to return
nullinprefer-stateless-function - Remove SVG attributes warnings (#490)
- Add warnings for
If you're still not using React 15 you can keep the old behavior by setting the React version to 0.14 in the shared settings.
Fixed
- Rewrite
require-render-returnrule (#542, #543) - Fix
prefer-stateless-functioncrash (#544) - Fix external propTypes handling (#545)
- Do not mark inline functions in JSX as components (#546)
Changed
- Update dependencies
- Documentation improvements
4.3.0 - 2016-04-07
Added
- Add
require-render-returnrule (#482 @shmuga) - Add auto fix for
jsx-equals-spacing(#506 @peet) - Add auto fix for
jsx-closing-bracket-location(#511 @KevinGrandon)
Fixed
- Fix
prefer-stateless-functionfor conditional JSX (#516) - Fix
jsx-pascal-caseto support single letter component names (#505 @dthielman)
Changed
4.2.3 - 2016-03-15
Fixed
- Fix class properties retrieval in
prefer-stateless-function(#499)
4.2.2 - 2016-03-14
Fixed
- Rewrite
prefer-stateless-functionrule (#491) - Fix
self-closing-compto treat non-breaking spaces as content (#496) - Fix detection for direct props in
prop-types(#497) - Fix annotated function detection in
prop-types(#498) - Fix
thisusage injsx-no-undef(#489)
Changed
- Update dependencies
- Add shared setting for React version
4.2.1 - 2016-03-08
Fixed
- Fix
sort-prop-typescrash with spread operator (#478) - Fix stateless components detection when conditionally returning JSX (#486)
- Fix case where props were not assigned to the right component (#485)
- Fix missing
getChildContextlifecycle method inprefer-stateless-function(#492)
4.2.0 - 2016-03-05
Added
- Add support for Flow annotations on stateless components (#467)
- Add
prefer-stateless-functionrule (#214) - Add auto fix for
jsx-indent-props(#483 @shioju)
Fixed
- Fix
jsx-no-undefcrash on objects (#469) - Fix propTypes detection when declared before the component (#472)
Changed
- Update dependencies
- Documentation improvements (#464 @alex-tan, #466 @awong-dev, #470 @Gpx; #462 @thaggie)
4.1.0 - 2016-02-23
Added
- Add component detection for class expressions
- Add displayName detection for class expressions in
display-name(#419)
Fixed
- Fix used props detection in components for which we are not confident in
prop-types(#420) - Fix false positive in
jsx-key(#456 @jkimbo)
Changed
- Documentation improvements (#457 @wyze)
4.0.0 - 2016-02-19
Added
- Add
jsx-space-before-closingrule (#244 @ryym) - Add support for destructing in function signatures to
prop-types(#354 @lencioni)
Breaking
- Add support for static methods to
sort-comp. Static methods must now be declared first, see rule documentation (#128 @lencioni) - Add shareable config in place of default configuration.
jsx-uses-varsis not enabled by default anymore, see documentation (#192) - Rename
jsx-sort-prop-typestosort-prop-types.jsx-sort-prop-typesstill works but will trigger a warning (#87 @lencioni) - Remove deprecated
jsx-quotesrule (#433 @lencioni) display-namenow accept the transpiler name by default. You can use theignoreTranspilerNameoption to get the old behavior, see rule documentation (#440 @lencioni)
Fixed
- Only ignore lowercase JSXIdentifier in
jsx-no-undef(#435) - Fix
jsx-handler-namesregex (#425) - Fix destructured props detection in
prop-types(#443)
Changed
- Update dependencies (#426 @quentin-)
- Documentation improvements (#414 @vkrol, #370 @tmcw, #441 #429 @lencioni, #432 @note89, #438 @jmann6)
3.16.1 - 2016-01-24
Fixed
- Fix
jsx-sort-prop-typesissue with custom propTypes (#408 @alitaheri)
3.16.0 - 2016-01-24
Added
- Add
jsx-equals-spacingrule (#394 @ryym) - Add auto fix for
wrap-multiline - Add auto fix for
jsx-boolean-value - Add auto fix for
no-unknown-property - Add auto fix for
jsx-curly-spacing(#407 @ewendel) - Add
requiredFirstoption tojsx-sort-prop-types(#392 @chrislaskey) - Add
ignoreRefsoption tojsx-no-bind(#330 @silvenon)
Fixed
- Ignore
refinjsx-handler-names(again) (#396)
Changed
- Update dependencies
3.15.0 - 2016-01-12
Added
- Add support for flow annotations to
prop-types(#382 @phpnode)
Fixed
- Fix
prop-typescrash when initializing class variable with an empty object (#383) - Fix
prop-typescrash when propTypes are using the spread operator (#389)
Changed
3.14.0 - 2016-01-05
Added
- Add
jsx-indentrule (#342) - Add shared setting for pragma configuration (#228 @NickStefan)
Fixed
- Fix crash in
jsx-key(#380 @nfcampos) - Fix crash in
forbid-prop-types(#377 @nfcampos) - Ignore
refinjsx-handler-names(#375)
Changed
- Add AppVeyor CI to run tests on a Windows platform
- Add
sort-compcodemod tosort-compdocumentation (#381 @turadg)
3.13.1 - 2015-12-26
Fixed
3.13.0 - 2015-12-24
Added
- Add
no-string-refsrule (#341 @Intellicode) - Add support for propTypes assigned via a variable in
prop-types(#355)
Fixed
- Fix
neveroption inprefer-es6-class - Fix
jsx-keyfalse-positives (#320 @silvenon)
Changed
3.12.0 - 2015-12-20
Added
- Add
no-deprecatedrule (#356 @graue) - Add
no-is-mountedrule (#37 @lencioni) - Add
neveroption toprefer-es6-classrule (#359 @pwmckenna)
Fixed
- Fix
jsx-pascal-caseto stop checking lower cased components (#329) - Fix crash in component detection class (#364)
Changed
- Add link to eslint-plugin-react-native in Readme
- Update dependencies
3.11.3 - 2015-12-05
Fixed
- Fix crash in
prop-typeswhen reassigning props (#345) - Fix
jsx-handler-namesfor stateless components (#346)
Changed
- Update
jsx-handler-nameserror messages to be less specific (#348 @jakemmarsh)
3.11.2 - 2015-12-01
Fixed
- Allow numbers in
jsx-pascal-case(#339) - Fix
jsx-handler-namescrash with arrays (#340)
Changed
- Add
allow-in-funcoption tono-did-update-set-statedocumentation
3.11.1 - 2015-11-29
Fixed
- Fix SVG attributes support for
no-unknown-property(#338)
3.11.0 - 2015-11-29
Added
- Add
jsx-handler-namesrule (#315 @jakemmarsh) - Add SVG attributes support to
no-unknown-property(#318) - Add shorthandFirst option to
jsx-sort-props(#336 @lucasmotta)
Fixed
- Fix destructured props detection in stateless components (#326)
- Fix props validation for nested stateless components (#331)
- Fix
require-extensionto ignore extension if it's part of the package name (#319)
Changed
- Allow consecutive uppercase letters in
jsx-pascal-case(#328 @lencioni) - Update dependencies
3.10.0 - 2015-11-21
Added
- Add
jsx-pascal-caserule (#306 @jakemmarsh)
Fixed
- Fix crash on incomplete class property declaration (#317 @dapetcu21)
- Fix crash with ESLint 1.10.0 (#323 @lukekarrys)
3.9.0 - 2015-11-17
Added
- Add
jsx-keyrule (#293 @benmosher) - Add
allow-in-funcoption tono-did-update-set-state(#300) - Add option to only enforce
jsx-closing-bracket-locationrule to one type of tag (nonEmpty or selfClosing) (#307)
Fixed
- Fix crash when destructuring with only the rest spread (#269)
- Fix variables detection when searching for related components (#303)
- Fix
no-unknown-propertyto not check custom elements (#308 @zertosh)
Changed
- Improve
jsx-closing-bracket-locationerror message (#301 @alopatin) - Update dependencies
3.8.0 - 2015-11-07
Added
- Add ignoreStateless option to
no-multi-comp(#290)
Fixed
- Fix classes with properties to always be marked as components (#291)
- Fix ES5 class detection when using
createClassby itself (#297) - Fix direct props detection (#298)
- Ignore functions containing the keyword
thisduring component detection
3.7.1 - 2015-11-05
Fixed
- Fix
sort-compcrash on stateless components (#285) - Fix crash in ES5 components detection (#286)
- Fix ES5 components detection from nested functions (#287)
3.7.0 - 2015-11-05
Added
- Add
jsx-no-bindrule (#184 @Daniel15) - Add line-aligned option to
jsx-closing-bracket-location(#243 @alopatin)
Fixed
- Fix a lot of issues about components detection, mostly related to stateless components (#264, #267, #268, #276, #277, #280)
Changed
- Update dependencies
3.6.3 - 2015-10-20
Fixed
- Fix
display-namefor stateless components (#256) - Fix
prop-typesprops validation in constructor (#259) - Fix typo in README (#261 @chiedojohn)
3.6.2 - 2015-10-18
Fixed
- Fix wrong prop-types detection (#255)
3.6.1 - 2015-10-18
Fixed
- Fix props validation in constructor (#254)
3.6.0 - 2015-10-18
Added
- Add support for stateless function components to
display-nameandprop-types(#237) - Add callbacksLast option to
jsx-sort-propsandjsx-sort-prop-types(#242 @Daniel15) - Add
prefer-es6-classrule (#247 @hamiltondanielb)
Fixed
- Fix
forbid-prop-typescrash with destructured PropTypes (#230 @epmatsw) - Fix
forbid-prop-typesto do not modify AST directly (#249 @rhysd) - Fix
prop-typescrash with empty destructuring (#251) - Fix
prop-typesto not validate computed keys in destructuring (#236)
Changed
3.5.1 - 2015-10-01
Fixed
- Fix
no-direct-mutation-stateto report only in React components (#229) - Fix
forbid-prop-typesfor arrayOf and instanceOf (#230)
Changed
- Documentation improvements (#232 @edge)
3.5.0 - 2015-09-28
Added
- Add
no-direct-mutation-staterule (#133, #201 @petersendidit) - Add
forbid-prop-typesrule (#215 @pwmckenna)
Fixed
- Fix no-did-mount/update-set-state rules, these rules were not working on ES6 classes
Changed
- Update dependencies
- Documentation improvements (#222 @Andersos)
3.4.2 - 2015-09-18
Fixed
- Only display the
jsx-quotesdeprecation warning with the default formatter (#221)
3.4.1 - 2015-09-17
Fixed
- Fix
jsx-quotesrule deprecation message (#220)
3.4.0 - 2015-09-16
Added
- Add namespaced JSX support to
jsx-no-undef(#219 @zertosh) - Add option to
jsx-closing-bracket-locationto configure different styles for self-closing and non-empty tags (#208 @evocateur)
Deprecated
- Deprecate
jsx-quotesrule, will now trigger a warning if used (#217)
3.3.2 - 2015-09-10
Changed
- Add
statein lifecycle methods forsort-comprule (#197 @mathieudutour) - Treat component with render which returns
createElementas valid (#206 @epmatsw)
Fixed
- Fix allowed methods on arrayOf in
prop-types(#146) - Fix default configuration for
jsx-boolean-value(#210)
3.3.1 - 2015-09-01
Changed
- Update dependencies
- Update changelog to follow the Keep a CHANGELOG standards
- Documentation improvements (#198 @lencioni)
Fixed
- Fix
jsx-closing-bracket-locationfor multiline props (#199)
3.3.0 - 2015-08-26
Added
- Add
jsx-indent-propsrule (#15, #181) - Add
no-set-state rule(#197 @markdalgleish) - Add
jsx-closing-bracket-locationrule (#14, #64)
Changed
- Update dependencies
Fixed
- Fix crash on propTypes declarations with an empty body (#193 @mattyod)
3.2.3 - 2015-08-16
Changed
- Update dependencies
Fixed
3.2.2 - 2015-08-11
Changed
- Remove peerDependencies (#178)
3.2.1 - 2015-08-08
Fixed
- Fix crash when propTypes don't have any parent (#182)
- Fix jsx-no-literals reporting errors outside JSX (#183 @CalebMorris)
3.2.0 - 2015-08-04
Added
- Add
jsx-max-props-per-linerule (#13) - Add
jsx-no-literalsrule (#176 @CalebMorris)
Changed
- Update dependencies
Fixed
- Fix object access in
jsx-no-undef(#172)
3.1.0 - 2015-07-28
Added
- Add event handlers to
no-unknown-property(#164 @mkenyon) - Add customValidators option to
prop-types(#145 @CalebMorris)
Changed
- Update dependencies
- Documentation improvements (#167 @ngbrown)
Fixed
- Fix comment handling in
jsx-curly-spacing(#165)
3.0.0 - 2015-07-21
Added
- Add jsx-no-duplicate-props rule (#161 @hummlas)
- Add allowMultiline option to the
jsx-curly-spacingrule (#156 @mathieumg)
Breaking
- In
jsx-curly-spacingbraces spanning multiple lines are now allowed withneveroption (#156 @mathieumg)
Fixed
- Fix multiple var and destructuring handling in
prop-types(#159) - Fix crash when retrieving propType name (#163)
2.7.1 - 2015-07-16
Changed
- Update peerDependencies requirements (#154)
- Update codebase for ESLint v1.0.0
- Change oneOfType to actually keep the child types (#148 @CalebMorris)
- Documentation improvements (#147 @lencioni)
2.7.0 - 2015-07-11
Added
- Add
no-dangerrule (#138 @scothis) - Add
jsx-curly-spacingrule (#142)
Fixed
2.6.4 - 2015-07-02
Fixed
- Fix simple destructuring handling (#137)
2.6.3 - 2015-06-30
Fixed
- Fix ignore option for
prop-typesrule (#135) - Fix nested props destructuring (#136)
2.6.2 - 2015-06-28
Fixed
- Fix props validation when using a prop as an object key (#132)
2.6.1 - 2015-06-28
Fixed
- Fix crash in
prop-typeswhen encountering an empty variable declaration (#130)
2.6.0 - 2015-06-28
Added
- Add support for nested propTypes (#62 #105 @Cellule)
- Add
require-extensionrule (#117 @scothis) - Add support for computed string format in
prop-types(#127 @Cellule) - Add ES6 methods to
sort-compdefault configuration (#97 #122) - Add support for props destructuring directly on the this keyword
- Add
acceptTranspilerNameoption todisplay-namerule (#75) - Add schema to validate rules options
Changed
- Update dependencies
Fixed
- Fix test command for Windows (#114 @Cellule)
- Fix detection of missing displayName and propTypes when
ecmaFeatures.jsxis false (#119 @rpl) - Fix propTypes destructuring with properties as string (#118 @Cellule)
- Fix
jsx-sort-prop-typessupport for keys as string (#123 @Cellule) - Fix crash if a ClassProperty has only one token (#125)
- Fix invalid class property handling in
jsx-sort-prop-types(#129)
2.5.2 - 2015-06-14
Fixed
- Fix regression in
jsx-uses-varswithbabel-eslint(#110)
2.5.1 - 2015-06-14
Changed
- Update dependencies
- Documentation improvements (#99 @morenoh149)
Fixed
- Fix
prop-typescrash when propTypes definition is invalid (#95) - Fix
jsx-uses-varsfor ES6 classes (#96) - Fix hasOwnProperty that is taken for a prop (#102)
2.5.0 - 2015-06-04
Added
- Add option to make
wrap-multilinesmore granular (#94 @PiPeep)
Changed
2.4.0 - 2015-05-30
Added
- Add pragma option to
jsx-uses-react(#82 @dominicbarnes) - Add context props to
sort-comp(#89 @zertosh)
Changed
- Update dependencies
- Documentation improvement (#91 @matthewwithanm)
Fixed
- Fix itemID in
no-unknown-propertyrule (#85 @cody) - Fix license field in package.json (#90 @zertosh)
- Fix usage of contructor in
sort-compoptions (#88)
2.3.0 - 2015-05-14
Added
- Add
sort-comprule (#39) - Add
allow-in-funcoption tono-did-mount-set-state(#56)
Changed
- Update dependencies
- Improve errors locations for
prop-types
Fixed
- Fix quoted propTypes in ES6 (#77)
2.2.0 - 2015-04-22
Added
- Add
jsx-sort-prop-typesrule (#38 @AlexKVal)
Changed
- Documentation improvements (#71 @AlexKVal)
Fixed
- Fix variables marked as used when a prop has the same name (#69 @burnnat)
2.1.1 - 2015-04-17
Added
- Add support for classes static properties (#43)
- Add tests for the
babel-eslintparser - Add ESLint as peerDependency (#63 @AlexKVal)
Changed
2.1.0 - 2015-04-06
Added
- Add
jsx-boolean-valuerule (#11) - Add support for static methods in
display-nameandprop-types(#48)
Changed
- Update
jsx-sort-propsto reset the alphabetical verification on spread (#47 @zertosh) - Update
jsx-uses-varsto be enabled by default (#49 @banderson)
Fixed
- Fix describing comment for hasSpreadOperator() method (#53 @AlexKVal)
2.0.2 - 2015-03-31
Fixed
- Fix ignore rest spread when destructuring props (#46)
- Fix component detection in
prop-typesanddisplay-name(#45) - Fix spread handling in
jsx-sort-props(#42 @zertosh)
2.0.1 - 2015-03-30
Fixed
- Fix props detection when used in an object (#41)
2.0.0 - 2015-03-29
Added
- Add
jsx-sort-propsrule (#16) - Add
no-unknown-propertyrule (#28) - Add ignore option to
prop-typesrule
Changed
- Update dependencies
Breaking
- In
prop-typesthe children prop is no longer ignored
Fixed
- Fix components are now detected when using ES6 classes (#24)
- Fix
prop-typesnow return the right line/column (#33) - Fix props are now detected when destructuring (#27)
- Fix only check for computed property names in
prop-types(#36 @burnnat)
1.6.1 - 2015-03-25
Changed
- Update
jsx-quotesdocumentation
Fixed
- Fix
jsx-no-undefwithbabel-eslint(#30) - Fix
jsx-quoteson Literal childs (#29)
1.6.0 - 2015-03-22
Added
- Add
jsx-no-undefrule - Add
jsx-quotesrule (#12) - Add
@jsxpragma support (#23)
Changed
- Allow
this.getStatereferences (not calls) in lifecycle methods (#22 @benmosher) - Update dependencies
Fixed
- Fix
react-in-jsx-scopein Node.js env - Fix usage of propTypes with an external object (#9)
1.5.0 - 2015-03-14
Added
- Add
jsx-uses-varsrule
Fixed
- Fix
jsx-uses-reactfor ESLint 0.17.0
1.4.1 - 2015-03-03
Fixed
- Fix
this.props.childrenmarked as missing in props validation (#7) - Fix usage of
this.propswithout property (#8)
1.4.0 - 2015-02-24
Added
- Add
react-in-jsx-scoperule (#5 @glenjamin) - Add
jsx-uses-reactrule (#6 @glenjamin)
Changed
- Update
prop-typesto check props usage insead of propTypes presence (#4)
1.3.0 - 2015-02-24
Added
- Add
no-did-mount-set-staterule - Add
no-did-update-set-staterule
Changed
- Update dependencies
1.2.2 - 2015-02-09
Changed
- Update dependencies
Fixed
- Fix childs detection in
self-closing-comp(#3)
1.2.1 - 2015-01-29
Changed
- Update Readme
- Update dependencies
- Update
wrap-multilinesandself-closing-comprules for ESLint 0.13.0
1.2.0 - 2014-12-29
Added
- Add
self-closing-comprule
Fixed
- Fix
display-nameandprop-typesrules
1.1.0 - 2014-12-28
Added
- Add
display-namerule - Add
wrap-multilinesrule - Add rules documentation
- Add rules tests
1.0.0 - 2014-12-16
Added
- First revision