Closed MattPereira closed 3 months ago
Ohh strange, I tried it with git clone
and npx create-eth@latest
and it seems to work for me in vscode and neovim too :
Maybe something to do with you vscode eslint extension?
Could you tell more on what extension are using and also which IDE are you using?
IDE is the latest version of Vscode 1.91.1
To get even more weird my nextjs/.eslintrc.json
file is complaining about the typescript rules, even tho the file hasn't been touched in 9 months :thinking:
Tried uninstalling to isolate both extensions but still riding the struggle bus :smiling_face_with_tear:
The linter for older scaffold builds I'm maintaining all work fine
As far as I know I haven't changed any settings recently
Not using any .vscode
folder and I try to keep my user settings.json
light and simple
{
"workbench.colorTheme": "Atom One Dark",
"workbench.iconTheme": "vscode-icons",
"window.titleBarStyle": "custom",
"editor.fontFamily": "Fira Code",
"workbench.settings.applyToAllProfiles": ["editor.fontFamily"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.fontLigatures": true,
"solidity.telemetry": false,
"github.copilot.enable": {
"*": true,
"plaintext": false,
"markdown": false,
"scminput": false,
"solidity": true
},
"editor.guides.bracketPairs": true,
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
},
"vsicons.dontShowNewVersionMessage": true,
"github.copilot.editor.enableAutoCompletions": true,
"editor.quickSuggestionsDelay": 1,
"window.zoomLevel": 2,
"errorLens.enabled": true,
"window.customTitleBarVisibility": "auto"
}
Prolly not cool enough to switch to make the switch to neovim yet :rofl:
But very open to using a different extension if there are recommendations
Hey @MattPereira !
Thanks for reporting this! It doesn't work for me too, but I didn't even notice it 😄 since unused vars have less opacity and it's enough for me
Played with it a bit, and a simple solution that helped me is to remove "plugin:prettier/recommended"
from .eslintrc.json
+ restart vscode
Possible cause:
eslint-plugin-prettier
can conflict with other pluginsI will create PR with eslint config update next days, waiting for eslint-plugin-prettier
to fix deprecated types.
I have this for a long time too, but it's just a warning :). Will fix it
Hey @rin-st!
Thanks for the assistance! :pray:
Unfortunately removing "plugin:prettier/recommended"
from .eslintrc.json
causes this linter complaint at the top of every file
And also blocks commits with linter turned on :smiling_face_with_tear:
It doesn't work for me too, but I didn't even notice it 😄 since unused vars have less opacity and it's enough for me
I think there are other benefits besides just the unused imports / vars. The linter being broken blocks out all warnings including missing dependencies in complex useEffect
hooks
And if you miss a single warning the linter check will fail in the github action, which is a small annoyance requiring an extra commit to fix :melting_face:
It doesn't work for me too, but I didn't even notice it 😄 since unused vars have less opacity and it's enough for me
I think there are other benefits besides just the unused imports / vars. The linter being broken blocks out all warnings including missing dependencies in complex
useEffect
hooksAnd if you miss a single warning the linter check will fail in the github action, which is a small annoyance requiring an extra commit to fix 🫠
This worked for me, since it's eslint
, not typescript-eslint
.
Please check https://github.com/scaffold-eth/scaffold-eth-2/pull/904 . Is it working for you?
It doesn't work for me too, but I didn't even notice it 😄 since unused vars have less opacity and it's enough for me
I think there are other benefits besides just the unused imports / vars. The linter being broken blocks out all warnings including missing dependencies in complex
useEffect
hooksAnd if you miss a single warning the linter check will fail in the github action, which is a small annoyance requiring an extra commit to fix 🫠
I agree!
IDE is the latest version of Vscode 1.91.1
@MattPereira could you try upgrading the version to 1.92.0
? Also could paste the details of your vs code? You could get them by doing :
cmd + shift + p and then search for "About", click "Help:About" it should show you an modal with all details.
I am using vscode 1.92.0
and it seems to work for me, so not sure how to reproduce it :(
Ohh also could share your node version from vscode terminal by doing node --version
? And if its v20 could you try downgrading to v18? (Since I have v18 and everything works for me)
Here are my details :
I have same details, but no underlines
for both node 18/20 (not sure it changes something)
Here are my details :
I have same details, but no underlines
for both node 18/20 (not sure it changes something)
I have the same details, but no warnings at all.
@technophile-04
It's really painful. Could you please fix this as quickly as possible? I'm scared to use react hooks especially useEffect
. :(
Version: 1.93.0-insider (user setup) Commit: 39d98602020ddefe53ed217a8c50b9040673a737 Date: 2024-08-05T05:03:45.159Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631
No warnings on my side as well.
And node --version
v22.5.1
Same here. No warnings but same details on hover
Versión: 1.92.0 (user setup) Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124 Date: 2024-07-31T23:26:45.634Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 SO: Windows_NT x64 10.0.19045
Node v20.11.0
No warnings here!
Version: 1.91.1 Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729 Date: 2024-07-09T22:08:12.169Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Linux x64 5.4.0-190-generic
Node v18.17.1
Still no luck after switching to node v18 and restarting vscode
My VS Code Details
Version: 1.92.0 Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124 Date: 2024-07-31T23:26:45.634Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Linux x64 6.5.0-45-generic
[ pool-creator ] $ node --version v20.11.1 [ pool-creator ] $ nvm use 18 Now using node v18.18.2 (npm v9.8.1)
And still no luck after switching to node v18 and restarting vscode
As far as I'm concerned, VS code version or node version does not have to do with this issue. This has to be fixed code-wise. cc @technophile-04
Could you please fix this issue as quickly as possible since I've paused using scaffold-eth-2
for this reason?
cc @MattPereira
Just update on this, was debugging with @MattPereira and seems like #875 is the culprit if he checks out to #869 i.e after clonning the main repo and then doing :
git checkout a78be8761e1d039218cccf57d60a4de56261d859 && yarn install
It does seem to solve the problem for him.
Would love if you guys could test it out.
Also if it doesn't work then maybe #904 would the way to go it seems
Thanks all! Closing this since it was solved in #905
Which method was used to setup Scaffold-ETH 2 ?
git clone, npx create-eth@latest
Current Behavior
Linter not working so i dont get squigles warning me of unused variables, imports, ect.
I do still get blocked from committing and get warnings explained when the lint script runs
Expected Behavior
Here is what it looks like on older version of scaffold when Linter works without error
Steps To Reproduce
Happens instantly with fresh clone and fresh npx create-eth@latest
Anything else?
The ESLint error logs