ESLint plugin for Jest. If you installed ESLint globally then you must also install eslint-plugin-jest globally. Add jest to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix. The rules provided by this plugin assume that the files they are checking are test-related. This means it's generally not suitable to include them in your top-level configuration as that applies to all files being linted which can include source files. Since we cache the automatically determined version, if you're linting sub-folders that have different versions of Jest, you may find that the wrong version of Jest is considered when linting. You can work around this by providing the Jest version explicitly in nested ESLint configs.

Features

  • This plugin exports a recommended configuration that enforces good testing practices
  • This plugin also exports a configuration named style
  • If you want to enable all rules instead of only some you can do so by adding the all configuration to your .eslintrc config file
  • See ESLint documentation for more information about extending configuration files
  • You can use overrides to have ESLint apply additional rules to specific files
  • Aliased Jest globals

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow eslint-plugin-jest

eslint-plugin-jest Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of eslint-plugin-jest!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

TypeScript

Related Categories

TypeScript Source Code Analysis Tool

Registered

2022-10-21