• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

benmosher / eslint-plugin-import / 3682 / 28
81%
master: 94%

Build:
Build:
LAST BUILD BRANCH: flowtype-wrong-import
DEFAULT BRANCH: master
Ran 17 Feb 2020 08:45PM UTC
Files 1
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Feb 2020 08:36PM UTC coverage: 94.737%. Remained the same
PACKAGE=resolvers/node

Pull #1660

travis-ci

web-flow
no-unused-modules: support dynamic imports

This is still work in progress but I'd like to receive initial thoughts
on this implementation before I proceed.

This introduces support of dynamic imports for a rule
`no-unused-modules`.

So far only "await" form is implemented:

```js
const a = await import("a")
```
is equivalent to default import
```js
import a from "a"
```

```js
const {a,b,c} = await import("a")
```
is equivalent to named imports
```js
import {a,b,c} from "a"
```

Support import('name').then(a) and import('name').then({a,b,c}) to be
addded soon.

TODO/Open questions

- [ ] Existing code is relying on the fact that all imports/reexports
happen at top level of the file while dynamic import can happen anywhere -
that's why I had to implement visitor against visitor keys of the parser
myself not very happy about it - but couldn't figure out quickly how to
use existing visitor (if any?) supplied by a parser.
I also learned that different parsers have visitor keys defined in
different places so this has to be dealt with as well.
Pull Request #1660: no-unused-modules: support dynamic imports

3 of 4 branches covered (75.0%)

18 of 19 relevant lines covered (94.74%)

3.16 hits per line

Source Files on job 3682.28 (PACKAGE=resolvers/node)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 28361590
  • Travis Job 3682.28
  • 15367e30 on github
  • Prev Job for PACKAGE=resolvers/node on no-unused-modules-dynamic-imports (#3681.28)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc