[Bug] Plugin scorecard linter cannot resolve internal deps in monorepos

Tried to apply Obsidian Community plugin type check on a monorepo, and it produced catastrophically huge chunks of false positive warnings, mostly @typescript-eslint/no-unsafe-* warnings.

(the image above only shows part of the false positives)

Observation:

All the @typescript-eslint/no-unsafe-* warnings point to monorepo packages that have another internal package as dependency.

Since the type checker doesn’t link or build internal dependencies when checking, all exports from that internal package become /* unresolved */ any, which makes Eslint think all types are any, thus it reports false positives for almost all places that import something from an internal package.

On local machine, running eslint-plugin-obsidianmd doesn’t have this issue since deps are wired correctly in local environment.

Suggestion:

  1. Allow plugins to define a command (e.g. postinstall) and execute that command before linting.
  2. Or, silence those warnings on any packages that shows unresolved.

Having the same issue as well. Any good workarounds?

I reported this to Obsidian Discord: the post.

And Obsidian team already has this internal FR to allow plugins’ postinstall (where we can build necessary internal packages). But this FR is not yet implemented since the linter still reports false positives even with postinstall.

A conceptual workaround would be like:

  1. Commit compiled types to repo (bad practice)
  2. Name those d.ts files to *.test.d.ts. (worse practice, but works, otherwise the linter will check types in those files and produce even more absurd warnings. You can use this to bypass linting on any files by the way)

I tried to commit the types but those files themselves cause warnings and there isn’t a way to exclude them.

In this way you can avoid scanning on any files.