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

Created on 8 August 2023, about 1 year ago

Problem/Motivation

Drupal coding standard and Drupal Practice check should pass

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

Check Web Security Drupal coding standard

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

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

Check Web Security Drupal Practice

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

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

  • Issue created by @Shaimaa Natshah
  • 🇯🇴Jordan Shaimaa Natshah

    Problem/Motivation

    Drupal coding standard and Drupal Practice check should pass

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

    Check Web Security Drupal coding standard

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

    Check Web Security Drupal Practice

    phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/websecurity/ --ignore=/var/www/html/products/websecurity/node_modules/
    
    phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/websecurity/ --ignore=/var/www/html/products/websecurity/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 ."
      },
    
  • Issue was unassigned.
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024