You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BONUS POINTS: If you wish to help us debug further, the depcheck --json option will show more information. Check here in the README for documentation on json output.
{"dependencies":["randomcolor"],"devDependencies":[],"missing":{},"using":{"depcheck":["/workspaces/workspace/package.json"]},"invalidFiles":{"/workspaces/workspace/index.js":"SyntaxError: Unexpected token (4:3)\n at constructor (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:351:19)\n at FlowParserMixin.raise (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:3281:19)\n at FlowParserMixin.unexpected (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:3301:16)\n at FlowParserMixin.parseExprAtom (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:10991:16)\n at FlowParserMixin.parseExprAtom (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:6829:20)\n at FlowParserMixin.parseExprSubscripts (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:10607:23)\n at FlowParserMixin.parseUpdate (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:10590:21)\n at FlowParserMixin.parseMaybeUnary (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:10568:23)\n at FlowParserMixin.parseMaybeUnaryOrPrivate (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:10422:61)\n at FlowParserMixin.parseExprOps (/workspaces/workspace/node_modules/@babel/parser/lib/index.js:10427:23)"},"invalidDirs":{}}
The text was updated successfully, but these errors were encountered:
Eprince-hub
changed the title
False positive with multi-line comment inside curly brackets of JSX expression
False positive with colon in multi-line comment
May 17, 2024
Bug Description
Depcheck reports an unused dependency when there is a colon inside a multi-line comment
Code snippets
Where the dependency is used:
Where the dependency is listed in package.json:
Using a colon inside a single-line comment or in a ternary shows no false positive
Versions
node -v
: v20.12.0npm -v
: 10.5.0depcheck --version
: 1.4.7Extra info
Repro link: https://codesandbox.io/p/devbox/serverless-browser-g3trm3
BONUS POINTS: If you wish to help us debug further, the
depcheck --json
option will show more information. Check here in the README for documentation on json output.The text was updated successfully, but these errors were encountered: