datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
89 stars 12 forks source link

eslint-config-react-app cannot be run with newer versions of eslint #385

Open fgregg opened 1 month ago

fgregg commented 1 month ago

Running docker build on a fresh new-django-app template fails with:

8.556 npm error code ERESOLVE
8.558 npm error ERESOLVE unable to resolve dependency tree
8.558 npm error
8.558 npm error While resolving: my-new-app@0.0.0
8.558 npm error Found: eslint@9.12.0
8.558 npm error node_modules/eslint
8.558 npm error   dev eslint@"^9.12.0" from the root project
8.558 npm error
8.558 npm error Could not resolve dependency:
8.558 npm error peer eslint@"^8.0.0" from eslint-config-react-app@7.0.1
8.558 npm error node_modules/eslint-config-react-app
8.558 npm error   dev eslint-config-react-app@"^7.0.1" from the root project
8.558 npm error
8.558 npm error Fix the upstream dependency conflict, or retry
8.558 npm error this command with --force or --legacy-peer-deps
8.558 npm error to accept an incorrect (and potentially broken) dependency resolution.

it looks like eslint-config-react-app has not been updated for two years.

eslint-plugin-react is already installed, so i'm not surew what else eslint-config-react-app is doing for us.

fgregg commented 1 month ago
"eslint-plugin-flowtype": "^8.0.3",

also conflicts with newer version of eslint

as does

"eslint-plugin-react-hooks": "^4.6.2",
hancush commented 1 month ago

An unfortunate side effect of two different cookiecutters. We've already made this move in the Wagtail cookiecutter: https://github.com/datamade/how-to/blob/main/docker/templates/new-wagtail-app/%7B%7B%20cookiecutter.app_name%20%7D%7D/package.json

hancush commented 1 month ago

Actually, NVM.

hancush commented 1 month ago

Safe to remove config-create-react-app, IMO. I would suggest running npm-check-updates to upgrade and hopefully resolve dependency conflicts: https://www.npmjs.com/package/npm-check-updates