question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create `prefer-to-*` rules for `jest-extended`

See original GitHub issue

There are a bunch of specific rules in https://github.com/jest-community/jest-extended which can be preferred.

I suggest we have rules suggesting their use. So e.g toBeFalse() over toBe(false) etc.

Should be clear in the docs that they are only if you use jest-extended.

/cc @mattphillips

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
SimenBcommented, Nov 25, 2017

Lerna setup isn’t too bad. I also noticed that lerna has built-in conventional commit support now, so we could probably automate a bunch of stuff around it (and maybe bring those learnings back into jest core)

0reactions
G-Rathcommented, Aug 27, 2022

I’m going to resolve this since we’ve now got eslint-plugin-jest-extended published 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint-plugin-jest-extended - GitHub
Recommended. This plugin does not export a recommended configuration, as the rules provided by this plugin are about enforcing usage of preferred matchers...
Read more >
jest-extended - npm
Start using jest-extended in your project by running `npm i jest-extended`. ... to Jest's default ones making it easy to test everything ...
Read more >
How to use ESLint with Jest - Stack Overflow
Here is a workaround (from another answer on here, vote it up!) for the "extend in overrides" limitation of eslint config :
Read more >
Eslint-plugin-jest NPM
This plugin also exports a configuration named style , which adds some stylistic rules, such as prefer-to-be-null , which enforces usage of toBeNull...
Read more >
Configuring Jest
You can retrieve Jest's defaults from jest-config to extend them if ... In order to make the negated glob work in this example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found