You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the package.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 version vite-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:
npm run lint
> backend@0.0.0 lint
> eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0
Invalid option '--ext' - perhaps you meant '-c'?
You're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details.
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.
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: