How to specify path(like npm --prefix) in npx?

Viewed 3114

This is my folder structure:

project/
└── test_cases
    └── package.json

The working dir is project/. I want to run eslint (an npm package) from working dir. I dont wish to cd into test_case. I install the same package from work dir by
sudo npm install --prefix test_cases/.

Theres no such option for npx. npx eslint from working dir downloads from the internet. I want to run them from the test_cases dir. Help!

1 Answers
Related