From 894c1c5f100a62866cc7ed3e23d025c8e505c60d Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 28 Feb 2024 16:45:43 +0000 Subject: [PATCH] refactor: apply prettier formatting to integration (#54653) Apply prettier formatting to integration directories PR Close #54653 --- .ng-dev/format.mts | 1 + integration/animations-async/karma.conf.js | 19 +++++++---- .../animations-async/src/app/app.component.ts | 3 +- .../src/app/open-close.component.ts | 28 +++++++--------- integration/animations/karma.conf.js | 19 +++++++---- .../animations/src/app/app.component.ts | 3 +- .../src/app/open-close.component.ts | 28 +++++++--------- integration/check-dependencies.js | 26 ++++++++------- .../e2e/protractor.conf.js | 33 +++++++++++-------- .../e2e/src/app.e2e-spec.ts | 4 +-- .../cli-elements-universal/e2e/src/app.po.ts | 2 +- .../cli-elements-universal/karma.conf.js | 22 ++++++++----- .../src/app/app.component.spec.ts | 19 ++++------- .../src/app/app.component.ts | 2 +- .../src/app/app.module.ts | 32 +++++++----------- .../src/app/app.server.module.ts | 20 ++++------- .../src/app/title.component.spec.ts | 4 +-- .../src/app/title.component.ts | 2 +- .../cli-elements-universal/src/main.server.ts | 2 +- .../cli-elements-universal/src/main.ts | 9 ++--- .../cli-hello-world-ivy-i18n/e2e/app.po.ts | 12 +++++-- .../e2e/de/app.e2e-spec.ts | 12 ++++--- .../e2e/en/app.e2e-spec.ts | 17 ++++++---- .../e2e/fr/app.e2e-spec.ts | 17 ++++++---- .../e2e/protractor.conf.js | 25 ++++++++------ .../cli-hello-world-ivy-i18n/karma.conf.js | 19 +++++++---- .../src/app/app.component.spec.ts | 11 +++---- .../src/app/app.component.ts | 6 ++-- .../src/app/app.module.ts | 3 +- .../src/environments/environment.prod.ts | 2 +- .../src/environments/environment.ts | 2 +- .../cli-hello-world-ivy-i18n/src/main.ts | 9 ++--- .../check-output-for-ngdevmode.js | 13 +++++--- .../e2e/protractor.conf.js | 23 ++++++++----- .../e2e/src/app.e2e-spec.ts | 12 ++++--- .../cli-hello-world-lazy/e2e/src/app.po.ts | 2 +- .../cli-hello-world-lazy/karma.conf.js | 19 +++++++---- .../src/app/app.component.spec.ts | 13 ++++---- .../src/app/app.routes.ts | 11 ++++--- .../src/app/lazy/lazy.component.spec.ts | 9 +++-- .../src/app/lazy/lazy.component.ts | 3 +- integration/cli-hello-world-lazy/src/main.ts | 5 +-- .../e2e/protractor.conf.js | 23 ++++++++----- .../e2e/src/app.e2e-spec.ts | 12 ++++--- .../cli-hello-world-mocha/e2e/src/app.po.ts | 2 +- .../src/app/app.component.spec.ts | 13 ++++---- .../src/app/app.component.ts | 4 +-- .../src/app/app.module.ts | 22 +++++-------- integration/cli-hello-world-mocha/src/main.ts | 9 ++--- .../cli-hello-world/e2e/protractor.conf.js | 23 ++++++++----- .../cli-hello-world/e2e/src/app.e2e-spec.ts | 12 ++++--- integration/cli-hello-world/e2e/src/app.po.ts | 2 +- integration/cli-hello-world/karma.conf.js | 19 +++++++---- .../src/app/app.component.spec.ts | 13 ++++---- .../cli-hello-world/src/app/app.component.ts | 7 ++-- .../cli-hello-world/src/app/app.module.ts | 22 +++++-------- integration/cli-hello-world/src/main.ts | 9 ++--- .../cli-signal-inputs/e2e/protractor.conf.js | 23 ++++++++----- .../cli-signal-inputs/e2e/src/app.e2e-spec.ts | 8 +++-- integration/cli-signal-inputs/karma.conf.js | 19 +++++++---- .../src/app/app.component.ts | 2 +- .../src/app/greet.component.ts | 2 +- integration/defer/e2e/protractor.conf.js | 23 ++++++++----- integration/defer/karma.conf.js | 19 +++++++---- integration/defer/src/app/defer.component.ts | 3 +- integration/defer/src/main.ts | 2 +- .../dynamic-compiler/e2e/app.e2e-spec.ts | 2 +- integration/dynamic-compiler/e2e/app.po.ts | 5 ++- .../dynamic-compiler/e2e/protractor.config.js | 17 ++++++---- .../dynamic-compiler/src/app.component.ts | 2 +- .../dynamic-compiler/src/app.module.ts | 9 +++-- .../dynamic-compiler/src/lazy.module.ts | 9 ++--- integration/dynamic-compiler/src/main.ts | 6 ++-- integration/forms/e2e/protractor.conf.js | 23 ++++++++----- integration/forms/e2e/src/app.e2e-spec.ts | 8 +++-- integration/forms/karma.conf.js | 19 +++++++---- .../forms/src/app/app.component.spec.ts | 2 +- integration/forms/src/app/app.component.ts | 5 ++- integration/forms/src/app/app.module.ts | 18 +++------- integration/forms/src/main.ts | 9 ++--- integration/injectable-def/src/app.ts | 6 +--- integration/injectable-def/src/main.ts | 22 +++++++------ integration/ivy-i18n/e2e/app.po.ts | 12 +++++-- integration/ivy-i18n/e2e/fr/app.e2e-spec.ts | 2 +- .../ivy-i18n/e2e/legacy/app.e2e-spec.ts | 9 +++-- integration/ivy-i18n/e2e/protractor.conf.js | 25 ++++++++------ .../ivy-i18n/e2e/runtime/app.e2e-spec.ts | 10 ++++-- integration/ivy-i18n/karma.conf.js | 19 +++++++---- .../scripts/update-xlf-translation-file.js | 8 ++--- .../scripts/update-xmb-translation-file.js | 11 ++++--- .../ivy-i18n/src/app/app.component.spec.ts | 3 +- integration/ivy-i18n/src/app/app.component.ts | 7 ++-- integration/ivy-i18n/src/app/app.module.ts | 3 +- integration/ivy-i18n/src/main.ts | 9 ++--- integration/ivy-i18n/src/polyfills-runtime.ts | 2 +- integration/ivy-i18n/src/polyfills.ts | 1 - .../ng-add-localize/src/app/app.component.ts | 4 +-- .../ng-add-localize/src/app/app.module.ts | 18 ++++------ integration/ng-add-localize/src/main.ts | 9 ++--- integration/ng_elements/e2e/app.e2e-spec.ts | 5 ++- .../ng_elements/e2e/protractor.config.js | 17 ++++++---- integration/ng_elements/src/app.ts | 16 ++++++--- integration/ng_elements/src/elements.ts | 3 +- integration/ng_update/check.js | 28 +++++++++++----- .../src/app/app.component.spec.ts | 8 ++--- .../src/app/app.component.ts | 4 +-- .../src/app/app.module.ts | 18 ++++------ integration/ng_update_migrations/src/main.ts | 9 ++--- integration/ng_update_migrations/src/test.ts | 13 +++----- .../ng_update_migrations/src/test_expected.ts | 13 +++----- integration/ng_update_migrations/test.js | 31 ++++++++++++----- .../nodenext_resolution/include-all.ts | 2 -- .../platform-server/e2e/protractor.conf.js | 23 ++++++++----- .../ngmodule/src/app/app-routing.module.ts | 4 +-- .../ngmodule/src/app/app.component.ts | 5 ++- .../ngmodule/src/app/app.server.module.ts | 13 +++----- .../app/helloworld/hello-world.component.ts | 6 ++-- .../transferstate/transfer-state.component.ts | 5 ++- .../projects/ngmodule/src/main.server.ts | 3 +- .../projects/ngmodule/src/main.ts | 4 +-- .../projects/standalone/server.ts | 9 +++-- .../standalone/src/app/app.component.ts | 10 +++--- .../standalone/src/app/app.config.server.ts | 10 +++--- .../projects/standalone/src/app/app.config.ts | 6 +--- .../projects/standalone/src/app/app.routes.ts | 4 +-- .../app/helloworld/hello-world.component.ts | 6 ++-- .../http-transfer-state.component.ts | 2 +- .../transferstate/transfer-state.component.ts | 7 ++-- .../projects/standalone/src/main.server.ts | 6 ++-- .../snapshots/animations-browser/esm2022.js | 4 +-- .../snapshots/animations/esm2022.js | 1 - .../side-effects/snapshots/common/esm2022.js | 2 +- .../side-effects/snapshots/core/esm2022.js | 19 ++++++++--- .../snapshots/elements/esm2022.js | 6 ++-- .../side-effects/snapshots/forms/esm2022.js | 8 ++--- .../snapshots/platform-browser/esm2022.js | 4 +-- .../side-effects/snapshots/router/esm2022.js | 8 ++--- .../e2e/protractor.conf.js | 23 ++++++++----- .../standalone-bootstrap/karma.conf.js | 19 +++++++---- .../src/app/app.component.ts | 3 +- integration/standalone-bootstrap/src/main.ts | 2 +- integration/terser/test.js | 15 +++++---- .../trusted-types/e2e/protractor.conf.js | 33 +++++++++++-------- .../trusted-types/e2e/src/app.e2e-spec.ts | 8 +++-- integration/trusted-types/e2e/src/app.po.ts | 2 +- integration/trusted-types/karma.conf.js | 25 +++++++------- .../src/app/app-routing.module.ts | 8 ++--- .../src/app/app.component.spec.ts | 18 +++++----- .../trusted-types/src/app/app.component.ts | 8 +++-- .../trusted-types/src/app/app.module.ts | 21 +++++------- integration/trusted-types/src/main.ts | 9 ++--- integration/typings_test_rxjs7/include-all.ts | 2 -- integration/typings_test_ts54/include-all.ts | 2 -- 153 files changed, 916 insertions(+), 754 deletions(-) diff --git a/.ng-dev/format.mts b/.ng-dev/format.mts index febcd823f2d..a4e9755837d 100644 --- a/.ng-dev/format.mts +++ b/.ng-dev/format.mts @@ -9,6 +9,7 @@ export const format: FormatConfig = { '**/*.{yaml,yml}', 'adev/**/*.{js,ts}', 'devtools/**/*.{js,ts}', + 'integration/**/*.{js,ts}', 'tools/**/*.{js,ts}', 'modules/**/*.{js,ts}', 'scripts/**/*.{js,ts}', diff --git a/integration/animations-async/karma.conf.js b/integration/animations-async/karma.conf.js index 4a43e961fd5..de6f6a9799e 100644 --- a/integration/animations-async/karma.conf.js +++ b/integration/animations-async/karma.conf.js @@ -10,15 +10,15 @@ module.exports = function (config) { require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma'), ], client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser + clearContext: false, // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { dir: require('path').join(__dirname, './coverage/latest-app'), reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true + fixWebpackSourcePaths: true, }, reporters: ['progress', 'kjhtml'], port: 9876, @@ -29,11 +29,18 @@ module.exports = function (config) { ChromeHeadlessNoSandbox: { base: 'ChromeHeadless', // See /integration/README.md#browser-tests for more info on these args - flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio'] - } + flags: [ + '--no-sandbox', + '--headless', + '--disable-gpu', + '--disable-dev-shm-usage', + '--hide-scrollbars', + '--mute-audio', + ], + }, }, browsers: ['ChromeHeadlessNoSandbox'], singleRun: false, - restartOnFileChange: true + restartOnFileChange: true, }); }; diff --git a/integration/animations-async/src/app/app.component.ts b/integration/animations-async/src/app/app.component.ts index 516c873b55f..433c8f3ebc6 100644 --- a/integration/animations-async/src/app/app.component.ts +++ b/integration/animations-async/src/app/app.component.ts @@ -6,5 +6,4 @@ import {RouterModule} from '@angular/router'; imports: [RouterModule], standalone: true, }) -export class AppComponent { -} +export class AppComponent {} diff --git a/integration/animations-async/src/app/open-close.component.ts b/integration/animations-async/src/app/open-close.component.ts index 39f2ff200a9..04343dcee6e 100644 --- a/integration/animations-async/src/app/open-close.component.ts +++ b/integration/animations-async/src/app/open-close.component.ts @@ -3,19 +3,13 @@ import {Component} from '@angular/core'; @Component({ selector: 'app-open-close', animations: [ - trigger( - 'openClose', - [ - // ... - state( - 'open', - style({height: '200px', opacity: 1, backgroundColor: 'yellow'})), - state( - 'closed', - style({height: '100px', opacity: 0.8, backgroundColor: 'blue'})), - transition('open => closed', [animate('1s')]), - transition('closed => open', [animate('0.5s')]), - ]), + trigger('openClose', [ + // ... + state('open', style({height: '200px', opacity: 1, backgroundColor: 'yellow'})), + state('closed', style({height: '100px', opacity: 0.8, backgroundColor: 'blue'})), + transition('open => closed', [animate('1s')]), + transition('closed => open', [animate('0.5s')]), + ]), ], template: `