Skip to content

Commit

Permalink
refactor: migrate common to prettier formatting (#54150)
Browse files Browse the repository at this point in the history
Migrate formatting to prettier for common from clang-format

PR Close #54150
  • Loading branch information
josephperrott authored and thePunderWoman committed Jan 30, 2024
1 parent f3567bb commit 0460a9d
Show file tree
Hide file tree
Showing 150 changed files with 10,006 additions and 7,559 deletions.
2 changes: 2 additions & 0 deletions .ng-dev/format.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const format: FormatConfig = {
'packages/animations/**/*.{js,ts}',
'packages/bazel/**/*.{js,ts}',
'packages/benchpress/**/*.{js,ts}',
'packages/common/**/*.{js,ts}',
'packages/elements/**/*.{js,ts}',
'packages/misc/**/*.{js,ts}',
],
Expand Down Expand Up @@ -51,6 +52,7 @@ export const format: FormatConfig = {
'!packages/animations/**/*.{js,ts}',
'!packages/bazel/**/*.{js,ts}',
'!packages/benchpress/**/*.{js,ts}',
'!packages/common/**/*.{js,ts}',
'!packages/elements/**/*.{js,ts}',
'!packages/misc/**/*.{js,ts}',
],
Expand Down
2 changes: 1 addition & 1 deletion goldens/public-api/common/http/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,7 @@ export function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtec
export function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent>;

// @public
export function withXsrfConfiguration({ cookieName, headerName }: {
export function withXsrfConfiguration({ cookieName, headerName, }: {
cookieName?: string;
headerName?: string;
}): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration>;
Expand Down
4 changes: 2 additions & 2 deletions goldens/public-api/common/http/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export class HttpClientTestingModule {
export abstract class HttpTestingController {
abstract expectNone(url: string, description?: string): void;
abstract expectNone(params: RequestMatch, description?: string): void;
abstract expectNone(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): void;
abstract expectNone(matchFn: (req: HttpRequest<any>) => boolean, description?: string): void;
abstract expectNone(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): void;
abstract expectOne(url: string, description?: string): TestRequest;
abstract expectOne(params: RequestMatch, description?: string): TestRequest;
abstract expectOne(matchFn: ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
abstract expectOne(matchFn: (req: HttpRequest<any>) => boolean, description?: string): TestRequest;
abstract expectOne(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean), description?: string): TestRequest;
abstract match(match: string | RequestMatch | ((req: HttpRequest<any>) => boolean)): TestRequest[];
abstract verify(opts?: {
Expand Down
4 changes: 2 additions & 2 deletions goldens/public-api/common/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export function getLocaleNumberFormat(locale: string, type: NumberFormatStyle):
export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;

// @public
export const getLocalePluralCase: (locale: string) => ((value: number) => Plural);
export const getLocalePluralCase: (locale: string) => (value: number) => Plural;

// @public
export function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
Expand Down Expand Up @@ -526,7 +526,7 @@ export class NgComponentOutlet implements OnChanges, DoCheck, OnDestroy {
class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T, U>>, _differs: IterableDiffers);
ngDoCheck(): void;
set ngForOf(ngForOf: U & NgIterable<T> | undefined | null);
set ngForOf(ngForOf: (U & NgIterable<T>) | undefined | null);
set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>);
set ngForTrackBy(fn: TrackByFunction<T>);
// (undocumented)
Expand Down
49 changes: 44 additions & 5 deletions packages/common/http/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,53 @@ export {HttpClient} from './src/client';
export {HttpContext, HttpContextToken} from './src/context';
export {FetchBackend} from './src/fetch';
export {HttpHeaders} from './src/headers';
export {HTTP_INTERCEPTORS, HttpHandlerFn, HttpInterceptor, HttpInterceptorFn, HttpInterceptorHandler as ɵHttpInterceptorHandler, HttpInterceptorHandler as ɵHttpInterceptingHandler} from './src/interceptor';
export {
HTTP_INTERCEPTORS,
HttpHandlerFn,
HttpInterceptor,
HttpInterceptorFn,
HttpInterceptorHandler as ɵHttpInterceptorHandler,
HttpInterceptorHandler as ɵHttpInterceptingHandler,
} from './src/interceptor';
export {JsonpClientBackend, JsonpInterceptor} from './src/jsonp';
export {HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule} from './src/module';
export {HttpParameterCodec, HttpParams, HttpParamsOptions, HttpUrlEncodingCodec} from './src/params';
export {HttpFeature, HttpFeatureKind, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration} from './src/provider';
export {
HttpParameterCodec,
HttpParams,
HttpParamsOptions,
HttpUrlEncodingCodec,
} from './src/params';
export {
HttpFeature,
HttpFeatureKind,
provideHttpClient,
withFetch,
withInterceptors,
withInterceptorsFromDi,
withJsonpSupport,
withNoXsrfProtection,
withRequestsMadeViaParent,
withXsrfConfiguration,
} from './src/provider';
export {HttpRequest} from './src/request';
export {HttpDownloadProgressEvent, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpResponseBase, HttpSentEvent, HttpStatusCode, HttpUploadProgressEvent, HttpUserEvent} from './src/response';
export {HttpTransferCacheOptions, withHttpTransferCache as ɵwithHttpTransferCache} from './src/transfer_cache';
export {
HttpDownloadProgressEvent,
HttpErrorResponse,
HttpEvent,
HttpEventType,
HttpHeaderResponse,
HttpProgressEvent,
HttpResponse,
HttpResponseBase,
HttpSentEvent,
HttpStatusCode,
HttpUploadProgressEvent,
HttpUserEvent,
} from './src/response';
export {
HttpTransferCacheOptions,
withHttpTransferCache as ɵwithHttpTransferCache,
} from './src/transfer_cache';
export {HttpXhrBackend} from './src/xhr';
export {HttpXsrfTokenExtractor} from './src/xsrf';

Expand Down
Loading

0 comments on commit 0460a9d

Please sign in to comment.