Problem/Motivation
Saving time on checking standards and practice before committing any code.
Drupal coding standard and Drupal Practice check should pass
PHPCS, PHPCBF for both --standard=Drupal and --standard=DrupalPractice
Check Varbase Total Control Dashboard Drupal coding standard
phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_total_control/ --ignore=/var/www/html/products/varbase_total_control/node_modules/ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_total_control/ --ignore=/var/www/html/products/varbase_total_control/node_modules/Check Varbase Total Control Dashboard Drupal Practice
phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_total_control/ --ignore=/var/www/html/products/varbase_total_control/node_modules/ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_total_control/ --ignore=/var/www/html/products/varbase_total_control/node_modules/
Proposed resolution
yarn eslint
yarn stylelint
yarn phpcs
yarn phpcbf
as
"scripts": {
"eslint": "node ./node_modules/eslint/bin/eslint.js --config=.eslintrc.json .",
"stylelint": "npx stylelint --config=.stylelintrc.json .",
"phpcs": "phpcs --standard=./.phpcs.xml .",
"phpcbf": "phpcbf --standard=./.phpcs.xml ."
},
Comments
Comment #3
rajab natshahFor the 8.x-6.x-dev branch
The inline commands
yarn phpcs
yarn phpcbf
yarn eslint
yarn stylelint
Comment #4
rajab natshahComment #7
rajab natshahFor the 9.0.x branch
gulp compile
The inline commands
yarn phpcs
yarn phpcbf
yarn eslint
yarn stylelint
Comment #8
rajab natshahComment #9
rajab natshahComment #10
rajab natshahComment #11
rajab natshahComment #12
rajab natshahComment #13
rajab natshah