Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
js-tools: Add missing eslint plugin dep (#21642)
Eslint "sharable configs" are supposed to peer-depend on any plugins they need. But people usually forget this because npm hoisting makes it usually work anyway. In this case, eslint-config-wpcalypso was missing a peer dep on eslint-plugin-react-hooks. This happened to work before because eslint-changed was shelling out to eslint, which runs from `node_modules/.pnpm/eslint@7.32.0/node_modules/eslint`, which was picking up the dep from `node_modules/.pnpm/node_modules` that even pnpm puts in place to handle crap like this. When #21606 switched eslint-changed to use eslint's API instead of shelling out, it doesn't run from within `node_modules/.pnpm/` anymore (because eslint-changed is in the monorepo), so `node_modules/.pnpm/node_modules` is no longer in node's path, so it no longer would find the plugin. The solution is to add the missing plugin to js-tools's deps, because `tools/js-tools/node_modules` will still be in the path with the way we have things set up.
- Loading branch information