aprilsamy1 You are getting this error because of Eslint for this you can install Eslint extension in VScode to detect errors and solve them or you can also use command
eslint --fix will fix every rule violation it is capable of fixing, actually overwrite the code, and print out any warnings or errors it was incapable of fixing.
After fixing those warnings that you are getting in the terminal you will be able to commit
Ok yash i will try and update you soon
Hey @aprilsamy1, first of all, you have to follow dco rules for the commit that is using
git commit -s and then write your commit-msg.
Secondly can you tell in which files you have done changes according to the screenshot
can you try
eslint --fixwith git bash in given screenshot seems like you are running it in powershell or cmd
also eslint extension is responsible for showing error directly inside vscode by adding red underline in code it has nothing to do with
Yes ! I was running in terminal of vscode but i was try in bash but showing eslint : command not found
@aprilsamy1 the lint is failing your commit because of the extra spaces which is not shown in IDE. You can instead use a text editor to remove that extra spaces and then make the commit. If it still gives you the same error I suggest you to commit the change to your own repo first and edit the codebase there.
So lets get you unblocked one at a time.
As @Yash.Sharma suggested you have to run eslint to fix those issues automatically or you can solve them one by one by following the suggestions provided in the console.
To solve automatically you can use either of the two commands:
npm run lint
npx eslint . --fix(
eslint . --fix, will only work if you have eslint installed as global package, since you haven’t try
npx eslint . --fix)
If you are annoyed with the red markers in the UI for no reason, you can disable eslint from the visual studio code, the code when you commit will automatically be linted with the configuration provided in the meshery-ui so you don’t have to worry.
Edited the answer, after I got to know that your concern is related to layer5 UI and not meshery-ui
Thanks to all and special thanks for @Abhi 1st one work for me so i commited and raise a pr #3946
But getting this warning can you elaborate this what is it ?
From here you can take on google to ask some of these questions