Make sure you have a recent version of the ESLint extension.
Add the following to your User (all projects) or Workspace (specific project) settings (Select Code/Preferences/Settings and then search for "Code Actions On Save" and click the Edit in settings.json
link).
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},