From 55c412590e6a6b187b4778492ae1d9f8d2a44c5e Mon Sep 17 00:00:00 2001 From: Matthew Brabham Date: Mon, 13 Nov 2023 16:29:20 -0800 Subject: [PATCH] Add Dev dependencies for Code quality. Update code quality --- composer.json | 20 +++++++++++++++++++- osu_custom_blocks.module | 4 +--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index ab82902..57eb581 100644 --- a/composer.json +++ b/composer.json @@ -10,5 +10,23 @@ } ], "minimum-stability": "stable", - "require": {} + "scripts": { + "cs": "phpcs", + "cs-checkstyle": "phpcs -q --report=checkstyle", + "phpcs": "phpcs", + "cbf": "phpcbf", + "phpcbf": "phpcbf", + "twigcs": "twigcs --twig-version=2" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "squizlabs/php_codesniffer": "^3.7", + "drupal/coder": "^8.3", + "friendsoftwig/twigcs": "^6.2" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + } } diff --git a/osu_custom_blocks.module b/osu_custom_blocks.module index 428c85f..2971736 100644 --- a/osu_custom_blocks.module +++ b/osu_custom_blocks.module @@ -5,11 +5,9 @@ * Primary module hooks for OSU Custom Blocks module. */ -use Drupal\block\Entity\Block; - /** * Implements hook_page_attachments(). */ function osu_custom_blocks_page_attachments(array &$page) { $page['#attached']['library'][] = 'osu_custom_blocks/osu-custom-blocks'; -} \ No newline at end of file +}