Dependency clashes
simmo opened this issue · comments
Describe the bug
Package conflicts can be seen now dependencies are no longer peer-dependencies.
To Reproduce
Install v3 of @zonedigital/eslint-config-react to a project built with create react app. Version clash may happen with the version of eslint that CRA installs vs version installed by Zone config.
Expected behavior
Packages should not conflict.
Additional context
We should revert to using peer dependencies. We could use the @zonedigital/jarvis installer script via NPX to install peer dependencies in a project. The main hurdle would be getting the installer to workout what the target package already has installed.
My thoughts are that we should separate config from installation, that is what NPM/Yarn are for.
Maybe look at using 5.x
version format for peer deps
Just had this issue again when installing to a fresh React project.
Where our React config installs the base and base installs eslint, eslint-compat etc, the react config (and vscode) then complains the packages are missing or mismatched. It expects the react config to explicitly install eslint as well as base... and in theory you may still need to install tot the project to get eslint to use your local version. 🤯
So I think I'm going to revert back to using peer dependencies, but with a looser version range.
@sburrows-zone Any objections? The jarvis installer will still allow an easy (interactive 😄) install path.