-
Notifications
You must be signed in to change notification settings - Fork 5
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
Configure eslint and prettiier #35
Conversation
This is great @technophile-04 , thank you!! I feel cleaner already haha Everything works great, except Husky. It's not working for me (I tried deleting node_modules and also doing a fresh install in a new folder). Is it because we are missing these scripts in package.json??
I see you added the |
Doesn't work for me too, also added
It installs script but still no error when commiting |
I tried to commit using vscode ui button and it didn't work. But after running looks like it runs script from |
Just pushed 2df5d82, could you all please try again Yarn v3 does not support "prepare" script, so we need to use "postinstall" as mentioned typicode/husky#1371 notice I didn't used "husky install" instead used just "husky" since v9 they updated this I just tried clone + yarn install + tweak cli.ts + git add + git commit and it worked in first try |
Thanks! It worked for me too Note: I tried to do the same here , not sure why it didn't work. Probably it's because of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Working for me too!! Thanks. Let's wait until @Pabl0cks can do a quick run on Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working fine!!
/ssd/workspace/create-eth/src/cli.ts
8:7 error 'x' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 1 problem (1 error, 0 warnings)
Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All commands worked nicely on Windows, GJ @technophile-04
And got the error nicely when trying to commit:
Thanks all ! Merging this 🙌 |
Description :
Tried keeping typescript-eslint rules inline with SE-2.
To test :
const x = 5
insrc/cli.ts
and try running :This will run pre-commit and hopefully it should fail (since x is unused variable)
cc @Pabl0cks, could you please test this on windows also once, because I remmember in SE-2 while configuring husky it was not working properly especially for windows.
New Commands :
To run lint :
or to fix all fixable errors:
yarn lint --fix
To format files with prettier :