svizzle
svizzle copied to clipboard
Various linting tasks
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 usedepcheck
's API in a script likepackages/tools/utils/src/bin/check_exports.js
that would returnprocess.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
export
ed 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 factdependencies
(bad because the package might not eventually work) - and viceversa (bad because users would install unnecesary deps)
- there are
- we would like to know if we're exporting duplicate symbols (e.g.)
Possibly useful:
- https://github.com/sweepline/eslint-plugin-unused-imports