Problem/Motivation
Saving time on checking standards and practice before committing any code.
#3113172: Drupal 9 compatibility for [Varbase Email] with Drupal coding standard and practice
Drupal coding standard and Drupal Practice check should pass
PHPCS, PHPCBF for both --standard=Drupal and --standard=DrupalPractice
Check Varbase Email Drupal coding standard
phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_email/ --ignore=/var/www/html/products/varbase_email/node_modules/ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_email/ --ignore=/var/www/html/products/varbase_email/node_modules/Check Varbase Email Drupal Practice
phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_email/ --ignore=/var/www/html/products/varbase_email/node_modules/ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_email/ --ignore=/var/www/html/products/varbase_email/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 #2
rajab natshahComment #3
rajab natshahComment #4
rajab natshahComment #6
rajab natshahThe inline commands
yarn phpcs
yarn phpcbf
yarn eslint
yarn stylelint
The issue
59:25 ✖ Unknown word CssSyntaxErrorIt's the
direction: {{ dir }};in the twig filehttps://git.drupalcode.org/project/varbase_email/-/blob/8.x-6.x/template...
Comment #7
rajab natshahComment #8
rajab natshahComment #9
rajab natshahComment #10
rajab natshah