Linting in wordpress
https://github.com/createandcode/wordpress-linting
https://github.com/createandcode/wordpress-linting/blob/master/phpcs.xml
https://github.com/createandcode/wordpress-linting/blob/master/stylelint.config.js
PHP: https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/
HTML: https://make.wordpress.org/core/handbook/best-practices/coding-standards/html/
CSS: https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/
JS: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/
Setup WordPress PHP linting
1.) Install PHP depending on your system.
1.) Install PEAR
Hint: run 'php βini' in terminal to find where php.ini file is.
On Mac, in php.ini file make sure you add `include_path='/usr/local/pear/share/pear/'`
run which pear to see that PEAR has the right path.
1.) Install node
1.) Install nvm
1.) Install git
1.) Install phpcs and phpcbf with `pear install PHP_CodeSniffer` and `phpcs -i` should work in terminal
Install WordPress Coding Standards
cd ~/DEV/WPDEV/ git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs phpcs --config-set installed_paths ~/DEV/WPDEV/wpcs phpcs --config-set default_standard WordPress
Setup WordPress JS Linting
IF you use Eslint here is how to install:
`npm install βsave-dev eslint eslint-config-wordpress` may need to do `-g` for global