svizzle icon indicating copy to clipboard operation
svizzle copied to clipboard

Various linting tasks

Open mindrones opened this issue 2 years ago • 0 comments

We need to find or write eslint plugins for various problems we got so far:

  • we should never be able to commit if in the @svizzle/foo package we import from @svizzle/foo itself, to avoid circular dependencies
  • we would like to know when we have unused dependencies in a package.json: seems like there's no rule for this but we could probably use depcheck's API in a script like packages/tools/utils/src/bin/check_exports.js that would return process.exit(1); if unused deps are found
  • we would like to know if we have dead/unused code in our codebase
  • we would like to know if there are exported symbols:
    • in files that are not exported by the package
    • that are not being imported internally
  • we would like to know if:
    • there are devDependencies that are in fact dependencies (bad because the package might not eventually work)
    • and viceversa (bad because users would install unnecesary deps)
  • we would like to know if we're exporting duplicate symbols (e.g.)

Possibly useful:

  • https://github.com/sweepline/eslint-plugin-unused-imports

mindrones avatar Dec 07 '22 10:12 mindrones