Releases: testing-library/eslint-plugin-testing-library
Releases · testing-library/eslint-plugin-testing-library
v4.0.0
4.0.0 (2021-04-11)
Overview
eslint-plugin-testing-library
v4 brings the new Aggressive Reporting (an advanced mechanism to drastically improve reporting things related to Testing Library), 7 new rules, Shareable Configs updates, more consistent and flexible detection, and tons of bug fixes. You can follow this migrating to v4 guide.
BREAKING CHANGES
- Minimum ESLint version required is v7.5. Support from v5.X to v7.5 has been dropped
recommended
Shareable Config has been renamed todom
no-promise-in-fire-event
rule enabled indom
,angular
,react
andvue
Shareable Configsno-wait-for-empty-callback
rule enabled indom
,angular
,react
andvue
Shareable Configsprefer-screen-queries
rule enabled indom
,angular
,react
andvue
Shareable Configsno-container
rule enabled inangular
,react
andvue
Shareable Configsno-node-access
rule enabled inangular
,react
andvue
Shareable Configsrender-result-naming-convention
rule enabled inangular
,react
andvue
Shareable Configsno-debug
rule changed from "warning" to "error" inangular
,react
andvue
Shareable Configs- prefer-explicit-assert: option
customQueryNames
has been removed - no-debug: option
renderFunctions
has been removed - no-render-in-setup: option
renderFunctions
has been removed
Bug Fixes
- all rules detect things related to Testing Library (wrappers, variable references, custom imports, renamed utils) better and more consistently
- await-async-query: detect wrappers around async queries properly (#260)
- await-async-utils: detect wrappers around async utils properly (#263)
- await-fire-event: detect wrappers around fire event properly (#265)
- no-await-sync-events: report
type
andkeyboard
methods with 0 delay (#302) - no-debug: detect wrappers around
debug
properly (#295) - prefer-screen-queries: ignore queries coming from non-reportable renders
- prefer-screen-queries: improve error message (#320)
Features
- new Aggressive Reporting mechanism for detecting Testing Library imports, renders, utils, and queries (#237, #252, #260)
- new rule
no-container
(#177, #295) - new rule
render-result-naming-convention
(#200, #280, #282) - new rule
prefer-user-event
(#192, #251) - new rule
no-promise-in-fire-event
(#180, #266) - new rule
no-wait-for-side-effects
(#196, #300) - new rule
no-node-access
(#190, #237) - new rule
no-wait-for-multiple-assertions
(#189, #301) - new shared setting
testing-library/utils-module
(#239) - new shared setting
testing-library/custom-renders
(#280, #282)
Contributors
Huge thanks to @nickmccurdy @thebinaryfelix @timdeschryver @gndelia @renatoagds @MichaelDeBoey @thomaslombart for your contributions of all kind! v4 wouldn't be possible without you ❤️
v4.0.0-beta.6
v4.0.0-beta.5
v4.0.0-beta.4
4.0.0-beta.4 (2021-04-04)
Bug Fixes
v4.0.0-beta.3
v4.0.0-beta.2
4.0.0-beta.2 (2021-04-03)
Bug Fixes
- first round of bugfixes for v4 (7e9d5c5), closes #307 #304
- await-async-utils: reference correct node name (a8c1fe4)
- no-await-sync-query: avoid false positive from parent func (cac6670)
- no-wait-for-side-effects: report on each side effect node (93b81f5)
- prefer-find-by: simplify error message (82124af)
Features
- no-wait-for-multiple-assertions: report assertions (98448bb)
v4.0.0-beta.1
4.0.0-beta.1 (2021-03-28)
Bug Fixes
chore
Code Refactoring
Features
- add no-container rule #177 (86f9c84)
- add no-node-access rule (#190) (9d4c1e4)
- add no-side-effects-wait-for rule (#196) (91200b7)
- add prefer-user-event rule (#192) (9aa6730)
- add render-result-naming-convention rule (#200) (3b9d5b5)
- add rule no-multiple-assertions-wait-for (#189) (11d67b2)
- new setting for reported filename pattern (#244) (6abb4ee)
- no-container: setup new rule on index (094f53c)
- no-promise-in-fire-event: add new no-promise-in-fire-event rule (#180) (a4cc8d8)
- recommend no-wait-for-empty-callback (#168) (d8a2ac6)
- recommend prefer-screen-queries (#169) (58d72d5)
BREAKING CHANGES
- Minimum node version required is v10.22.1
- Minimum ESLint version required is 7.5.0. Support for ESLint between v5 and v7.4 has been dropped
recommended
config preset has been renamed todom
, so make sure to update it in your ESLint config file if you were usingrecommended
preset.no-wait-for-empty-callback
rule is automatically enabled if recommended, angular, react or vue config enabled. If you have any of those enabled, you could get new ESLint errors related to this rule after upgrading this plugin.prefer-screen-queries
rule is automatically enabled if recommended, angular, react or vue config enabled. If you have any of those enabled, you could get new ESLint errors related to this rule after upgrading this plugin.