Skip to content

Commit 0460a9d

Browse files
josephperrottthePunderWoman
authored andcommitted
refactor: migrate common to prettier formatting (#54150)
Migrate formatting to prettier for common from clang-format PR Close #54150
1 parent f3567bb commit 0460a9d

File tree

150 files changed

+10006
-7559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+10006
-7559
lines changed

.ng-dev/format.mts

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const format: FormatConfig = {
1414
'packages/animations/**/*.{js,ts}',
1515
'packages/bazel/**/*.{js,ts}',
1616
'packages/benchpress/**/*.{js,ts}',
17+
'packages/common/**/*.{js,ts}',
1718
'packages/elements/**/*.{js,ts}',
1819
'packages/misc/**/*.{js,ts}',
1920
],
@@ -51,6 +52,7 @@ export const format: FormatConfig = {
5152
'!packages/animations/**/*.{js,ts}',
5253
'!packages/bazel/**/*.{js,ts}',
5354
'!packages/benchpress/**/*.{js,ts}',
55+
'!packages/common/**/*.{js,ts}',
5456
'!packages/elements/**/*.{js,ts}',
5557
'!packages/misc/**/*.{js,ts}',
5658
],

goldens/public-api/common/http/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ export function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtec
24112411
export function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent>;
24122412

24132413
// @public
2414-
export function withXsrfConfiguration({ cookieName, headerName }: {
2414+
export function withXsrfConfiguration({ cookieName, headerName, }: {
24152415
cookieName?: string;
24162416
headerName?: string;
24172417
}): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration>;

goldens/public-api/common/http/testing/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export class HttpClientTestingModule {
2626
export abstract class HttpTestingController {
2727
abstract expectNone(url: string, description?: string): void;
2828
abstract expectNone(params: RequestMatch, description?: string): void;
29-
abstract expectNone(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): void;
29+
abstract expectNone(matchFn: (req: HttpRequest<any>) => boolean, description?: string): void;
3030
abstract expectNone(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): void;
3131
abstract expectOne(url: string, description?: string): TestRequest;
3232
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
33-
abstract expectOne(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
33+
abstract expectOne(matchFn: (req: HttpRequest<any>) => boolean, description?: string): TestRequest;
3434
abstract expectOne(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
3535
abstract match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[];
3636
abstract verify(opts?: {

goldens/public-api/common/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export function getLocaleNumberFormat(locale: string, type: NumberFormatStyle):
246246
export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
247247

248248
// @public
249-
export const getLocalePluralCase: (locale: string) => ((value: number) => Plural);
249+
export const getLocalePluralCase: (locale: string) => (value: number) => Plural;
250250

251251
// @public
252252
export function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
@@ -526,7 +526,7 @@ export class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy {
526526
class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
527527
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T, U>>, _differs: IterableDiffers);
528528
ngDoCheck(): void;
529-
set ngForOf(ngForOf: U & NgIterable<T> | undefined | null);
529+
set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
530530
set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
531531
set ngForTrackBy(fn: TrackByFunction<T>);
532532
// (undocumented)

packages/common/http/public_api.ts

+44-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,53 @@ export {HttpClient} from './src/client';
1111
export {HttpContext, HttpContextToken} from './src/context';
1212
export {FetchBackend} from './src/fetch';
1313
export {HttpHeaders} from './src/headers';
14-
export {HTTP_INTERCEPTORS, HttpHandlerFn, HttpInterceptor, HttpInterceptorFn, HttpInterceptorHandler as ɵHttpInterceptorHandler, HttpInterceptorHandler as ɵHttpInterceptingHandler} from './src/interceptor';
14+
export {
15+
HTTP_INTERCEPTORS,
16+
HttpHandlerFn,
17+
HttpInterceptor,
18+
HttpInterceptorFn,
19+
HttpInterceptorHandler as ɵHttpInterceptorHandler,
20+
HttpInterceptorHandler as ɵHttpInterceptingHandler,
21+
} from './src/interceptor';
1522
export {JsonpClientBackend, JsonpInterceptor} from './src/jsonp';
1623
export {HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule} from './src/module';
17-
export {HttpParameterCodec, HttpParams, HttpParamsOptions, HttpUrlEncodingCodec} from './src/params';
18-
export {HttpFeature, HttpFeatureKind, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration} from './src/provider';
24+
export {
25+
HttpParameterCodec,
26+
HttpParams,
27+
HttpParamsOptions,
28+
HttpUrlEncodingCodec,
29+
} from './src/params';
30+
export {
31+
HttpFeature,
32+
HttpFeatureKind,
33+
provideHttpClient,
34+
withFetch,
35+
withInterceptors,
36+
withInterceptorsFromDi,
37+
withJsonpSupport,
38+
withNoXsrfProtection,
39+
withRequestsMadeViaParent,
40+
withXsrfConfiguration,
41+
} from './src/provider';
1942
export {HttpRequest} from './src/request';
20-
export {HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpResponseBase, HttpSentEvent, HttpStatusCode, HttpUploadProgressEvent, HttpUserEvent} from './src/response';
21-
export {HttpTransferCacheOptions, withHttpTransferCache as ɵwithHttpTransferCache} from './src/transfer_cache';
43+
export {
44+
HttpDownloadProgressEvent,
45+
HttpErrorResponse,
46+
HttpEvent,
47+
HttpEventType,
48+
HttpHeaderResponse,
49+
HttpProgressEvent,
50+
HttpResponse,
51+
HttpResponseBase,
52+
HttpSentEvent,
53+
HttpStatusCode,
54+
HttpUploadProgressEvent,
55+
HttpUserEvent,
56+
} from './src/response';
57+
export {
58+
HttpTransferCacheOptions,
59+
withHttpTransferCache as ɵwithHttpTransferCache,
60+
} from './src/transfer_cache';
2261
export {HttpXhrBackend} from './src/xhr';
2362
export {HttpXsrfTokenExtractor} from './src/xsrf';
2463

0 commit comments

Comments
 (0)