Background: when the team was developing with VSCode, there were no auto-fixes, resulting in uneven or even conflicting code, so we ensured that everyone’s code was somewhat consistent by using a uniform eslint configuration and auto-fixes when saving code.

Step 1: Search for the plugin: ESLint while it is enabled

Step 2: append configuration: settings.json (search in VSCode Settings)

{..."editor.codeActionsOnSave": {"source.fixAll.eslint":true},... }Copy the code

Step 3: Try saving it in your code and it will automatically fix

At the end

That’s enough for you to share. If you have any questions, please leave them in the comments section