Closed Shankhanil closed 4 years ago
I have having some failed checks. Can you tell me how can I resolve them? @nadchif
I have having some failed checks. Can you tell me how can I resolve them? @nadchif
Try the following in your terminal.
To see what the errors are, run
npm test
To automatically fix some of the errors, you can run
eslint --fix
If errors comeback after fixing, check to see if your IDE has a "format code on save" enabled, and disable it temporarily.
please feel welcome to let me know if you need further assistance
@Shankhanil I refactored your src/convertors/MD5.js file. Please check it and test. Comment back here if you are satisfied, and I will merge the file.
Seems fine to me, pls go ahead with the merge. @nadchif
UPDATE: Pls let me try out the hack you mentioned in comment on issue #8. If that works out, we can throw away this HUGEEE code, and replace with a better and a more reliable one.
Sure no problem. I will wait for you to tell me to go ahead with the merge.
Although, we will still be by importing the crypto-js code too. Check out the module's folder lib/crypto-js
@nadchif I have made the changes, and have commited it. But the tests are failed due to formatting error. Can you pls help me refactor the code. After the refactor, the code will be fully ready for merge.
Great work 👏 👏
Now, please run eslint --fix ./src/*
in the root folder.
After that run npm test
to see exactly why the tests are failing. You will see something like this:
@nadchif It's funny why I am facing these failed checks. When I am running the tests on my local computer, they seem absolutely fine. Just let me know how to refactor my code, I shall do it myself from the next commits
I also don't know why this could be happening to you. To view the details of the failures online you can see the task here https://github.com/nadchif/adobe-brackets-encode-decode/actions/runs/82247800
On how to refactor and fix? I did it just as mentioned above. I ran eslint --fix ./src/*
and then fixed all the failures
Yes, I run eslint --fix ./src/*
and, it is giving me an error on line crypto.MD5()
saying that a function can not begin with a capital letter.
Here is the error
16:25 error A function with a name starting with an uppercase letter should only be used as a constructor new-cap
Nice!!! You're almost there 😁 add the following right at the top of your src/MD5.js
file
/* eslint-disable new-cap */
Cool. it's done!!! @nadchif . Go ahead and review the code. if it's good to go, you can merge it. I also understood why the tests were failing. It'll not be a problem from the next commit. Thanks for your help
Yoooohoooo 👏 Awesome work. Thank you for your contribution. @all-contributors please add @Shankhanil for code and ideas
@nadchif
I've put up a pull request to add @Shankhanil! :tada:
I have introduced String ---> MD5 encoder.
Upcoming contributions: Implementing MD5 with CryptoJS module, to provide a more reliable way of hashing.
@nadchif