Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to work with sibling packages #302

Open
dietergeerts opened this issue Jun 26, 2020 · 1 comment
Open

Unable to work with sibling packages #302

dietergeerts opened this issue Jun 26, 2020 · 1 comment

Comments

@dietergeerts
Copy link

When reporting a bug, please include:

  • A little info about your environment

    • npm-package-json-lint version: 5
    • npm version: 6.14.5
    • node version: 12.18
  • The output from npm-package-json-lint

> npmPkgJsonLint ../

path should be a `path.relative()`d string, but got "../client-app-todo/package.json"
npm ERR! Test failed.  See above for more details.

Process finished with exit code 1
  • What you expected to happen
    That a relative path going upwards works, as I have a mono-repo with rush, where all packages are siblings. I have packages that do linting and testing, and they do this for their siblings.

  • The steps to reproduce the problem
    Use sibling packages, and set the glob to going up on level.

@dietergeerts
Copy link
Author

dietergeerts commented Jun 26, 2020

As a workaround, I updated my script to:

    "test": "cd .. && npmPkgJsonLint ./*/package.json --configFile ./tools-linting-npm-package-json-lint/.npmpackagejsonlintrc.json"

But as you see, then you need to do "tricks", and your IDE will not help you anymore.
I could also place the config file in the root of the mono-repo, but that feels weird as the purpose of that one package is to run and configure the linting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant