Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Also test dependencies #90

Open
ghost opened this issue Feb 11, 2019 · 1 comment
Open

Also test dependencies #90

ghost opened this issue Feb 11, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 11, 2019

Requested Update

It would be handy if es-check could also check all required/imported files as well. I tried to run es-check es5 ./dist/index.js and it said it was no matching errors, but when I included my module in a react-app in complained that one of my dependencies was not in ES5.

Why Is This Update Needed?

To make sure the entire module and not a single file is in ES5.

Are There Examples Of This Requested Update Elsewhere?

Read about references issues here. Provide paragraph text responses to each header.

@Artoria2e5
Copy link

Artoria2e5 commented Nov 5, 2019

depcheck has some magic inside that ends up generating a list of packages used. That may help.

But do note that knowing what packages are used is not enough, as not all files in a package are used when a module is imported. There has to be at least some parsing of their respective package.json to figure out the actual files to lint.

The fact that modules can be dynamically imported makes things even harder to deal with, as evidenced by "smart" code that chooses between a transpiled ES5 version and the original by some feature test with try/catch on a new Function(). Well, maybe we should just follow AMD and refuse to pick one on those.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant