Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 support? #21

Closed
tomek-he-him opened this issue Feb 24, 2015 · 13 comments
Closed

ES6 support? #21

tomek-he-him opened this issue Feb 24, 2015 · 13 comments

Comments

@tomek-he-him
Copy link

Hi, and first of all thanks for a great piece of code.

Have you considered adding support for ES6 files – run via babel or traceur?

It should be as simple as looking for import .+ from "<dependency>(/.+)?"; as well as require\("<dependency>(/.+)?"\);.

@juancabrera
Copy link

Running through the same issue. It's saying that some packages are not being used and actually they are. I'm also assuming this is because of the ES6 syntax.

As an example it's saying the package fluxible-plugin-routr is not in use, but actually its on a root file app.js, this is the syntax I'm using to load it.

import routrPlugin from 'fluxible-plugin-routr';

@rumpl
Copy link
Member

rumpl commented Mar 9, 2015

Hey guys,

I will look into it, ES6 support is definitely a must have.

Thanks for taking the time to write an issue.

@callum
Copy link

callum commented Apr 25, 2015

I wonder if a more versatile approach would be to allow piping via stdin, then it would be possible to do something like babel file.js | depcheck.

@dantman
Copy link

dantman commented May 16, 2015

I have this issue too. I started using React in my code recently. I run .es6 and .jsx files with babel so I can use JSX and ES6 functionality in some of my code.

My requires are still traditional require(...) calls. But because depcheck only looks for files ending in .js and parses ES3/ES5. Any module I only use in ES6/JSX code like require('classnames') is marked as not used.

I'm not using depcheck directly. Instead I'm using npm-check and this has an effect on that.

@bettiolo
Copy link

bettiolo commented Jun 3, 2015

👍 for es6 support in .js and .jsx

@lijunle
Copy link
Member

lijunle commented Jun 11, 2015

👍 here. :)

@lijunle
Copy link
Member

lijunle commented Jun 18, 2015

I think that the package detective-es6 can be leveraged to resolve this issue.

@geirsagberg
Copy link

+1 :)

@christophehurpeau
Copy link

👍

@lijunle
Copy link
Member

lijunle commented Jul 21, 2015

@rumpl I have implemented the support for ES6 in #29, could you please take a look?

@ngryman
Copy link

ngryman commented Aug 10, 2015

👍

@lijunle
Copy link
Member

lijunle commented Sep 19, 2015

Hi, all.

Because @rumpl don't response on my PR. I decide to publish my fork to NPM and rename to depcheck-es6. It is a drop-in replacement for depcheck package.

Modify your package.json to replace depcheck to depcheck-es6 and update your require or import statements.

Personally, besides ES6 support, I am proposing supports for JSX and gulp. If anybody have some ideas, please open an issue in my fork.

dylang pushed a commit to dylang/depcheck that referenced this issue Oct 14, 2015
Store syntax-error files to invalidFiles property.
@lijunle
Copy link
Member

lijunle commented Nov 4, 2015

Hi all, I am back. 😃

Depcheck-es6 is merged back to original depcheck now. I have released version 0.5.9 on depcheck package in NPM.

Thanks for @rumpl moving the repo under the org. I will continue to develop and maintain the project.

@lijunle lijunle closed this as completed Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants