Check Standards/Practice Coding And Linting
Following with the Drupal core Coding standards
All Varbase components have a list of ready tools and script commands. That is to help contributors on the step of checking standards.
Please make sure to run the check and linting commands while contributing a new feature or a fix patch/MR.
Specifically, there are two rule sets,
Drupal
and DrupalPractice
.Before starting to check the code using
phpcs
or phpcbf
Follow with steps from Drupal.org docs on Installing Coder Sniffer
Check Drupal standard and practice coding.
yarn phpcs
Fix many errors and warnings automatically.
yarn phpcbf
Check all
.yml
files with Drupal standard yaml
format.yarn lint:yaml
Check all JavaScript
.js, .json
files with Drupal standard scripting format.yarn lint:js
Check all styling
.css
files with Drupal standard styling format and order.yarn lint:css
Last modified 1yr ago