0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-08 07:16:56 -05:00

chore: update formatting configuration (#18331)

This commit is contained in:
Bartek Iwańczuk 2023-03-21 22:01:53 +01:00 committed by GitHub
parent cc46f6776c
commit 7e61e8f0e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 18 deletions

View file

@ -13,15 +13,19 @@
"associations": "**/*.rs", "associations": "**/*.rs",
"rustfmt": "rustfmt --config imports_granularity=item" "rustfmt": "rustfmt --config imports_granularity=item"
}, },
"includes": [ "includes": ["**/*.{ts,tsx,js,jsx,json,md,toml,rs}"],
"**/*.{ts,tsx,js,jsx,json,md,toml,rs}"
],
"excludes": [ "excludes": [
".cargo_home", ".cargo_home",
".git", ".git",
"cli/bench/testdata/express-router.js", "cli/bench/testdata/express-router.js",
"cli/bench/testdata/npm/*", "cli/bench/testdata/npm/*",
"cli/tsc/dts/*.d.ts", "cli/tsc/dts/lib.d.ts",
"cli/tsc/dts/lib.scripthost.d.ts",
"cli/tsc/dts/lib.decorators*.d.ts",
"cli/tsc/dts/lib.webworker*.d.ts",
"cli/tsc/dts/lib.dom*.d.ts",
"cli/tsc/dts/lib.es*.d.ts",
"cli/tsc/dts/typescript.d.ts",
"cli/tests/node_compat/test", "cli/tests/node_compat/test",
"cli/tests/testdata/fmt/badly_formatted.json", "cli/tests/testdata/fmt/badly_formatted.json",
"cli/tests/testdata/fmt/badly_formatted.md", "cli/tests/testdata/fmt/badly_formatted.md",
@ -46,7 +50,7 @@
"tools/wpt/manifest.json" "tools/wpt/manifest.json"
], ],
"plugins": [ "plugins": [
"https://plugins.dprint.dev/typescript-0.81.1.wasm", "https://plugins.dprint.dev/typescript-0.84.0.wasm",
"https://plugins.dprint.dev/json-0.17.0.wasm", "https://plugins.dprint.dev/json-0.17.0.wasm",
"https://plugins.dprint.dev/markdown-0.15.2.wasm", "https://plugins.dprint.dev/markdown-0.15.2.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm", "https://plugins.dprint.dev/toml-0.5.4.wasm",

View file

@ -4562,7 +4562,6 @@ declare namespace Deno {
*/ */
request(desc: PermissionDescriptor): Promise<PermissionStatus>; request(desc: PermissionDescriptor): Promise<PermissionStatus>;
/** Requests the permission, and returns the state of the permission. /** Requests the permission, and returns the state of the permission.
* *
* If the permission is already granted, the user will not be prompted to * If the permission is already granted, the user will not be prompted to
@ -4674,7 +4673,15 @@ declare namespace Deno {
arch: "x86_64" | "aarch64"; arch: "x86_64" | "aarch64";
/** The operating system that the Deno CLI was built for. `"darwin"` is /** The operating system that the Deno CLI was built for. `"darwin"` is
* also known as OSX or MacOS. */ * also known as OSX or MacOS. */
os: "darwin" | "linux" | "windows" | "freebsd" | "netbsd" | "aix" | "solaris" | "illumos"; os:
| "darwin"
| "linux"
| "windows"
| "freebsd"
| "netbsd"
| "aix"
| "solaris"
| "illumos";
/** The computer vendor that the Deno CLI was built for. */ /** The computer vendor that the Deno CLI was built for. */
vendor: string; vendor: string;
/** Optional environment flags that were set for this build of Deno CLI. */ /** Optional environment flags that were set for this build of Deno CLI. */

View file

@ -369,7 +369,10 @@ declare namespace Deno {
/** Return the direct memory pointer to the typed array in memory. */ /** Return the direct memory pointer to the typed array in memory. */
static of(value: Deno.UnsafeCallback | BufferSource): PointerValue; static of(value: Deno.UnsafeCallback | BufferSource): PointerValue;
/** Return a new pointer offset from the original by `offset` bytes. */ /** Return a new pointer offset from the original by `offset` bytes. */
static offset(value: NonNullable<PointerValue>, offset: number): PointerValue static offset(
value: NonNullable<PointerValue>,
offset: number,
): PointerValue;
/** Get the numeric value of a pointer */ /** Get the numeric value of a pointer */
static value(value: PointerValue): number | bigint; static value(value: PointerValue): number | bigint;
} }
@ -427,7 +430,10 @@ declare namespace Deno {
getCString(offset?: number): string; getCString(offset?: number): string;
/** Gets a C string (`null` terminated string) at the specified byte offset /** Gets a C string (`null` terminated string) at the specified byte offset
* from the specified pointer. */ * from the specified pointer. */
static getCString(pointer: NonNullable<PointerValue>, offset?: number): string; static getCString(
pointer: NonNullable<PointerValue>,
offset?: number,
): string;
/** Gets an `ArrayBuffer` of length `byteLength` at the specified byte /** Gets an `ArrayBuffer` of length `byteLength` at the specified byte
* offset from the pointer. */ * offset from the pointer. */
getArrayBuffer(byteLength: number, offset?: number): ArrayBuffer; getArrayBuffer(byteLength: number, offset?: number): ArrayBuffer;
@ -528,14 +534,14 @@ declare namespace Deno {
* @category FFI * @category FFI
*/ */
export class UnsafeCallback< export class UnsafeCallback<
Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition,
> { > {
constructor( constructor(
definition: Const<Definition>, definition: Const<Definition>,
callback: UnsafeCallbackFunction< callback: UnsafeCallbackFunction<
Definition["parameters"], Definition["parameters"],
Definition["result"] Definition["result"]
> >,
); );
/** The pointer to the unsafe callback. */ /** The pointer to the unsafe callback. */
@ -556,13 +562,13 @@ declare namespace Deno {
* exists and is not unref'ed. * exists and is not unref'ed.
*/ */
static threadSafe< static threadSafe<
Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition Definition extends UnsafeCallbackDefinition = UnsafeCallbackDefinition,
>( >(
definition: Const<Definition>, definition: Const<Definition>,
callback: UnsafeCallbackFunction< callback: UnsafeCallbackFunction<
Definition["parameters"], Definition["parameters"],
Definition["result"] Definition["result"]
> >,
): UnsafeCallback<Definition>; ): UnsafeCallback<Definition>;
/** /**
@ -1219,7 +1225,6 @@ declare namespace Deno {
remoteAddr: Deno.NetAddr; remoteAddr: Deno.NetAddr;
} }
/** **UNSTABLE**: New API, yet to be vetted. /** **UNSTABLE**: New API, yet to be vetted.
* *
* A handler for HTTP requests. Consumes a request and returns a response. * A handler for HTTP requests. Consumes a request and returns a response.
@ -1230,7 +1235,10 @@ declare namespace Deno {
* *
* @category HTTP Server * @category HTTP Server
*/ */
export type ServeHandler = (request: Request, info: ServeHandlerInfo) => Response | Promise<Response>; export type ServeHandler = (
request: Request,
info: ServeHandlerInfo,
) => Response | Promise<Response>;
/** **UNSTABLE**: New API, yet to be vetted. /** **UNSTABLE**: New API, yet to be vetted.
* *