From abd5a578259386c70ea7950830d9d38f74fde920 Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Thu, 9 May 2024 13:00:49 +0400 Subject: [PATCH] chore: prettier --- .github/workflows/deploy.yml | 19 ++++-- .github/workflows/high_content_volume.yml | 8 ++- .github/workflows/merge_dev_to_stage.yml | 2 +- .github/workflows/test.yml | 12 +++- .../workflows/test_without_turbo_cache.yml | 4 +- apps/cms/scaffold/all.services.yml | 8 +-- .../netlify/functions/github-proxy.mts | 7 ++- docker-compose.yml | 11 ++-- packages/drupal/gutenberg_blocks/css/edit.css | 6 +- .../gutenberg_blocks.gutenberg.yml | 2 +- .../gutenberg_blocks.info.yml | 2 +- .../gutenberg_blocks.libraries.yml | 1 - .../ui/src/components/Atoms/Container.css | 5 +- packages/ui/src/iframe.css | 60 ++++++++++--------- pnpm-workspace.yaml | 8 +-- 15 files changed, 90 insertions(+), 65 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9e9897278..83587e7ac 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,11 +23,15 @@ jobs: - name: Extract branch name shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + run: + echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> + $GITHUB_OUTPUT id: extract_branch - name: Prepare deployment package - run: pnpm turbo:prep && pnpm deploy --filter "@custom/website" ../deploy --prod + run: + pnpm turbo:prep && pnpm deploy --filter "@custom/website" ../deploy + --prod env: VITE_DECAP_REPO: ${{ github.repository }} VITE_DECAP_BRANCH: ${{ steps.extract_branch.outputs.branch }} @@ -54,7 +58,10 @@ jobs: - name: Deploy to dev run: pnpm netlify deploy --prod --filter "@custom/website" working-directory: ../deploy - if: github.ref == 'refs/heads/dev' && steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID != '' + if: + github.ref == 'refs/heads/dev' && + steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_DEV_ID + != '' env: NETLIFY_SITE_ID: ${{ vars.NETLIFY_DEV_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} @@ -62,8 +69,10 @@ jobs: - name: Deploy to prod run: pnpm netlify deploy --prod --filter "@custom/website" working-directory: ../deploy - if: github.ref == 'refs/heads/prod' && steps.netlify-check.outputs.available == 'true' && vars.NETLIFY_PROD_ID != '' + if: + github.ref == 'refs/heads/prod' && + steps.netlify-check.outputs.available == 'true' && + vars.NETLIFY_PROD_ID != '' env: NETLIFY_SITE_ID: ${{ vars.NETLIFY_PROD_ID }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - diff --git a/.github/workflows/high_content_volume.yml b/.github/workflows/high_content_volume.yml index 02edab017..88bbda211 100644 --- a/.github/workflows/high_content_volume.yml +++ b/.github/workflows/high_content_volume.yml @@ -35,7 +35,9 @@ jobs: run: pnpm --filter "@custom/website" clean - name: 'Drupal: Create content' - run: pnpm --filter "@custom/cms" drush php:script scripts/create-lots-of-content/run.php + run: + pnpm --filter "@custom/cms" drush php:script + scripts/create-lots-of-content/run.php - name: 'Gatsby: Full build' run: pnpm --filter "@custom/website" build:gatsby @@ -44,7 +46,9 @@ jobs: run: pnpm --filter "@custom/website" build:gatsby - name: 'Drupal: Create more content' - run: pnpm --filter "@custom/cms" drush php:script scripts/create-lots-of-content/create-100-pages.php + run: + pnpm --filter "@custom/cms" drush php:script + scripts/create-lots-of-content/create-100-pages.php - name: 'Gatsby: Incremental build with new content' run: pnpm --filter "@custom/website" build:gatsby diff --git a/.github/workflows/merge_dev_to_stage.yml b/.github/workflows/merge_dev_to_stage.yml index 49741615b..55ca2f714 100644 --- a/.github/workflows/merge_dev_to_stage.yml +++ b/.github/workflows/merge_dev_to_stage.yml @@ -18,4 +18,4 @@ jobs: with: type: now target_branch: stage - github_token: ${{ github.token }} \ No newline at end of file + github_token: ${{ github.token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9e6ac435..2d403a404 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,9 @@ jobs: steps: - name: Init check if: ${{ github.repository != 'AmazeeLabs/silverback-template'}} - run: echo 'Please run the INIT script. See the root README.md for instructions.' && false + run: + echo 'Please run the INIT script. See the root README.md for + instructions.' && false - name: Checkout uses: actions/checkout@v3 @@ -77,7 +79,9 @@ jobs: - name: Merge release to prod (silverback-template only) uses: devmasx/merge-branch@1.4.0 - if: ${{ github.repository == 'AmazeeLabs/silverback-template' && github.ref == 'refs/heads/release'}} + if: + ${{ github.repository == 'AmazeeLabs/silverback-template' && + github.ref == 'refs/heads/release'}} with: type: now from_branch: release @@ -86,7 +90,9 @@ jobs: docker_build: name: Docker Build - if: startsWith(github.ref_name, 'test-all/') || startsWith(github.head_ref, 'test-all/') + if: + startsWith(github.ref_name, 'test-all/') || startsWith(github.head_ref, + 'test-all/') runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/test_without_turbo_cache.yml b/.github/workflows/test_without_turbo_cache.yml index c247a595e..757b757c0 100644 --- a/.github/workflows/test_without_turbo_cache.yml +++ b/.github/workflows/test_without_turbo_cache.yml @@ -9,7 +9,9 @@ jobs: steps: - name: Init check if: ${{ github.repository != 'AmazeeLabs/silverback-template'}} - run: echo 'Please run the INIT script. See the root README.md for instructions.' && false + run: + echo 'Please run the INIT script. See the root README.md for + instructions.' && false - name: Checkout uses: actions/checkout@v3 diff --git a/apps/cms/scaffold/all.services.yml b/apps/cms/scaffold/all.services.yml index d1e0a45c9..6eb08a2b2 100644 --- a/apps/cms/scaffold/all.services.yml +++ b/apps/cms/scaffold/all.services.yml @@ -3,10 +3,10 @@ # To activate this feature, follow the instructions at the top of the # 'example.settings.local.php' file, which sits next to this file. parameters: - # Configure Cross-Site HTTP requests (CORS). - # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS - # for more information about the topic in general. - # Note: By default the configuration is disabled. + # Configure Cross-Site HTTP requests (CORS). + # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS + # for more information about the topic in general. + # Note: By default the configuration is disabled. cors.config: enabled: true # Specify allowed headers, like 'x-allowed-header'. diff --git a/apps/website/netlify/functions/github-proxy.mts b/apps/website/netlify/functions/github-proxy.mts index f7a7e2008..d47302636 100644 --- a/apps/website/netlify/functions/github-proxy.mts +++ b/apps/website/netlify/functions/github-proxy.mts @@ -5,6 +5,9 @@ export default function (request: Request, context: Context) { if (!process.env.DECAP_GITHUB_TOKEN) { throw new Error('Missing environment variable DECAP_GITHUB_TOKEN.'); } - return githubProxy(request, process.env.DECAP_GITHUB_TOKEN, '/.netlify/functions/github-proxy'); + return githubProxy( + request, + process.env.DECAP_GITHUB_TOKEN, + '/.netlify/functions/github-proxy', + ); } - diff --git a/docker-compose.yml b/docker-compose.yml index c5ad2e374..663f65444 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,12 @@ version: '2.3' x-volumes: - &default-volumes - # Define all volumes you would like to have real-time mounted into the docker containers + &default-volumes # Define all volumes you would like to have real-time mounted into the docker containers volumes: - ./packages/drupal:/app/web/modules/custom:delegated - ./apps/cms:/app:delegated -x-environment: - &default-environment +x-environment: &default-environment LAGOON_PROJECT: &lagoon-project ${COMPOSE_PROJECT_NAME:-slbtemplate} # Route that should be used locally, if you are using pygmy, this route *must* end with .docker.amazee.io LAGOON_ROUTE: &default-url http://${COMPOSE_PROJECT_NAME:-slbtemplate}.docker.amazee.io @@ -17,8 +15,7 @@ x-environment: # See example.docker-compose.override.yml for XDEBUG_ENABLE option x-user: - &default-user - # The default user under which the containers should run. Change this if you are on linux and run with another user than id `1000` + &default-user # The default user under which the containers should run. Change this if you are on linux and run with another user than id `1000` user: '1000' services: @@ -58,7 +55,7 @@ services: depends_on: - cli # basically just tells docker-compose to build the cli first environment: - << : *default-environment # loads the defined environment variables from the top + <<: *default-environment # loads the defined environment variables from the top networks: - amazeeio-network - default diff --git a/packages/drupal/gutenberg_blocks/css/edit.css b/packages/drupal/gutenberg_blocks/css/edit.css index 39ab66473..8e8d0594e 100644 --- a/packages/drupal/gutenberg_blocks/css/edit.css +++ b/packages/drupal/gutenberg_blocks/css/edit.css @@ -1,10 +1,10 @@ /* We can put any editor specific styling in here */ .gutenberg__editor .editor-styles-wrapper { - font-family:inherit; + font-family: inherit; } .gutenberg__editor blockquote { - margin:0; + margin: 0; } .gutenberg__editor blockquote .quote-image img { @@ -40,4 +40,4 @@ left: 0; transform-origin: 0 0; transform: rotate(90deg); -} \ No newline at end of file +} diff --git a/packages/drupal/gutenberg_blocks/gutenberg_blocks.gutenberg.yml b/packages/drupal/gutenberg_blocks/gutenberg_blocks.gutenberg.yml index 8ed456c02..42c51a1e5 100644 --- a/packages/drupal/gutenberg_blocks/gutenberg_blocks.gutenberg.yml +++ b/packages/drupal/gutenberg_blocks/gutenberg_blocks.gutenberg.yml @@ -3,4 +3,4 @@ theme-support: typography: dropCap: false libraries-edit: - - gutenberg_blocks/edit \ No newline at end of file + - gutenberg_blocks/edit diff --git a/packages/drupal/gutenberg_blocks/gutenberg_blocks.info.yml b/packages/drupal/gutenberg_blocks/gutenberg_blocks.info.yml index 039c68d3e..193f1a006 100644 --- a/packages/drupal/gutenberg_blocks/gutenberg_blocks.info.yml +++ b/packages/drupal/gutenberg_blocks/gutenberg_blocks.info.yml @@ -5,4 +5,4 @@ package: Custom core_version_requirement: ^9 || ^10 dependencies: - gutenberg:gutenberg - - silverback_gutenberg:silverback_gutenberg \ No newline at end of file + - silverback_gutenberg:silverback_gutenberg diff --git a/packages/drupal/gutenberg_blocks/gutenberg_blocks.libraries.yml b/packages/drupal/gutenberg_blocks/gutenberg_blocks.libraries.yml index 89370de15..87a7ad6d9 100644 --- a/packages/drupal/gutenberg_blocks/gutenberg_blocks.libraries.yml +++ b/packages/drupal/gutenberg_blocks/gutenberg_blocks.libraries.yml @@ -13,4 +13,3 @@ customisations: /gutenberg.css: { preprocess: false } dependencies: - core/drupalSettings - diff --git a/packages/ui/src/components/Atoms/Container.css b/packages/ui/src/components/Atoms/Container.css index 8985bc6dc..5bd018f50 100644 --- a/packages/ui/src/components/Atoms/Container.css +++ b/packages/ui/src/components/Atoms/Container.css @@ -27,7 +27,7 @@ } .nested-container .container-page:first-child .container-text, -.nested-container .container-page:first-child .container-text *:first-child{ +.nested-container .container-page:first-child .container-text *:first-child { @apply mt-0; } .nested-container .container-page:last-child .container-text, @@ -35,6 +35,7 @@ @apply mb-0; } -.container-nested .prose ul:not(ul ul), .container-nested .prose ol:not(ol ol) { +.container-nested .prose ul:not(ul ul), +.container-nested .prose ol:not(ol ol) { @apply mt-0; } diff --git a/packages/ui/src/iframe.css b/packages/ui/src/iframe.css index 6c9528261..302b70921 100644 --- a/packages/ui/src/iframe.css +++ b/packages/ui/src/iframe.css @@ -12,7 +12,8 @@ h1 { @apply sr-only; } -.visually-hidden.focusable:active, .visually-hidden.focusable:focus { +.visually-hidden.focusable:active, +.visually-hidden.focusable:focus { @apply not-sr-only ml-1; } @@ -35,7 +36,6 @@ h1 { @apply mb-4 md:mb-6; } - .fieldset-wrapper > *:not(:last-child) { @apply mb-5; } @@ -49,11 +49,13 @@ h1 { @apply block mb-2 text-sm; } -.form-item input[type="checkbox"] + label, .form-item input[type="radio"] + label { +.form-item input[type='checkbox'] + label, +.form-item input[type='radio'] + label { @apply inline; } -.form-item input[type="checkbox"], .form-item input[type="radio"] { +.form-item input[type='checkbox'], +.form-item input[type='radio'] { @apply mr-1; } @@ -66,52 +68,54 @@ h1 { @apply mt-2; } -.form-item input[type="checkbox"] + label + .description, -.form-item input[type="radio"] + label + .description { +.form-item input[type='checkbox'] + label + .description, +.form-item input[type='radio'] + label + .description { @apply mt-0; } - /* field */ -.form-item input[type="email"], -.form-item input[type="password"], -.form-item input[type="date"], -.form-item input[type="text"], -.form-item input[type="number"], -.form-item input[type="datetime-local"], -.form-item input[type="time"], -.form-item input[type="url"], -.form-item input[type="tel"], -.form-item input[type="search"], -.form-item input[type="color"], +.form-item input[type='email'], +.form-item input[type='password'], +.form-item input[type='date'], +.form-item input[type='text'], +.form-item input[type='number'], +.form-item input[type='datetime-local'], +.form-item input[type='time'], +.form-item input[type='url'], +.form-item input[type='tel'], +.form-item input[type='search'], +.form-item input[type='color'], .form-item textarea, .form-item select { @apply bg-gray-50 border border-gray-300 text-base rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5; } /* checkbox */ -.form-item input[type="checkbox"] { +.form-item input[type='checkbox'] { @apply rounded -mt-1; } -.form-item input[type="checkbox"]:not(:checked), .form-item input[type="radio"]:not(:checked) { +.form-item input[type='checkbox']:not(:checked), +.form-item input[type='radio']:not(:checked) { @apply bg-gray-50 border-gray-300; } -.form-item input[type="file"] { +.form-item input[type='file'] { @apply block cursor-pointer bg-gray-50 border border-gray-300 rounded-lg block text-sm w-full; } -.form-item input[type="file"]::file-selector-button { +.form-item input[type='file']::file-selector-button { @apply text-white bg-blue-700 hover:bg-blue-800 rounded-l-lg text-sm w-full sm:w-auto px-6 py-2.5 text-center shadow-none border-0 font-medium mr-4; } - -.form-actions input[type="submit"] { +.form-actions input[type='submit'] { @apply text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center; } -.form-item input.error, .form-item textarea.error, .form-item select.error, .form-item input[type="checkbox"].error { +.form-item input.error, +.form-item textarea.error, +.form-item select.error, +.form-item input[type='checkbox'].error { @apply border-red-500; } @@ -119,12 +123,11 @@ h1 { @apply content-['*'] text-gray-900 pl-1; } - .fieldset-legend { @apply font-bold mb-2 block; } -[data-drupal-messages] [role="alert"] { +[data-drupal-messages] [role='alert'] { @apply text-red-500; } @@ -162,7 +165,8 @@ h1 { @apply right-5; } -.ui-dialog .ui-button .ui-icon-closethick, .ui-dialog .ui-button:hover .ui-icon-closethick { +.ui-dialog .ui-button .ui-icon-closethick, +.ui-dialog .ui-button:hover .ui-icon-closethick { background-image: url("data:image/svg+xml;utf8,"); @apply bg-no-repeat bg-center h-10 w-10 -left-0.5 -top-0.5 rounded-lg; } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 75af705aa..1069ced0c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: - - "apps/*" - - "packages/*" - - "packages/drupal/*" - - "tests/*" + - 'apps/*' + - 'packages/*' + - 'packages/drupal/*' + - 'tests/*'