Following this answer, I installed my local dependency like this:
{
"private": true,
"dependencies": {
"my_dependency": "../relative/path/to/my_dependency"
}
}
my_dependency
depends on ESLint and its plugins:
{
"name": "my_dependency",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.25.0",
"@typescript-eslint/parser": "5.25.0",
"eslint": "8.16.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-node": "11.1.0"
},
If I install my_dependency
as a path, eslint
and it's plugins are not installed in ./node_modules
, therefore eslint
CLI is not available.
However, if I publish my_dependency
on npm and install it as package name and version,
{
"private": true,
"dependencies": {
"my_dependency": "0.0.0"
}
}
eslint
and all plugins will be added in ./node_modules
.
How to get the same effect for the local dependency?
I don't want to pollute npm registry with versions just for experiment each time I make changes in my_dependency
.