Difference between codeActionsOnSave and formatOnSave in VS Code Difference between codeActionsOnSave and formatOnSave in VS Code typescript typescript

Difference between codeActionsOnSave and formatOnSave in VS Code


I'm trying to get my VS Code to run ESLint and Prettier together properly as well.

Then VSCode 1.44 (March 2020) would highlight another difference between codeActionsOnSave and formatOnSave:

Explicit ordering for editor.codeActionsOnSave

You can now set editor.codeActionsOnSave to an array of code actions to execute in order. You can use this to guarantee that a specific code action is always run before or after another one that may conflict with it

The following editor.codeActionsOnSave will always run Organize Imports followed by Fix All once organize imports finishes:

"editor.codeActionsOnSave": [    "source.organizeImports",    "source.fixAll"]