I'm developing npm packages. I publish them to internal nexus npm repository. I publish everything (for the time being, just for simplicity). So after installation, node_modules/my_package
has everything like in development, including tslint.json
file and *.ts
files.
Now when I run ng lint
from application that is using my_package
it is finding tslint.json
in node_modules/my_package
and starts linting from node_modules/my_package
level. Because devDependencies
are not installed (one of them is codelyzer
, I get error:
Failed to load C:\Dev\angular-2-poc\Angular2-POC\demo-app\node_modules\my_package\ui\tslint.json: Could not find custom rule directory: node_modules/codelyzer
If I remove tslint.json
from node_modules\my_package
, it is not throwing this error any more, but it is still linting node_modules\my_package
. And because linting rules for may be different between my_package
and application that is using it, I'm getting errors.
Anyway, is this correct behavior of ng lint
(I'm using @angular/cli: 1.1.0
), I mean why it goes into node_modules
at all?