Add yarn script commands for Drupal coding standard and Drupal Practice for Web Editor

Created on 9 August 2023, about 1 year ago
Updated 8 June 2024, 3 months ago

Problem/Motivation

Drupal coding standard and Drupal Practice check should pass

PHPCS, PHPCBF for both --standard=Drupal and --standard=DrupalPractice

Check Web Editor Drupal coding standard

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

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

Check Web Editor Drupal Practice

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

phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/webeditor/ --ignore=/var/www/html/products/webeditor/node_modules/

Proposed resolution

yarn phpcs
yarn phpcbf
yarn lint:yaml

as

  "scripts": {
    "phpcs": "phpcs --standard=./.phpcs.xml .",
    "phpcbf": "phpcbf --standard=./.phpcs.xml .",
    "lint:yaml": "node ./node_modules/eslint/bin/eslint.js --config=.eslintrc.json --ext .yml ."
  },

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Merge request, Patch, or Commit
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release webeditor-10.0.0

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

📌 Task
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan Shaimaa Natshah

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024