Visual Studio Code: Unable to locate phpcs
I had the same issue, I did the following to fix it:
Install the phpcs by using composer with
composer global require squizlabs/php_codesniffer
Press
Command + ,
(Click Code -> Preferences -> Settings)- Select User Settings and locate '
PHP CodeSniffer
' Scroll to '
Executatble Path
' and put/Users/your-username/.composer/vendor/bin/phpcs
This fixed the issue for me, I hope it does for you too. Cheers!
open the project in the terminal and run this command
composer global require squizlabs/php_codesniffer
Hope that helps!