WPCS with Visual Studio Code

  1. https://github.com/tommcfarlin/phpcs-wpcs-vscode
  2. https://wpbeaches.com/set-up-composer-and-phpcodesniffer-on-visual-studio-code-on-macos/

After setting the WPCS well, if we want to format the code with shortcut key according to WordPress coding standard, we’ll need to follow the instruction below –

  1. Install the PHPCBF extension.
  2. Set the phpcbf executable path.
  3. Set the shortcut key.

    My user settings are like –