Migrate from npm to yarn
I noticed that yarn package manager works much faster than the default npm. Also, yarn is used in the monorepo, so I propose to use it in this repo as well.
While changes delta in this PR is insane, there are only a few things were done:
- Move
./contracts/*to./contracts/contracts/*, update import paths in deploy scripts. - Add
contracts,deploy,upgradeworkspaces to the rootpackage.json - Remove npm's
package-lock.jsonfiles, generateyarn.lockby runningyarn install. As a side effect, this caused a lot of dependency updates. - Enable linting for
./deployand./upgrade, it was already configured previously, but was not run. - Run
yarn lint:js:fixandyarn lint:sol:fixto fix appeared lint errors. - Replace usages of
npmwithyarncommands in docs, scripts, Dockerfiles, etc.
Could you share ideas why previously the lint does not require such changes for the contracts?
why is it require to move contracts to ./contracts/contracts/ instead of ./contracts?
Could you share ideas why previously the lint does not require such changes for the contracts?
I think some linting rules were changed or added to the new version of solhint.
why is it require to move contracts to
./contracts/contracts/instead of./contracts?
That is the recommended way to use yarn workspaces, to keep each workspace code and dependencies in its own directory.