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

lodestar-validator missing @chainsafe/lodestar-db dependency #1818

Closed
mpetrunic opened this issue Dec 3, 2020 · 3 comments
Closed

lodestar-validator missing @chainsafe/lodestar-db dependency #1818

mpetrunic opened this issue Dec 3, 2020 · 3 comments
Assignees

Comments

@mpetrunic
Copy link
Member

mpetrunic commented Dec 3, 2020

Describe the bug

Missing @chainsafe/lodestar-db dependency dependency in package.json

Expected behavior

For dependency to list and auto install.
We had eslint rule that was checking those things. Seems like it stopped working.

Steps to Reproduce

Screenshots

Desktop (please complete the following information):

  • OS:
  • Version:
  • Branch:
  • Commit hash:
@mpetrunic mpetrunic changed the title lodestar-validator missing @chainsafe/lodestar-dependency lodestar-validator missing @chainsafe/lodestar-db dependency Dec 3, 2020
@3xtr4t3rr3str14l 3xtr4t3rr3str14l self-assigned this Dec 3, 2020
@3xtr4t3rr3str14l
Copy link
Contributor

3xtr4t3rr3str14l commented Dec 4, 2020

so, i tried modifying the existing entry we have for import/no-extraneous-dependencies eslintrc.js in the monorepo root with the following:

"import/no-extraneous-dependencies": ["error", {
      "devDependencies": true,
      "optionalDependencies": false,
      "peerDependencies": false,
      "packageDir": ['./', '../../'],
    }],

as well as commenting out this line (in order to turn the rule back on):

"import/no-extraneous-dependencies": "off",

The above won't throw a linting error when @chainsafe/lodestar-db is missing from the package.json. However, when I tried to remove the @chainsafe/bls package from the lodestar-validator package.json, it did trigger a linting error for the above rule. BUT, when I tried to remove @chainsafe/lodestar-beacon-state-transition from package.json, it did not trigger a linting error.

So, it looks to me like we maybe we would have to modify the eslint rules somehow to allow monorepo sibling packages to be considered extraneous packages during linting, which I'm not sure how to do at the moment. I tried looking for a little bit, but couldn't find anything off hand. Open to suggestions if anyone knows how to do this.

We had eslint rule that was checking those things. Seems like it stopped working.

@mpetrunic , when you say this, do you mean that the eslint rule we used to have also checked for missing dependencies that are also monorepo sibling packages?

@mpetrunic
Copy link
Member Author

That plugin worked for that before.

devDependencies: true should only be set in test files.

I bet it's error with packageDir, potential solution:
import-js/eslint-plugin-import#1174 (comment)

@dapplion
Copy link
Contributor

Fixed

"@chainsafe/lodestar-db": "^0.17.0",

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

3 participants