-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
No dependencies are detected in files using optional chaining #291
Comments
Thanks for the report @haggholm. I did a bit of digging around that plugin: Our current parser is Babylon@6.1.21, which does not support the As of Babel@7, Babylon was renamed to @babel/parser, which does support the So the solution is for us to update |
Would be awesome to get this in 👏 |
@mnkhouri If there weren’t so many things broken all over the place by the Babel transition—and if the Babel 7 transition weren’t compelled by React Native—I’d at least like to think of myself that I’d whip up a PR. But in actual reality, there’s no realistic chance by the weekend. :P |
Fixed by #307 |
Bug Description
If a file contains the optional chaining proposal
object?.optionalProperty
, parsing appears to fail and no dependencies are detected in the file.Code snippets
Where the dependency is used:
Where the dependency is listed in package.json:
The dependency is not listed in
package.json
(in my sample scenario, it doesn’t contain any dependencies at all).Expected outcome:
Actual outcome: No output/nothing detected.
Versions
node -v
: v10.4.0npm -v
: 6.1.0depcheck -v
: No output, it doesn’t seem to recognise the-v
flag. However, the version is 0.6.11.Extra info
depcheck --json
I tried to add
'optionalChaining'
to the list of plugins indepcheck/dist/jsx.js'
, but this appeared to have no effect.The text was updated successfully, but these errors were encountered: