Problem/Motivation

Saving time on checking standards and practice before committing any code.

#3113179: Drupal 9 compatibility for [Varbase Layout Builder] 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 Layout Builder Drupal coding standard

phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/node_modules/"

phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/node_modules/"

Check Varbase Layout Builder Drupal Practice

phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/node_modules/"

phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/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 ."
  },

Full test after fixing all standard on stylelint
And eslint for Background Videos
Click to watch the video
Test Varbase Layout Builder test with media backgrounds

Comments

RajabNatshah created an issue. See original summary.

  • RajabNatshah committed e974719 on 8.x-1.x
    Issue #3173443: Add yarn script commands for Drupal coding standard and...
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • RajabNatshah committed 1ca67b6 on 8.x-1.x
    Issue #3173443: Add yarn script commands for Drupal coding standard and...
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-8.8.7, +varbase-9.0.0

The Inline commands

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/node_modules/"
rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/node_modules/"

No fixable errors were found

Time: 2.45 secs; Memory: 20MB
rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/varbase_layout_builder/ --ignore="/var/www/html/products/varbase_layout_builder/node_modules/ , /var/www/html/products/varbase_layout_builder/themes/claro/node_modules/"

gulp compile

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ gulp compile
[12:01:57] Using gulpfile /var/www/html/products/varbase_layout_builder/gulpfile.js
[12:01:57] Starting 'compile'...
[12:01:57] Finished 'compile' after 261 ms
rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn phpcs
yarn run v1.22.5
$ phpcs --standard=./.phpcs.xml .
Done in 1.69s.

yarn phpcbf

yarn phpcbf

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn phpcbf
yarn run v1.22.5
$ phpcbf --standard=./.phpcs.xml .

No fixable errors were found

Time: 994ms; Memory: 18MB

Done in 1.07s.

yarn eslint

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn eslint
yarn run v1.22.5
$ node ./node_modules/eslint/bin/eslint.js --config=.eslintrc.json .
Done in 1.96s.

yarn stylelint

rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn stylelint
yarn run v1.22.5
$ npx stylelint --config=.stylelintrc.json .
Done in 2.54s.
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Assigned: Unassigned » rajab natshah
Status: Fixed » Needs review

Big Pipe Process Place holder Replacement

Cannot access 'onPause' before initialization
rajab natshah’s picture

Status: Needs review » Active

  • RajabNatshah committed 0530343 on 8.x-1.x
    Issue #3173443: Add yarn script commands for Drupal coding standard and...
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Status: Active » Needs review
rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn phpcs
yarn run v1.22.5
$ phpcs --standard=./.phpcs.xml .
Done in 2.09s.


rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn phpcbf
yarn run v1.22.5
$ phpcbf --standard=./.phpcs.xml .

No fixable errors were found

Time: 992ms; Memory: 18MB

Done in 1.07s.


rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn eslint
yarn run v1.22.5
$ node ./node_modules/eslint/bin/eslint.js --config=.eslintrc.json .
Done in 1.41s.


rajab@vardot-dev:/var/www/html/products/varbase_layout_builder$ yarn stylelint
yarn run v1.22.5
$ npx stylelint --config=.stylelintrc.json .
Done in 2.77s.
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes

Full test after fixing all standard on stylelint
And eslint for Background Videos
Click to watch the video

rajab natshah’s picture

Status: Needs review » Fixed

  • RajabNatshah committed dbb3850 on 8.x-1.x
    Issue #3173443: Add yarn script commands for Drupal coding standard and...
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes

  • RajabNatshah committed fe44624 on 8.x-1.x
    Issue #3173443: Add yarn script commands for Drupal coding standard and...
rajab natshah’s picture

Issue tags: +varbase-9.0.0-alpha1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.