I am facing this issue in Visual Studio Code. I have already tried reinstalling the phpcs extension but still facing this issue.
Unable to locat
My solution without the need to install php_codesniffer globally.
Just go to VSCode settings and define the local path ./vendor/squizlabs/php_codesniffer/bin/phpcs
./vendor/squizlabs/php_codesniffer/bin/phpcs
Or you can set the path directly in your settings.json
settings.json
"phpcs.executablePath": "./vendor/squizlabs/php_codesniffer/bin/phpcs"