fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.72k stars 700 forks source link

Getting "Parse errors in imported module 'react-toastify'" when used with "eslint-plugin-import": "2.30.0" #1154

Closed corneliusroemer closed 2 months ago

corneliusroemer commented 2 months ago

When upgrading "eslint-plugin-import" from "2.29.1" I suddenly get an error for react-toastify.esm.mjs:

Error while parsing /codebuild/output/src262100263/src/actions-runner/_work/loculus/loculus/website/node_modules/react-toastify/dist/react-toastify.esm.mjs
Line 4, column 0: Unknown token at 15458, expected: "}", actual: ""
`parseForESLint` from parser `/codebuild/output/src262[10](https://github.com/loculus-project/loculus/actions/runs/10779022293/job/29891619759?pr=2732#step:6:11)0263/src/actions-runner/_work/loculus/loculus/website/node_modules/astro-eslint-parser/lib/index.js` is invalid and will just be ignored

/codebuild/output/src262100263/src/actions-runner/_work/loculus/loculus/website/src/layouts/BaseLayout.astro
Error:   3:32  error  Parse errors in imported module 'react-toastify': parser.parse is not a function (undefined:undefined)  import/no-deprecated

see https://github.com/loculus-project/loculus/actions/runs/10779022293/job/29891619759?pr=2732#step:6:10

I don't know enough about react-toastify and eslint-plugin-import and JS/TS in general to know where the error lies.

Discovered in this dependabot PR: https://github.com/loculus-project/loculus/pull/2732

corneliusroemer commented 2 months ago

Hmm, can't reproduce anymore - sorry for the noise.