Skip to content

Commit 42c3595

Browse files
committed
Added prettier to coding standards checks
1 parent 6bdd574 commit 42c3595

8 files changed

Lines changed: 22 additions & 244 deletions

File tree

.markdownlint.jsonc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.markdownlintignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config/

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: '3'
22

3-
dotenv: [".task.env", ".env"]
3+
dotenv: [".env.task", ".env"]
44

55
tasks:
66
template-prune:

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"drupal/core-project-message": "^11.2",
2828
"drupal/core-recommended": "^11.2",
2929
"drupal/hook_event_dispatcher": "^4.2",
30-
"itk-dev/itkdev-base-theme": "dev-feature/add-files",
30+
"itk-dev/itkdev_base_theme": "dev-feature/add-files",
3131
"drush/drush": "^13.2"
3232
},
3333
"require-dev": {
@@ -95,8 +95,7 @@
9595
},
9696
"patches": {
9797
"drupal/core": {
98-
"Add an Autowire trait for plugins (https://www.drupal.org/project/drupal/issues/3294266)": "https://www.drupal.org/files/issues/2023-08-18/3294266-24.patch",
99-
"Disable forced configuration langcode (https://www.drupal.org/project/drupal/issues/3150540)": "https://www.drupal.org/files/issues/2024-08-06/3150540-43-MR9103-11.x.diff"
98+
"Add an Autowire trait for plugins (https://www.drupal.org/project/drupal/issues/3294266)": "https://www.drupal.org/files/issues/2023-08-18/3294266-24.patch"
10099
}
101100
},
102101
"drupal-core-project-message": {

deploy-templates/README.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Readme for {PROJECTNAME}
22

3-
Create/edit `.task.env` and set a custom [`docker compose`](https://docs.docker.com/compose/) command if needed, e.g.
3+
Create/edit `.env.task` and set a custom [`docker compose`](https://docs.docker.com/compose/) command if needed, e.g.
44

55
``` shell
66
# .env.task
7-
TASK_DOCKER_COMPOSE="docker compose --env-file .env.docker.local --file=docker-compose.server.yml --file=docker-compose.server.override.yml"
7+
TASK_DOCKER_COMPOSE=itkdev-docker-compose
88
```
99

1010
## Build assets
@@ -56,40 +56,21 @@ open "http://$(docker compose port nginx 8080)"
5656
Export config created from drupal:
5757

5858
```shell
59-
itkdev-docker-compose drush config:export
59+
task drush -- config:export
6060
```
6161

6262
Import config from config files:
6363

6464
```shell
65-
itkdev-docker-compose drush config:import
65+
task drush -- config:import
6666
```
6767

6868
### Coding standards
6969

70-
```shell name=coding-standards-composer
71-
task compose -- exec phpfpm composer install
72-
task compose -- exec phpfpm composer normalize
70+
```shell name=coding-standards-check
71+
task code:check
7372
```
7473

75-
```shell name=coding-standards-php
76-
docker compose exec phpfpm composer install
77-
docker compose exec phpfpm composer coding-standards-apply/phpcs
78-
docker compose exec phpfpm composer coding-standards-check/phpcs
79-
```
80-
81-
```shell name=coding-standards-twig
82-
docker compose exec phpfpm composer install
83-
docker compose exec phpfpm composer coding-standards-apply/twig-cs-fixer
84-
docker compose exec phpfpm composer coding-standards-check/twig-cs-fixer
85-
```
86-
87-
```shell name=code-analysis
88-
docker compose exec phpfpm composer install
89-
docker compose exec phpfpm composer code-analysis
90-
```
91-
92-
```shell name=coding-standards-markdown
93-
docker run --platform linux/amd64 --rm --volume "$PWD:/md" peterdavehello/markdownlint markdownlint $(git ls-files *.md) --fix
94-
docker run --platform linux/amd64 --rm --volume "$PWD:/md" peterdavehello/markdownlint markdownlint $(git ls-files *.md)
95-
```
74+
```shell name=coding-standards-apply
75+
task code:apply-standards
76+
```

deploy-templates/Taskfile.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: '3'
22

3-
dotenv: [".task.env", ".env"]
3+
dotenv: [".env.task", ".env"]
44

55
vars:
66
DOCKER_COMPOSE: '{{ .TASK_DOCKER_COMPOSE | default "docker compose" }}'
@@ -53,11 +53,17 @@ tasks:
5353
- task compose -- exec phpfpm vendor/bin/phpcs --standard=phpcs.xml.dist
5454
- task compose -- exec phpfpm vendor/bin/phpstan analyse --configuration=phpstan.neon
5555
- task compose -- exec phpfpm vendor/bin/twig-cs-fixer lint web/themes/custom/*/templates
56-
- docker run --rm --volume "$PWD:/md" itkdev/markdownlint *
56+
- docker compose run --rm prettier '**/*.{yml,yaml}' --check
57+
- docker compose run --rm prettier 'web/themes/custom/**/js/**/*.js' --check
58+
- docker compose run --rm prettier 'web/themes/custom/**/css/**/*.{css,scss}' --check
59+
- docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md'
5760

5861
code:apply-standards:
5962
desc: Apply coding standards to php, twig and markdown files
6063
cmds:
6164
- task compose -- exec phpfpm vendor/bin/phpcbf --standard=phpcs.xml.dist
6265
- task compose -- exec phpfpm vendor/bin/twig-cs-fixer lint web/themes/custom/*/templates --fix
63-
- docker run --rm --volume "$PWD:/md" itkdev/markdownlint * --fix
66+
- docker compose run --rm prettier '**/*.{yml,yaml}' --write
67+
- docker compose run --rm prettier 'web/themes/custom/**/js/**/*.js' --write
68+
- docker compose run --rm prettier 'web/themes/custom/**/js/**/*.js' --write
69+
- docker run --rm --volume "$PWD:/md" itkdev/markdownlint '**/*.md' --fix

deploy-templates/pr.yml

Lines changed: 0 additions & 167 deletions
This file was deleted.

0 commit comments

Comments
 (0)