Answer the question
In order to leave comments, you need to log in
How to properly configure phpcs to work with WordPress in Visual Code?
An error appears in the editor:
phpcs: Referenced sniff "PHPCompatibility" does not exist
$ phpcs -i
The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress-VIP
"phpcs.standard": "WordPress",
Answer the question
In order to leave comments, you need to log in
I installed and added PHPCompatibility to CodeSniffer.conf. After that, the phpcs plugin started swearing that "Referenced sniff "PHPCompatibility.PHP.RemovedExtensions" does not exist"...
I spent the whole day on this, but then I found the phpcs.xml file in my theme, made on the basis of underscores. dist - in which this deprecated PHP.RemovedExtensions was. I deleted the phpcs.xml.dist file from the theme folder - the plugin stopped swearing, validation worked as it should.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question