Skip to content

Instantly share code, notes, and snippets.

@harisrozak
Last active June 9, 2022 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harisrozak/14df971393f373303b1d393ffb1f6a5c to your computer and use it in GitHub Desktop.
Save harisrozak/14df971393f373303b1d393ffb1f6a5c to your computer and use it in GitHub Desktop.
Install PHPCS and PHPCBF with WordPress Coding Standard on Visual Studio Code for Windows 11

Install PHPCS and PHPCBF with WordPress Coding Standard on Visual Studio Code for Windows 11

Sample setting.json for PHPCS and PHPCBF extensions

{
    "files.eol": "\n",
    "phpcs.standard": "WordPress",
    "phpcs.executablePath": "C:\\Users\\Haris\\AppData\\Roaming\\Composer\\vendor\\bin\\phpcs",
    "phpcs.composerJsonPath": "C:\\Users\\Haris\\AppData\\Roaming\\Composer\\composer.json",
    "phpcbf.standard": "WordPress",
    "phpcbf.executablePath": "C:\\Users\\Haris\\AppData\\Roaming\\Composer\\vendor\\bin\\phpcbf.bat",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment