Inline script commands in package.json are ignored
See original GitHub issueReopening #257
When a dependency is only used inside parenthesis of another command in package.json scripts, depcheck marks this dependency as unused. e.g.:
"scripts": {
"start": "concurrently \"cross-env BROWSER=none yarn browser\" \"wait-on http://localhost:3000 && electron .\""
},
"devDependencies": {
"concurrently": "^3.5.1",
"cross-env": "^5.1.6",
"wait-on": "^2.1.0"
}
Here, cross-env and wait-on are marked as unused.
This problem also happens with husky and jest
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Inline script commands in package.json are ignored · Issue #672 ...
Reopening #584 and #257 When a dependency is only used inside parenthesis of another command in package.json scripts, depcheck marks this dependency as ......
Read more >Sending command line arguments to npm script - Stack Overflow
Sending a command line argument to an npm script ... having them appended to the end, then inline environment variables seem to work...
Read more >npm-run-script
Description. This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts.
Read more >Configuring ESLint - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Configuration options | Yarn - Package Manager
Files matching the following patterns (in terms of relative paths compared to the root of the project) will be ignored by the yarn...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using
cross-env
in scripts is a common usecase depcheck doesn’t catch so the parentheses real or imaginary, do not seem to matter. Somewhat more simple example for a script:This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.