Skip to content

Commit 16f8ba5

Browse files
NotWoodsshellscape
authored andcommitted
docs: normalize Array format in READMEs (#117)
1 parent 1789ae0 commit 16f8ba5

File tree

15 files changed

+25
-25
lines changed

15 files changed

+25
-25
lines changed

packages/alias/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Instructs the plugin to use an alternative resolving algorithm, rather than the
7878

7979
### `entries`
8080

81-
Type: `Object | Array[Object]`<br>
81+
Type: `Object | Array[...Object]`<br>
8282
Default: `null`
8383

8484
Specifies an `Object`, or an `Array` of `Object`, which defines aliases used to replace values in `import` or `require` statements. With either format, the order of the entries is important, in that the first defined rules are applied first. This option also supports [Regular Expression Alias](#regular-expression-aliases) matching.
@@ -96,9 +96,9 @@ alias({
9696
});
9797
```
9898

99-
#### `Array[Object]` Format
99+
#### `Array[...Object]` Format
100100

101-
The `Array[Object]` format allows specifying aliases as objects, which can be useful for complex key/value pairs.
101+
The `Array[...Object]` format allows specifying aliases as objects, which can be useful for complex key/value pairs.
102102

103103
```js
104104
entries: [

packages/buble/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
6060

6161
### `include`
6262

63-
Type: `String` | `Array(String)`<br>
63+
Type: `String` | `Array[...String]`<br>
6464
Default: `null`
6565

6666
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

packages/commonjs/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
5353

5454
### `include`
5555

56-
Type: `String` | `Array(String)`<br>
56+
Type: `String` | `Array[...String]`<br>
5757
Default: `null`
5858

5959
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default CommonJS modules are targeted.
6060

6161
### `extensions`
6262

63-
Type: `Array(String)`<br>
63+
Type: `Array[...String]`<br>
6464
Default: `['.js']`
6565

6666
Search for extensions other than .js in the order specified.
@@ -122,7 +122,7 @@ commonjs({
122122

123123
### `ignore`
124124

125-
Type: `Array(String | (String) => Boolean)`<br>
125+
Type: `Array[...String | (String) => Boolean]`<br>
126126
Default: `[]`
127127

128128
Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function. Only use this option if you know what you're doing!

packages/image/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
7979

8080
### `include`
8181

82-
Type: `String` | `Array(String)`<br>
82+
Type: `String` | `Array[...String]`<br>
8383
Default: `null`
8484

8585
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

packages/inject/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
8484

8585
### `include`
8686

87-
Type: `String` | `Array(String)`<br>
87+
Type: `String` | `Array[...String]`<br>
8888
Default: `null`
8989

9090
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

packages/json/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
6868

6969
### `include`
7070

71-
Type: `String` | `Array(String)`<br>
71+
Type: `String` | `Array[...String]`<br>
7272
Default: `null`
7373

7474
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

packages/node-resolve/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#comma
4646

4747
### `mainFields`
4848

49-
Type: `Array[String]`<br>
49+
Type: `Array[...String]`<br>
5050
Default: `['module', 'main']`
5151

5252
The fields to scan in a package.json to determine the entry point if this list contains "browser", overrides specified in "pkg.browser" will be used
@@ -84,7 +84,7 @@ Some package.json files have a "browser" field which specifies alternative files
8484

8585
### `extensions`
8686

87-
Type: `Array[String]`<br>
87+
Type: `Array[...String]`<br>
8888
Default: `['.mjs', '.js', '.json', '.node']`
8989

9090
Resolve extensions other than .js in the order specified.
@@ -105,7 +105,7 @@ Lock the module search in this path (like a chroot). Modules defined outside thi
105105

106106
### `only`
107107

108-
Type: `Array[String|RegExp]`<br>
108+
Type: `Array[...String|RegExp]`<br>
109109
Default: `null`
110110

111111
Example: `only: ['some_module', /^@some_scope\/.*$/]`
@@ -119,7 +119,7 @@ If true, inspect resolved files to check that they are ES2015 modules.
119119

120120
### `dedupe`
121121

122-
Type: `Array[String]`<br>
122+
Type: `Array[...String]`<br>
123123
Default: `[]`
124124

125125
Force resolving for these modules to root's node_modules that helps to prevent bundling the same package multiple times if package is imported from dependencies.

packages/pluginutils/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Returns: `String`
104104

105105
#### `include` and `exclude`
106106

107-
Type: `String | Array[String|RegExp]`<br>
107+
Type: `String | Array[...String|RegExp]`<br>
108108

109109
A valid [`minimatch`](https://www.npmjs.com/package/minimatch) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `minimatch` patterns, and must not match any of the `options.exclude` patterns.
110110

@@ -181,7 +181,7 @@ Outputs the string ES module source:
181181
Extracts the names of all assignment targets based upon specified patterns.
182182

183183
Parameters: `(param: Node)`<br>
184-
Returns: `Array[String]`
184+
Returns: `Array[...String]`
185185

186186
#### `param`
187187

packages/replace/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In addition to the properties and values specified for replacement, users may al
5252

5353
### `delimiters`
5454

55-
Type: `Array[String, String]`<br>
55+
Type: `Array[...String, String]`<br>
5656
Default: `['\b', '\b']`
5757

5858
Specifies the boundaries around which strings will be replaced. By default, delimiters are [word boundaries](https://www.regular-expressions.info/wordboundaries.html). See [Word Boundaries](#word-boundaries) below for more information.
@@ -66,7 +66,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
6666

6767
### `include`
6868

69-
Type: `String` | `Array(String)`<br>
69+
Type: `String` | `Array[...String]`<br>
7070
Default: `null`
7171

7272
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

packages/strip/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ If `true`, instructs the plugin to remove debugger statements.
5757

5858
### `functions`
5959

60-
Type: `Array[String]`<br>
60+
Type: `Array[...String]`<br>
6161
Default: `[ 'console.*', 'assert.*' ]`
6262

6363
Specifies the functions that the plugin will target and remove.
6464

6565
### `labels`
6666

67-
Type: `Array[String]`<br>
67+
Type: `Array[...String]`<br>
6868
Default: `[]`
6969

7070
Specifies the [labeled blocks](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label) that the plugin will target and remove.

packages/sucrase/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
7171

7272
### `include`
7373

74-
Type: `String` | `Array(String)`
74+
Type: `String` | `Array[...String]`
7575
Default: `null`
7676

7777
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

packages/typescript/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
7474

7575
### `include`
7676

77-
Type: `String` | `Array(String)`<br>
77+
Type: `String` | `Array[...String]`<br>
7878
Default: `null`
7979

8080
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all `.ts` and `.tsx` files are targeted.

packages/url/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
6161

6262
### `include`
6363

64-
Type: `String` | `Array(String)`<br>
64+
Type: `String` | `Array[...String]`<br>
6565
Default: `['**/*.svg', '**/*.png', '**/*.jpg', '**/*.gif']`
6666

6767
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default .svg, .png, .jpg, and .gif files are targeted.

packages/wasm/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#comma
4848

4949
### `sync`
5050

51-
Type: `Array[String]`<br>
51+
Type: `Array[...String]`<br>
5252
Default: `null`
5353

5454
Specifies an array of strings that each represent a WebAssembly file to load synchronously. See [Synchronous Modules](#synchronous-modules) for a functional example.

packages/yaml/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
6262

6363
### `include`
6464

65-
Type: `String` | `Array(String)`<br>
65+
Type: `String` | `Array[...String]`<br>
6666
Default: `null`
6767

6868
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

0 commit comments

Comments
 (0)