@popcodeorg/eslint-import-resolver-jest
馃儚 Jest import resolution plugin for eslint-plugin-import
Last updated a year ago by popcodeorg .
MITRepositoryBugsOriginal npmTarballpackage.json
$ cnpm install @popcodeorg/eslint-import-resolver-jest 
SYNC missed versions from official npm registry.

eslint-import-resolver-jest

Greenkeeper badge

"I like my testutils where I can see 'em" ????????鈥嶁檧锔

CircleCI

If you're using jest and you have installed custom name mappings in your config via the moduleNameMapper config and you're using the wonderful eslint-plugin-import you might get yelled at by eslint:

grafik

(I oftentimes create an alias for the helpers I use for testing)

Let's fix this!

yarn add eslint-import-resolver-jest -D

or

npm i eslint-import-resolver-jest -D

If you are using the package.json config option from jest everything should _just work_鈩.

If you are using a separate config file for jest using the --config option you have to point this plugin to it, too (in your .eslintrc):

"settings": {
  "import/resolver": {
    "jest": {
      "jestConfigFile": "./jest.conf.json"
    }
  }
}

That's it!

Note

It will only resolve the modules in your test files that you specified via testRegex or testMatch in your jest config.

Contributing

Create issues in this repo or get active yourself:

yarn test # npm test works, too

License

MIT

Current Tags

  • 2.1.1-popcode.1                                ...           latest (a year ago)

1 Versions

  • 2.1.1-popcode.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 漏 taobao.org |