Change Log
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
display-name
: addcheckContextObjects
option (#3529 @JulesBlm)jsx-first-prop-new-line
: addmultiprop
option (#3533 @haydncomley)no-deprecated
: add React 18 deprecations (#3548 @sergei-startsev)forbid-component-props
: adddisallowedFor
option (#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
: allowonLoad
onsource
(@ljharb)jsx-first-prop-new-line
: ensure autofix preserves generics in component name (#3546 @ljharb)no-unknown-property
: allowfill
prop 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)
Changed
- [Docs]
jsx-newline
,no-unsafe
,static-property-placement
: Fix code syntax highlighting (#3563 @nbsp1221)
7.32.2 - 2023.01.28
Fixed
- configs: restore
parserOptions
in legacy configs ([#3523][] @ljharb) jsx-no-constructed-context-values
,jsx-no-useless-fragment
: add a rule schema (@ljharb) (no-unknown-property
: addfill
for<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
: addallowDestructuredState
option (#3449 @ljharb)- add
sort-default-props
and deprecatejsx-sort-default-props
(#1861 @alexzherdev) - add
no-object-type-as-default-prop
rule (#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 checkfbs
elements (#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-generator
to 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
anyOf
instead ofoneOf
(@ljharb @remcohaszing)
7.31.11 - 2022.11.17
Fixed
jsx-no-target-blank
: allow ternaries with literals (#3464 @akulsr0)no-unknown-property
: addinert
attribute (#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
: allowallowFullScreen
oniframe
(#3455 @almeidx)
7.31.9 - 2022.10.09
Fixed
no-unknown-property
: adddialog
attributes (#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
: allowwebkitDirectory
oninput
, 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
: addviewBox
onmarker
(#3416 @ljharb)no-unknown-property
: addnoModule
onscript
(#3414 @ljharb)no-unknown-property
: allowonLoad
on<object>
(#3415 @OleksiiKachan)no-multi-comp
: do not detect a function property returning only null as a component (#3412 @ljharb)no-unknown-property
: allowabbr
on<th>
and<td>
(#3419 @OleksiiKachan)no-unknown-property
: addviewBox
forpattern
,symbol
,view
(#3424 @MNBuyskih)no-unknown-property
: addalign
on 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 onfbt
nodes entirely (#3391 @ljharb)no-unknown-property
: adddownload
property support fora
andarea
(#3394 @HJain13)no-unknown-property
: allowwebkitAllowFullScreen
andmozAllowFullScreen
(#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
: allowimageSrcSet
andimageSizes
attributes on<link>
(#3407 @terrymun)no-unknown-property
: addborder
;focusable
on<svg>
(#3404 #3404 @ljharb)no-unknown-property
: React lowercasesdata-
attrs (#3395 @ljharb)no-unknown-property
: addvalign
on table components (#3389 @ljharb)
7.31.6 - 2022.09.04
Fixed
no-unknown-property
:onError
andonLoad
both work onimg
andscript
(#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
: adddefaultChecked
property (#3385 @sjarva)no-unknown-property
: add touch and media event related properties (#3385 @sjarva)no-unknown-property
:children
is always an acceptable prop; iframes havescrolling
; video hasplaysInline
(#3385 @ljharb)
7.31.4 - 2022.09.03
Fixed
no-unknown-property
: supportchecked
on 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
: addallowMultiline
option when prevent option is true (#3311 @TildaDares)forbid-dom-props
: adddisallowedFor
option (#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-always
option (#3260, #3264 @Nokel81)function-component-definition
: replacevar
byconst
in certain situations (#3248 @JohnBerd @SimeonC)- add
jsx-no-leaked-render
(#3203 @Belco90) require-default-props
: add optionfunctions
(#3249 @nix6839)jsx-newline
: AddallowMultilines
option (#3311 @TildaDares)
Fixed
hook-use-state
: Allow UPPERCASE setState setter prefixes (#3244 @duncanbeevers)propTypes
: addVFC
to 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
isParenthesized
AST 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 topropElementValues
asignore
(#3228 @ljharb)propTypes
: addVFC
to 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-state
rule 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-sandbox
rule (#2753 @tosmolka @ljharb) no-did-mount-set-state
,no-did-update-set-state
: no-op with react >= 16.3 (#1754 @ljharb)jsx-sort-props
: support multiline prop groups (#3198 @duhamelgm)jsx-key
: addwarnDuplicates
option to warn on duplicate jsx keys in an array (#2614 @ljharb)jsx-sort-props
: addlocale
option (#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-props
improve performance forIdentifier
visitor (#3190 @meowtec)propTypes
: Handle TSTypeReference in no-unused-prop-type (#3195 @niik)sort-prop-types
: avoid repeated warnings of the same node/reason (#519 @ljharb)jsx-indent
: Fix indent handling for closing parentheses (#620 @stefanbuck])prop-types
/propTypes
: follow a returned identifier to see if it is JSX (#1046 @ljharb)no-unused-state
: TS: supportgetDerivedStateFromProps
as an arrow function (#2061 @ljharb)no-array-index-key
: catch.toString
andString()
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
: documentallowInPropTypes
option (#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.isUsingOperator
correctly 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
: allowlink
rel
to haveapple-touch-icon
,mask-icon
(#3132 @ljharb)no-unused-class-component-methods
: addgetChildContext
lifecycle 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/parser
v5 (@ljharb) no-invalid-html-attribute
: add rule (#2863 @Nokel81)
Fixed
propTypes
: addVoidFunctionComponent
to react generic list (#3092 @vedadeepta)jsx-fragments
,jsx-no-useless-fragment
: avoid a crash on fragment syntax intypescript-eslint
parser (@ljharb)jsx-props-no-multi-spaces
: avoid a crash on long member chains in tag names intypescript-eslint
parser (@ljharb)no-unused-prop-types
,usedPropTypes
: avoid crash with typescript-eslint parser (@ljharb)display-name
: unwrap TSas
expressions (#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-namespace
rule (#2640 @yacinehmito @ljharb) jsx-max-props-per-line
: addsingle
andmulti
options (#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
isCreateElement
andisDestructuredFromPragmaImport
utils (@ljharb)
7.25.2 - 2021.09.16
Fixed
- [
jsx-no-useless-fragments
]: Handle insignificant whitespace correctly whenallowExpressions
istrue
(#3061 @benj-dobs) prop-types
,propTypes
: handle implicitchildren
prop 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-props
rule (#1547 @jomasti) jsx-no-target-blank
: addforms
option (#1617 @jaaberg)jsx-pascal-case
: addallowLeadingUnderscore
option (#3039 @pangaeatech)no-children-prop
: AddallowFunctions
option (#1903 @alexzherdev)- [
jsx-runtime
]: setparserOptions.jsxPragma
for@typescript-eslint/parser
(bb64df65 @ljharb)
Fixed
- component detection: use
estraverse
to 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-runtime
config (#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-runtime
config (#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 ofwarnOnSpreadAttributes
being 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 minimatchignore
option (#2906 @bcherny)jsx-pascal-case
: supportallowNamespace
option (#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-runtime
config, for the modern JSX runtime transform (@ljharb)
Fixed
jsx-no-constructed-context-values
: avoid a crash withas X
TS 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-types
import; add warning (#2899 @ljharb)jsx-curly-brace-presence
: ignore containers with comments (#2900 @golopot)destructuring-assignment
: fix a false positive for local prop namedcontext
in SFC (#2929 @SyMind)jsx-no-target-blank
: Allow rel="noreferrer" whenallowReferrer
is 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
: addedcheckKeyMustBeforeSpread
option 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
: addignoreTernaryOperator
option (#2846 @SebastianZimmer)jsx-no-target-blank
: AddwarnOnSpreadAttributes
option (#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 withdeclaration
s 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
: applyskipShapeProps
to 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 onnever
type 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
: addcheckInlineFunction
option (#2761 @dididy)jsx-no-literals
: addnoAttributeStrings
option (#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-literals
with 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 localcreateElement
identifier 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 bindinglessreact
import
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-typos
test 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
: addignoreProps
option 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
,usedPropTypes
util: avoid node.start and node.end (25b1936 @toshi-toma)jsx-no-target-blank
: allowno-referrer
withoutnoopener
by default (#2043 @seancrater)button-has-type
: improve message when non-static value is used (aecff62 @golopot)no-adjacent-inline-elements
: prevent crash on nullish children (#2621 @Rogdham)prop-types
: avoid crash when spreading any type (#2606 @golopot))require-render-return
: add missing "a" (#2604 @leothorp)jsx-no-comment-textnodes
: fix for@typescript-eslint/parser
(#2601 @Axnyff)- [
displayName
][]: avoid a crash when using React.memo (#2587 @golopot)
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-linebreak
override (#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
: Addallow
option (#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
: makemarkPropTypesAsUsed
work withTSEmptyBodyFunctionExpression
AST node (#2560 @guillaumewuip)- [
displayName
][] (but really,propTypes
detection): 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;u
ands
are (@ljharb)
Changed
- [Docs] use
markdown-magic
to 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-presence
edge cases (#2523 @rafbgarcia)prop-types
: Does not validate missing propTypes for LogicalExpression (#2533 @toshi-toma)no-unknown-property
: allowTransparency does not exist in React >= v16.1 (#1538 @dawidvdh)jsx-curly-brace-presence
: Fix error related to tags line break (#2521 @rafbgarcia)no-typos
: Compilation error when method name is string instead of identifier (#2514 @shijistar)jsx-curly-brace-presence
: allow trailing spaces in TemplateLiteral (#2507 @doochik)no-unused-prop-types
,no-unused-state
: fix false positives when using TS type assertions (#2536 @kdmadej)
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
: addallowReferrer
option (#2478 @eps1lon)jsx-handler-names
: addcheckLocalVariables
option (#2470 @aub)prop-types
: Support Flow Type spread (#2446 @moroine)jsx-props-no-spreading
: addexplicitSpread
option 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 forallowedStrings
check (#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-includes
over.includes
for 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-fragment
rule (#2261 @golopot) - [
jsx-handler-name
][]: allowfalse
to disableeventHandlerPrefix
/eventHandlerPropPrefix
(#2410 @tanmoyopenroot) sort-comp
: addstatic-variables
grouping (#2408 @vedadeepta)jsx-no-literals
: AddallowedStrings
option (#2380 @benhollander)no-multi-comp
: Added handling forforwardRef
andmemo
wrapping components declared in the same file (#2184 @jenil94)jsx-pascal-case
:allowAllCaps
option 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
: addisWhiteSpaces
tolib/util/jsx
(#2409 @vedadeepta)
7.14.3 - 2019-07-23
Fixed
- Fix
prop-types
to 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
memo
andforwardRef
are used together (#2349 @yannickcr)
Changed
- Documentation improvements (@ljharb, #2354 @golopot)
7.14.2 - 2019-06-24
Fixed
- Fix
prop-types
crash on for...of destructuring (#2326 @yannickcr)
7.14.1 - 2019-06-24
Fixed
- Fix
prop-types
crash on multiple destructuring (#2319 @golopot)
7.14.0 - 2019-06-23
Added
- Add
jsx-curly-newline
rule (#1493 @golopot) - Add support for nested destructuring to
prop-types
(#296 #1422 @golopot) - Add support for variables defined as props to
prop-types
andno-unused-prop-types
(#442 #833 #1002 #1116 #1257 #1764 @golopot) - Add
checkFragmentShorthand
option tojsx-key
(#2316 @kaykayehnn)
Fixed
- Fix
no-did-mount-set-state
andno-did-update-set-state
to handle cDU and cDM defined as class properties (#1595 @jaaberg) - Fix
sort-prop-types
cash when a shape PropType is defined in a variable (#1749 @alexzherdev) - Fix
no-unused-state
false positive when using state of non-lifecycle method (#2274 @golopot) - Fix
static-property-placement
false 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-value
performance (#2259 @golopot) - Change
jsx-sort-props
to 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-props
fully fixable (#2250, @guliashvili) boolean-prop-naming
: addvalidateNested
option to validate shape prop names (#2234, @pawelnvk)- add
static-property-placement
rule (#2193, @dmason30) - add "detect" for flow version (#2233, @jedwards1211)
jsx-indent
: AddindentLogicalExpressions
option (#2227, @mdnsk)- add
jsx-props-no-spreading
(#2191, @ashbhir) no-string-refs
: AddednoTemplateLiteral
option (#2167, @jenil94)- add
linkComponents
setting (#2116, @gbakernet) jsx-no-target-blank
: add support forlinkComponents
setting (#2116, @gbakernet)- Add
state-in-constructor
rule (#1945, @lukyth) - Add
prefer-read-only-props
rule (#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
: addcheckAttributes
option for JSX attribute indentation (#2086, @jomasti)- Change allowed
propWrapperFunctions
setting values (#2065, @jomasti) - add
jsx-fragments
rule 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
: ensureallowInPropTypes
option 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-state
Don't depend on state parameter name (#1829, @alexzherdev)no-this-in-sfc
fix for class properties (#1995, @sergei-startsev)no-this-in-sfc
fix 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
propTypes
detection (#1946, @alexzherdev) - [Refactor] Extract
defaultProps
detection (#1942, @alexzherdev) - [Refactor] Extract required
propTypes
detection (#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 defaultignoreTranspilerName
value (#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-unsafe
rule (#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-spaces
rule (#1755 @ThiefMaster) - Add
first
option tojsx-indent-props
(#398 @ThiefMaster) - Add
enforceDynamicLinks
option tojsx-no-target-blank
(#1737 @kenearley)
Fixed
- Fix static lifecycle methods validation in
sort-comp
(#1793 @lynxtaa) - Fix crash in
no-typos
when 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-naming
when encountering a required shape prop type (#1791 @pcorpet)
7.8.1 - 2018-05-12
Fixed
- Fix crash in
no-deprecated
when 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
prevState
andnextState
tono-unused-state
(#1759) - Add warnings for
componentWillMount
,componentWillReceiveProps
andcomponentWillUpdate
lifecycle methods inno-deprecated
(#1750 @sergei-startsev)
Fixed
- Fix
no-typos
false positive on customPropType
classes (#1389 @brettdh) - Fix
boolean-prop-naming
to handle required props (#1389 @louisscruz) - Fix
jsx-curly-brace-presence
to allow whitespace JSX container (#1717 @sharmilajesupaul) - Fix
jsx-no-bind
to 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
: addallowInPropTypes
option (#1655 @iansu)- Add
jsx-max-depth
rule (#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-types
with recursive type annotations (#1653 @jetpacmonkey) - Fix
no-unknown-property
to properly recognizecrossOrigin
instead ofcrossorigin
, and allow it onlink
tags. (#1659 @jzDev) - Fix
no-access-state-in-setstate
to handle object spread (#1657 @ljharb)
7.6.0 - 2018-01-25
Added
- Add
forbid-dom-props
rule (#1562 @davazp) - Add
jsx-child-element-spacing
rule (#1515 @pfhayes) - Add
no-this-in-sfc
rule (#1435 @jomasti) - Add
jsx-sort-default-props
rule (#281 @b0gok) - Add
message
option toboolean-prop-naming
(#1588 @louisscruz) - Add
beforeClosing
option tojsx-tag-spacing
(#1396 @cjskillingstad) - Add
instance-methods
andinstance-variables
tosort-comp
(#599 @RDGthree) - Add
propWrapperFunctions
support forboolean-prop-naming
(#1478 @jomasti) - Add warning for
React.addons.TestUtils
inno-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-optimization
when encountering arrays with empty items as values in object (#1621 @kamataryo) - Fix crash in
no-unused-prop-types
when passing an empty function as a PropType (#1542 #1581 @kevinzwhuang) - Fix crash in
no-typos
when usingPropType.shape
without 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-state
to detect usage ofthis.state
as an object (#1572) - Fix
no-access-state-in-setstate
to detect when thestate
variable is destructured fromthis.state
(#1597 @jaaberg) - Fix
jsx-no-literals
to correctly find string literals part of BinaryExpressions (#1511 @jaaberg) - Fix
no-typos
false positive on custom propTypes with isRequired (#1607 @lfades) - Fix
prop-types
to check fornextProps
incomponentWillReceiveProps
(#1636 @xjmdoo) - Fix
no-unknown-property
to not pascal-casingcrossorigin
attribute and only allow it on script/img/video (#1642 @ljharb)
Changed
- Improve
jsx-wrap-multilines
auto fix (#1576 @sharmilajesupaul) - Export
defaultConfig
fromsort-comp
rule 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-bind
crash (#1543 @jomasti) - Fix
no-unused-prop-types
crash (#1542 @jomasti)
Changed
- Documentation improvements (#1546 @jseminck)
7.5.0 - 2017-11-18
Added
- Add
jsx-one-expression-per-line
rule (#1497 @TSMMark) - Add
destructuring-assignment
rule (#1462 @DianaSuvorova) - Add
no-access-state-in-setstate
rule (#1374 @jaaberg) - Add
button-has-type
rule (#1525 @Hypnosphi) - Add warnings for
React.DOM
factories inno-deprecated
(#1530 @backjo) - Add
sortShapeProp
option tosort-prop-types
(#1476 @jomasti) - Add
parens-new-line
option tojsx-wrap-multilines
(#1475 @jomasti) - Add
checkContextTypes
andcheckChildContextTypes
options toforbid-prop-types
(#1533 @jomasti) - Add
forbidDefaultForRequired
option torequire-default-props
(#1524 @jomasti) - Add new nodes support to
jsx-wrap-multilines
(#1384 @evgeny-petukhov)
Fixed
- Fix
jsx-curly-brace-presence
auto fix by bailing out when some chars exist (#1479 #1449 @jackyho112) - Fix
boolean-prop-naming
crash with Object spread (#1485 @track0x1) - Fix
no-unused-state
to correctly handle arrow function class method (#1363 @jackyho112) - Fix incompatibility with
typescript-eslint-parser
(#1496 @timothykang) - Fix
jsx-no-bind
to only warn for props and account for variable declaration (#1444 #1395 #1417 @jackyho112) - Fix
no-unused-prop-types
to handle props usage in custom prop validators (#1518 @petersendidit) - Fix
prefer-stateless-function
to account forcontextTypes
anddefaultProps
(#1521 @jomasti) - Fix
jsx-no-comment-textnodes
to not warn when using two slashes via html entities at the beginning of a literal (#1517 @jomasti) - Fix
default-props-match-prop-types
crash (#1499 @jomasti) - Fix
no-unused-prop-types
to handle props used in thesetState
update 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-presence
rule (#1310 @jackyho112) - Add support for Flow IntersectionTypeAnnotation to
prop-types
andno-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-types
andno-unused-prop-types
(#1381 @DianaSuvorova) - Add support for increment and decrement operations to
no-direct-mutation-state
(#1386 @zpao)
Fixed
- Fix
no-unused-state
to ignore computed property keys (#1361 @jackyho112) - Fix
no-typos
crash (#1406 @jseminck) - Fix
boolean-prop-naming
crash (#1409 @EvHaus) - Fix
prop-types
andno-unused-prop-types
crash with IntersectionTypeAnnotation (#1413 @jseminck)
Changed
7.3.0 - 2017-08-21
Added
Fixed
- Fix
boolean-prop-naming
crash (#1369 @EvHaus) - Fix
no-typos
crash (#1353 @jseminck) - Fix
require-default-props
stopping when it finds a component without props (#1380 @brgibson) - Fix
no-direct-mutation-state
detection with nested components (#1382)
Changed
- Documentation improvements (#1383 @mjomble)
7.2.1 - 2017-08-14
Fixed
- Fix
forbid-prop-types
crash on identifiers (#1352 @ljharb) - Fix
boolean-prop-naming
crash with propTypes wrapper (#1354 @dustinsoftware) - Fix
prop-types
false 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-state
rule (#1103 @wbinnssmith) - Add
boolean-prop-naming
rule (#1264 @EvHaus) - Add
no-typos
rule (#1189 @jseminck, #1294 @haridusenadeera) - Add auto fix for
jsx-sort-props
(#1273 @Overload119) - Add
getters
andsetters
groups tosort-comp
(#100 @RDGthree) - Add
noStrings
option tojsx-no-literals
(#1202 @deecewan) - Add inverse option for
always
/never
tojsx-boolean-value
(#1249 @ljharb)
Fixed
- Fix
no-direct-mutation-state
to disallowthis.state
mutation in constructor (#832 @burabure) - Fix
jsx-no-target-blank
crash on emptyrel
attribute (#1269 @dustinsoftware) - Fix
sort-comp
component detection withClassExpression
(#1076 @webOS101) - Fix
no-unused-prop-types
detection with async class properties and methods (#1053 @benstepp) - Fix
void-dom-elements-no-children
crash (#1226 @kokobeware) - Fix
no-danger-with-children
to ignore line breaks (#1262) - Fix
no-danger-with-children
crash with undefined (#1287) - Fix
jsx-no-target-blank
crash (#1296 @jseminck) - Fix
no-unused-prop-types
to no longer ignore components with no used props (#1303 @DianaSuvorova) - Fix
jsx-no-duplicate-props
crash (#969 @marcelmokos) - Fix
jsx-no-literals
false positives (#1301 @davidyorr) - Fix
no-find-dom-node
detection with named imports (#785 @Hypnosphi) - Fix proTypes-related rules detection with wrapped propTypes (#1266 @dustinsoftware)
- Fix
no-unused-prop-types
detection with propTypes wrapped in a function (#1253 @dustinsoftware) - Fix
no-unused-prop-types
detection with destructured use of properties (#816 @DianaSuvorova) - Fix
no-unused-prop-types
detection with inline functions (#1309 @DianaSuvorova) - Fix
no-unused-prop-types
skipShapeProps
option with Flow annotations (#1335 @DianaSuvorova) - Fix
jsx-curly-spacing
schema 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-types
rule (#1022 @webOS101) - Add
no-redundant-should-component-update
rule (#985 @jomasti) - Add
jsx-closing-tag-location
rule (#1206 @rsolomon) - Add auto fix for
jsx-max-props-per-line
(#949 @snowypowers) - Add support for lifecycle methods with
nextProps
/prevProps
inno-unused-prop-types
(#1213 @jseminck) - Add Flow SuperTypeParameters support to
prop-types
(#1236 @gpeal) - Add
children
option tojsx-curly-spacing
(#857 @fatfisz)
Fixed
- Fix
prefer-stateless-function
ignorePureComponents
option when using class expressions (#1122 @dreid) - Fix
void-dom-elements-no-children
crash (#1195 @oliviertassinari) - Fix
require-default-props
quoteddefaultProps
detection (#1201) - Fix
jsx-sort-props
bug withignoreCase
andcallbacksLast
options set totrue
(#1175 @jseminck) - Fix
no-unused-prop-types
false positive (#1183 #1135 @jseminck) - Fix
jsx-no-target-blank
to not issue errors for non-external URLs (#1216 @gfx) - Fix
prop-types
quoted Flow types detection (#1132 @ethanjgoldberg) - Fix
no-array-index-key
crash withkey
without 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-spacing
allowMultiline
option being undefined in some cases (#1179 @fatfisz) - Fix
jsx-curly-spacing
newline with object literals bug (#1180 @fatfisz) - Fix
prop-types
to not mark class static function as valid propTypes definition (#1174) - Fix
prop-types
crash with Flow spread operator (#1178) - Fix
void-dom-elements-no-children
crash on faultycreateElement
detection (#1101) - Fix
require-default-props
error message for quoted props (#1161)
Changed
7.0.0 - 2017-05-06
Added
- Add
no-will-update-set-state
rule (#1139 @ManThursday) - Add import and destructuring support to
no-deprecated
- Add
reservedFirst
option tojsx-sort-props
(#1134 @MatthewHerbst)
Breaking
- Update rules for React 15.5.0:
- Add warnings for
React.PropTypes
andReact.createClass
inno-deprecated
(#1148 @Calyhre) - Update
- Add warnings for