Open veillette opened 1 month ago
Assigning to @jonathanolson
Fails for me also, looks like it broke recently with our common work.
Looks like we ditched the previous config and started importing our root file.
https://github.com/phetsims/phet-vite-demo/commit/c0869e19df62415a57c1e6bf88f37ee634968be6
Let's see if I can bring back the old config in the new flat format.
I think it will be good to check in with @jonathanolson. It isn't clear to me how we want this repo being linted. The previous config didn't use any of the typescript plugins even though they are installed, and I'm curious if we can instead use shared packages to cut down on this kind of problem in the future (where "eslint" versions are hard coded in multiple package.json objects and so don't get updated correctly).
A couple notes for myself:
From our conversation with @samreid @jonathanolson today. Let's just revert back to eslint 8. This isn't too necessary or valuable.
npx eslint .
is now working with no problems. I will say I don't believe this is actually linting with any rules. It is up to @jonathanolson to determine what the lint config for this repo is, as we determined that it shouldn't use shared configuration.
I'm following the instructions as given on https://github.com/phetsims/phet-vite-demo/blob/main/README.md
My machine runs Windows 11 but I used WSL2 to run the various commands.
Everything runs as expected until the step #5 in linting.
After issuing the command
I get the following message
Oops! Something went wrong! :(
ESLint: 8.28.0
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
ESLint looked for configuration files in /home/veillette/phet-vite-demo/dist/assets and its ancestors. If it found none, it then looked in your home directory.
If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://eslint.org/chat/help
The message is clear on why the previous command failed, so now I run
At this point, though, the command line becomes interactive and prompts me with numerous questions that, as a novice, I am not sure how to answer in this situation.
✔ How would you like to use ESLint? · problems ✔ What type of modules does your project use? · esm ✔ Which framework does your project use? · none ✔ Does your project use TypeScript? · typescript ✔ Where does your code run? · browser The config that you've selected requires the following dependencies:
eslint, globals, @eslint/js, typescript-eslint ✔ Would you like to install them now? · No / Yes ✔ Which package manager do you want to use? · npm
added 139 packages, changed 1 package, and audited 296 packages in 4s
For a novice, it would be a better experience if this repo included an eslint.config.js file that would be appropriate.