humanmade / coding-standards

Human Made coding standards for modern code
https://engineering.hmn.md/how-we-work/style/
154 stars 19 forks source link

Peer dependency range is uninstallable on @humanmade/eslint-config #301

Open roborourke opened 1 year ago

roborourke commented 1 year ago

Installing via npm v9, output here:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: altis-accelerate@undefined
npm ERR! Found: babel-eslint@10.1.0
npm ERR! node_modules/babel-eslint
npm ERR!   babel-eslint@"^10.0.0" from the root project
npm ERR!   peer babel-eslint@"^10.0.0" from @humanmade/eslint-config@1.1.3
npm ERR!   node_modules/@humanmade/eslint-config
npm ERR!     @humanmade/eslint-config@"^1.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer babel-eslint@"9.x" from eslint-config-react-app@3.0.8
npm ERR! node_modules/eslint-config-react-app
npm ERR!   eslint-config-react-app@"^3.0.0" from the root project
npm ERR!   peer eslint-config-react-app@"^3.0.5" from @humanmade/eslint-config@1.1.3
npm ERR!   node_modules/@humanmade/eslint-config
npm ERR!     @humanmade/eslint-config@"^1.0.0" from the root project
tomjn commented 1 year ago

We get this on our client project at the moment and have to add —force which does the job. I’ve been hoping to set aside time to look into it but the status of the repo and version releases isn’t obvious

kadamwhite commented 1 year ago

Might make sense to at minimum do this: https://github.com/humanmade/coding-standards/issues/252 and try to remove / "bake in" any of the standards we use, so that it's a flatter tree of "here's some rules and here's the plugins that enable them."

kadamwhite commented 1 year ago

https://github.com/wikimedia/vegalite-wordpress-plugin/blob/main/.eslintrc.js I actually did something similar here, where I "rendered" all the computed rules to a single eslintrc and then removed the dependencies on the other standard. That leaves only eslint itself and the associated plugins as our dependencies https://github.com/wikimedia/vegalite-wordpress-plugin/blob/main/package.json#L49-L55

I'd love to see us fix this, and get these dependencies updated so they install properly on Node 16 / 18 / and up