summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2021-01-02 15:17:01 +0000
committerGitHub <noreply@github.com>2021-01-02 10:17:01 -0500
commit62465ca4ee93826cd901b021a7e97b58adea5879 (patch)
tree74f5d5627903794300307fa64bd38a7692a1ce05
parent41a4a34aee57a4690e5c1b9ba54b27a7035bac37 (diff)
fix(std): Don't use JSDoc syntax for browser-compatibility headers (#8960)
-rw-r--r--docs/contributing/style_guide.md2
-rw-r--r--std/encoding/ascii85.ts2
-rw-r--r--std/encoding/csv_stringify.ts2
-rw-r--r--std/fmt/colors.ts24
-rw-r--r--std/path/_constants.ts2
-rw-r--r--std/path/_interface.ts2
-rw-r--r--std/path/_util.ts2
-rw-r--r--std/path/common.ts2
-rw-r--r--std/path/mod.ts2
-rw-r--r--std/path/posix.ts2
-rw-r--r--std/path/separator.ts2
-rw-r--r--std/path/win32.ts3
-rw-r--r--std/testing/_diff.ts2
-rw-r--r--std/testing/asserts.ts4
14 files changed, 27 insertions, 26 deletions
diff --git a/docs/contributing/style_guide.md b/docs/contributing/style_guide.md
index d834ea91a..25e01b203 100644
--- a/docs/contributing/style_guide.md
+++ b/docs/contributing/style_guide.md
@@ -355,7 +355,7 @@ If a module is browser compatible, include the following in the JSDoc at the top
of the module:
```ts
-/** This module is browser compatible. */
+// This module is browser compatible.
```
Maintain browser compatibility for such a module by either not using the global
diff --git a/std/encoding/ascii85.ts b/std/encoding/ascii85.ts
index cb2a3ec76..4efa98d7a 100644
--- a/std/encoding/ascii85.ts
+++ b/std/encoding/ascii85.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** This module is browser compatible. */
+// This module is browser compatible.
export type Ascii85Standard = "Adobe" | "btoa" | "RFC 1924" | "Z85";
/**
diff --git a/std/encoding/csv_stringify.ts b/std/encoding/csv_stringify.ts
index c968820dd..913cd3116 100644
--- a/std/encoding/csv_stringify.ts
+++ b/std/encoding/csv_stringify.ts
@@ -1,7 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// Implements the CSV spec at https://tools.ietf.org/html/rfc4180
-/** This module is browser compatible. */
+// This module is browser compatible.
const QUOTE = '"';
export const NEWLINE = "\r\n";
diff --git a/std/fmt/colors.ts b/std/fmt/colors.ts
index 6c986711d..a2787a198 100644
--- a/std/fmt/colors.ts
+++ b/std/fmt/colors.ts
@@ -1,16 +1,16 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
- * on npm.
- *
- * ```
- * import { bgBlue, red, bold } from "https://deno.land/std/fmt/colors.ts";
- * console.log(bgBlue(red(bold("Hello world!"))));
- * ```
- *
- * This module supports `NO_COLOR` environmental variable disabling any coloring
- * if `NO_COLOR` is set.
- *
- * This module is browser compatible. */
+// A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
+// on npm.
+//
+// ```
+// import { bgBlue, red, bold } from "https://deno.land/std/fmt/colors.ts";
+// console.log(bgBlue(red(bold("Hello world!"))));
+// ```
+//
+// This module supports `NO_COLOR` environmental variable disabling any coloring
+// if `NO_COLOR` is set.
+//
+// This module is browser compatible.
const noColor = globalThis.Deno?.noColor ?? true;
diff --git a/std/path/_constants.ts b/std/path/_constants.ts
index 78755529b..88374ae05 100644
--- a/std/path/_constants.ts
+++ b/std/path/_constants.ts
@@ -1,6 +1,6 @@
// Copyright the Browserify authors. MIT License.
// Ported from https://github.com/browserify/path-browserify/
-/** This module is browser compatible. */
+// This module is browser compatible.
// Alphabet chars.
export const CHAR_UPPERCASE_A = 65; /* A */
diff --git a/std/path/_interface.ts b/std/path/_interface.ts
index c05af9f5e..39044eaf1 100644
--- a/std/path/_interface.ts
+++ b/std/path/_interface.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** This module is browser compatible. */
+// This module is browser compatible.
/**
* A parsed path object generated by path.parse() or consumed by path.format().
diff --git a/std/path/_util.ts b/std/path/_util.ts
index 37ef847cf..046c44337 100644
--- a/std/path/_util.ts
+++ b/std/path/_util.ts
@@ -1,6 +1,6 @@
// Copyright the Browserify authors. MIT License.
// Ported from https://github.com/browserify/path-browserify/
-/** This module is browser compatible. */
+// This module is browser compatible.
import type { FormatInputPathObject } from "./_interface.ts";
import {
diff --git a/std/path/common.ts b/std/path/common.ts
index 01470105c..1d8df96ad 100644
--- a/std/path/common.ts
+++ b/std/path/common.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** This module is browser compatible. */
+// This module is browser compatible.
import { SEP } from "./separator.ts";
diff --git a/std/path/mod.ts b/std/path/mod.ts
index 8819bf25f..5fd793c75 100644
--- a/std/path/mod.ts
+++ b/std/path/mod.ts
@@ -1,6 +1,6 @@
// Copyright the Browserify authors. MIT License.
// Ported mostly from https://github.com/browserify/path-browserify/
-/** This module is browser compatible. */
+// This module is browser compatible.
import { isWindows } from "../_util/os.ts";
import * as _win32 from "./win32.ts";
diff --git a/std/path/posix.ts b/std/path/posix.ts
index eb88be079..ed3649bd3 100644
--- a/std/path/posix.ts
+++ b/std/path/posix.ts
@@ -1,6 +1,6 @@
// Copyright the Browserify authors. MIT License.
// Ported from https://github.com/browserify/path-browserify/
-/** This module is browser compatible. */
+// This module is browser compatible.
import type { FormatInputPathObject, ParsedPath } from "./_interface.ts";
import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./_constants.ts";
diff --git a/std/path/separator.ts b/std/path/separator.ts
index 61bb7c588..58b42000a 100644
--- a/std/path/separator.ts
+++ b/std/path/separator.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** This module is browser compatible. */
+// This module is browser compatible.
import { isWindows } from "../_util/os.ts";
diff --git a/std/path/win32.ts b/std/path/win32.ts
index f974511e2..d456c68e4 100644
--- a/std/path/win32.ts
+++ b/std/path/win32.ts
@@ -1,6 +1,7 @@
// Copyright the Browserify authors. MIT License.
// Ported from https://github.com/browserify/path-browserify/
-/** This module is browser compatible. */
+// This module is browser compatible.
+
import type { FormatInputPathObject, ParsedPath } from "./_interface.ts";
import {
CHAR_BACKWARD_SLASH,
diff --git a/std/testing/_diff.ts b/std/testing/_diff.ts
index e6f631002..25b4cc977 100644
--- a/std/testing/_diff.ts
+++ b/std/testing/_diff.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** This module is browser compatible. */
+// This module is browser compatible.
interface FarthestPoint {
y: number;
diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts
index 8548fb700..75a86a4c2 100644
--- a/std/testing/asserts.ts
+++ b/std/testing/asserts.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-/** This module is browser compatible. Do not rely on good formatting of values
- * for AssertionError messages in browsers. */
+// This module is browser compatible. Do not rely on good formatting of values
+// for AssertionError messages in browsers.
import { bold, gray, green, red, stripColor, white } from "../fmt/colors.ts";
import { diff, DiffResult, DiffType } from "./_diff.ts";