New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESLint upgrade needed #312
Labels
Comments
Hi, tools like linter are not expected to be installed globally. Support for ESLint v9 is tracked in this PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
ESLint recently upgraded to v9.x. This brought big changes with itself, including changing the default name of the config file to
eslint.config.js
; any other name that worked until now is deprecated, including.eslintrc.cjs
: source.Now, whenever I generate a project with
npm create vite@latest
and choose React and TypeScript with SWC (although I think the issue would still stand if I chose anything with React) I am greeted with the same.eslintrc.cjs
file. Given that I have ESLint v9 downloaded globally to my machine, when I run the task from a terminal it will try to run it with my linter, not the one that was specified in thepackage.json
file. I am well aware that if the package would not be installed on my machine it would run perfectly fine, but the project should also be upgraded, since the versionvite-plugin-react
uses is deprecated.The error I am getting is irrelevant as it offers no real explanation as to why this is happening, but I will paste it here anyway:
Reproduction
vite.new/react
Steps to reproduce
Run
npm i -g eslint
to install ESLint globally. This installs v9.x.After, run
npm run lint
in the project folder. You will see the error message I dropped above, because of the version mismatch.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: