Jest: Make linting zero configuration too

Created on 3 Feb 2017  ·  8Comments  ·  Source: facebook/jest

Do you want to request a feature or report a bug?
Request a feature

What is the current behavior?
It's absent for some reason 😂


Jest replaced 5 testing modules I used in every project (mocha, chai, istanbul, proxyquire, sinon, ...).
Jest integration with Babel is seamless.

To make it even more "zero configuration", it would be awesome to integrating linting too. It's okay to use any opinionated linting rules.

Feature request

Make developers to avoid installing eslint, eslint-config-airbnb, eslint-plugin-react into every project.
Make linting zero configuration too.


The best practice tell us to modularise all the things. But this idea seem logical as to me.

Most helpful comment

Jest will ship with eslint-plugin-jest in the next version, which at least takes care of lint rules for tests. Testing is usually considered as separate from linting, so people are right: this is outside of the scope of Jest. I appreciate you brought this up – if you have more ideas on how Jest can help engineers write more correct code, please reach out again.

All 8 comments

ember-cli does the same thing.

Isn't linting outside of the scope of testing?

yep this seems weird for me. But ember-cli running linter first on module that testing and the test file itself and then running tests. Don't know why they did it

Maybe because linting and unit testing are inside the scope of code quality?

ember-cli and jest are fundamentally different things. ember-cli is a tool for simplifying development of Ember applications. Linting and testing are parts of developing Ember applications. jest is a testing framework. Linting is not a part of testing.

Sorry, looks like I misread the frontpage

Zero configuration testing platform
Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated “zero-configuration” experience. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn results in more stable and healthy code bases.

  • I was thinking that Jest is not a framework but a platform.
  • Also I thought it's designed to test JavaScript code. I thought that "testing code" also includes "checking quality of code, style of the code, stupid typos of the code" etc.

I'm agree with @wtgtybhertgeghgtwtg . create-react-app is the place to combine all the stuff and it's already including eslint

Jest will ship with eslint-plugin-jest in the next version, which at least takes care of lint rules for tests. Testing is usually considered as separate from linting, so people are right: this is outside of the scope of Jest. I appreciate you brought this up – if you have more ideas on how Jest can help engineers write more correct code, please reach out again.

Was this page helpful?
0 / 5 - 0 ratings