WPAA-Coding-Standards Custom linting and coding standards for WordPress with VSCode. |
|
A FOSS (Free & Open Source Software) project developed by Ahmad Awais. | |
Follow Ahmad's #FOSS work on GitHub @AhmadAwais β Say Hi on Twitter @MrAhmadAwais | π |
# Custom WordPress Coding Standards by Ahmad Awais
Custom linting and coding standards for WordPress with VSCode.
For having these standards you need to install a couple of things like Composer, PHPCS, WordPress Coding Standards. Run the following commands.
# Make ~/bin dir.
cd ~ && mkdir bin && cd bin
# Download Composer.
curl -s http://getcomposer.org/installer | php
# Clone PHPCS, WPCS, and this repo.
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs
git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs
git clone https://github.com/ahmadawais/wpaa-coding-standards.git wpaa
# Inslall composer, phpcs, and phpcbf.
sudo ln -s ~/bin/composer.phar /usr/local/bin/composer
sudo ln -s ~/bin/phpcs/bin/phpcs /usr/local/bin/phpcs
sudo ln -s ~/bin/phpcs/bin/phpcbf /usr/local/bin/phpcbf
# Set phpcs configuration for wpcs and wpaa.
phpcs --config-set installed_paths /Users/$USER/bin/wpaa/WPAA,/Users/$USER/bin/wpcs
And then go to VSCode, install phpcs extension and then go to settings β + , and add the following settings. Finally reload.
// Setting for phpcs.
"phpcs.executablePath": "/usr/local/bin/phpcs",
"phpcs.standard": "WPAA",
Hello, we're the WordPress Couple!
I (Ahmad Awais) am a Full Stack Web Developer and a regular core contributor at WordPress. My significant other (Maedah Batool) is a Technical Project Manager, and she's also a WordPress Core Contributor. Together with our team, we run the WPCouple.com.
If you'd like to get insights into our love for open source software, professional full stack development, WordPress community, the growth of JavaScript or growing a family, building, and bootstrapping a business, then subscribe to our premium newsletter called β£ The WordPress Takeaway!
If you'd like us to keep producing professional free and open source software (FOSS). Consider paying for an hour of my dev-time. We'll spend two hours on open source for each contribution. Yeah, that's right, you pay for one hour and get both of us to spend an hour as a thank you.
- π $99.99 β Support for one hour or more β
- π° $49.99 β Support half an hour maintenance β
- βοΈ $9.99 β Buy us lunch or coffee to keep us trucking #OpenSource β
Project Backers & WPCouple Partners β‘οΈ
This FOSS (free and open source software) project is updated and maintained with the help of awesome businesses listed below. Without the support from these amazing companies/individuals, this project would not have been possible.
β What/How? Read more about it β
MIT Β© Ahmad Awais. Thanks to Composer, PHP/WordPress/WDS Coding Standards.