file-type 16.5.4 → 21.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.d.ts +221 -354
- package/core.js +2599 -1165
- package/index.d.ts +89 -18
- package/index.js +154 -23
- package/package.json +96 -21
- package/readme.md +467 -270
- package/supported.js +359 -278
- package/util.js +36 -16
- package/browser.d.ts +0 -50
- package/browser.js +0 -49
package/index.d.ts
CHANGED
|
@@ -1,27 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
Typings for Node.js specific entry point.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type {Readable as NodeReadableStream} from 'node:stream';
|
|
6
|
+
import type {AnyWebByteStream} from 'strtok3';
|
|
7
|
+
import {
|
|
8
|
+
type FileTypeResult,
|
|
9
|
+
type StreamOptions,
|
|
10
|
+
type AnyWebReadableStream,
|
|
11
|
+
type AnyWebReadableByteStreamWithFileType,
|
|
12
|
+
type FileTypeOptions,
|
|
13
|
+
FileTypeParser as DefaultFileTypeParser,
|
|
14
|
+
} from './core.js';
|
|
15
|
+
|
|
16
|
+
export type ReadableStreamWithFileType = NodeReadableStream & {
|
|
17
|
+
readonly fileType?: FileTypeResult;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
Extending `FileTypeParser` with Node.js engine specific functions.
|
|
22
|
+
*/
|
|
23
|
+
export declare class FileTypeParser extends DefaultFileTypeParser {
|
|
24
|
+
/**
|
|
25
|
+
@param stream - Node.js `stream.Readable` or web `ReadableStream`.
|
|
26
|
+
*/
|
|
27
|
+
fromStream(stream: AnyWebReadableStream<Uint8Array> | NodeReadableStream): Promise<FileTypeResult | undefined>;
|
|
28
|
+
|
|
29
|
+
fromFile(filePath: string): Promise<FileTypeResult | undefined>;
|
|
4
30
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
31
|
+
/**
|
|
32
|
+
Works the same way as {@link fileTypeStream}, additionally taking into account custom detectors (if any were provided to the constructor).
|
|
33
|
+
*/
|
|
34
|
+
toDetectionStream(readableStream: NodeReadableStream, options?: FileTypeOptions & StreamOptions): Promise<ReadableStreamWithFileType>;
|
|
35
|
+
toDetectionStream(webStream: AnyWebReadableStream<Uint8Array>, options?: FileTypeOptions & StreamOptions): Promise<AnyWebReadableByteStreamWithFileType>;
|
|
36
|
+
}
|
|
9
37
|
|
|
10
38
|
/**
|
|
11
39
|
Detect the file type of a file path.
|
|
12
40
|
|
|
41
|
+
The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the file.
|
|
42
|
+
|
|
43
|
+
This is for Node.js only.
|
|
44
|
+
|
|
45
|
+
To read from a [`File`](https://developer.mozilla.org/docs/Web/API/File), see `fileTypeFromBlob()`.
|
|
46
|
+
|
|
13
47
|
The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
|
|
14
48
|
|
|
15
|
-
@param path - The file path to parse.
|
|
16
49
|
@returns The detected file type and MIME type or `undefined` when there is no match.
|
|
17
50
|
*/
|
|
18
|
-
export function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
51
|
+
export function fileTypeFromFile(filePath: string, options?: FileTypeOptions): Promise<FileTypeResult | undefined>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
Detect the file type of a [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
|
|
55
|
+
|
|
56
|
+
If the engine is Node.js, this may also be a [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
|
|
57
|
+
|
|
58
|
+
Direct support for Node.js streams will be dropped in the future, when Node.js streams can be converted to Web streams (see [`toWeb()`](https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options)).
|
|
59
|
+
|
|
60
|
+
The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
|
|
61
|
+
|
|
62
|
+
@param stream - A [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) or [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable) streaming a file to examine.
|
|
63
|
+
@param options - Options to override default behaviour.
|
|
64
|
+
@returns A `Promise` for an object with the detected file type, or `undefined` when there is no match.
|
|
65
|
+
*/
|
|
66
|
+
export function fileTypeFromStream(stream: AnyWebReadableStream<Uint8Array> | NodeReadableStream, options?: FileTypeOptions): Promise<FileTypeResult | undefined>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`.
|
|
70
|
+
|
|
71
|
+
This method can be handy to put in between a stream, but it comes with a price.
|
|
72
|
+
Internally `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type.
|
|
73
|
+
The sample size impacts the file detection resolution.
|
|
74
|
+
A smaller sample size will result in lower probability of the best file type detection.
|
|
75
|
+
|
|
76
|
+
@param readableStream - A [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) or [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable), streaming a file to examine.
|
|
77
|
+
@param options - May be used to override the default sample size.
|
|
78
|
+
@returns A `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`.
|
|
79
|
+
|
|
80
|
+
@example
|
|
81
|
+
```
|
|
82
|
+
import got from 'got';
|
|
83
|
+
import {fileTypeStream} from 'file-type';
|
|
84
|
+
|
|
85
|
+
const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg';
|
|
86
|
+
|
|
87
|
+
const stream1 = got.stream(url);
|
|
88
|
+
const stream2 = await fileTypeStream(stream1, {sampleSize: 1024});
|
|
89
|
+
|
|
90
|
+
if (stream2.fileType?.mime === 'image/jpeg') {
|
|
91
|
+
// stream2 can be used to stream the JPEG image (from the very beginning of the stream)
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
*/
|
|
95
|
+
export function fileTypeStream(readableStream: NodeReadableStream, options?: FileTypeOptions & StreamOptions): Promise<ReadableStreamWithFileType>;
|
|
96
|
+
export function fileTypeStream(webStream: AnyWebByteStream, options?: FileTypeOptions & StreamOptions): Promise<AnyWebReadableByteStreamWithFileType>;
|
|
97
|
+
|
|
98
|
+
export * from './core.js';
|
package/index.js
CHANGED
|
@@ -1,32 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
/**
|
|
2
|
+
Node.js specific entry point.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {ReadableStream as WebReadableStream} from 'node:stream/web';
|
|
6
|
+
import {pipeline, PassThrough, Readable} from 'node:stream';
|
|
7
|
+
import fs from 'node:fs/promises';
|
|
8
|
+
import {constants as fileSystemConstants} from 'node:fs';
|
|
9
|
+
import * as strtok3 from 'strtok3';
|
|
10
|
+
import {
|
|
11
|
+
FileTypeParser as DefaultFileTypeParser,
|
|
12
|
+
reasonableDetectionSizeInBytes,
|
|
13
|
+
normalizeSampleSize,
|
|
14
|
+
} from './core.js';
|
|
15
|
+
|
|
16
|
+
function isTokenizerStreamBoundsError(error) {
|
|
17
|
+
if (
|
|
18
|
+
!(error instanceof RangeError)
|
|
19
|
+
|| error.message !== 'offset is out of bounds'
|
|
20
|
+
|| typeof error.stack !== 'string'
|
|
21
|
+
) {
|
|
22
|
+
return false;
|
|
11
23
|
}
|
|
24
|
+
|
|
25
|
+
// Some malformed or non-byte Node.js streams can surface this tokenizer-internal range error.
|
|
26
|
+
// Note: This stack-trace check is fragile and may break if strtok3 restructures its internals.
|
|
27
|
+
return /strtok3[/\\]lib[/\\]stream[/\\]/.test(error.stack);
|
|
12
28
|
}
|
|
13
29
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
export class FileTypeParser extends DefaultFileTypeParser {
|
|
31
|
+
async fromStream(stream) {
|
|
32
|
+
this.options.signal?.throwIfAborted();
|
|
33
|
+
const tokenizer = await (stream instanceof WebReadableStream ? this.createTokenizerFromWebStream(stream) : strtok3.fromStream(stream, this.getTokenizerOptions()));
|
|
34
|
+
try {
|
|
35
|
+
return await super.fromTokenizer(tokenizer);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
if (isTokenizerStreamBoundsError(error)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
17
40
|
|
|
18
|
-
|
|
41
|
+
throw error;
|
|
42
|
+
} finally {
|
|
43
|
+
// TODO: Remove this when `strtok3.fromStream()` closes the underlying Readable instead of only aborting tokenizer reads.
|
|
44
|
+
if (
|
|
45
|
+
stream instanceof Readable
|
|
46
|
+
&& !stream.destroyed
|
|
47
|
+
) {
|
|
48
|
+
stream.destroy();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async fromFile(path) {
|
|
54
|
+
this.options.signal?.throwIfAborted();
|
|
55
|
+
// TODO: Remove this when `strtok3.fromFile()` safely rejects non-regular filesystem objects without a pathname race.
|
|
56
|
+
const fileHandle = await fs.open(path, fileSystemConstants.O_RDONLY | fileSystemConstants.O_NONBLOCK);
|
|
57
|
+
const fileStat = await fileHandle.stat();
|
|
58
|
+
if (!fileStat.isFile()) {
|
|
59
|
+
await fileHandle.close();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
19
62
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
63
|
+
const tokenizer = new strtok3.FileTokenizer(fileHandle, {
|
|
64
|
+
...this.getTokenizerOptions(),
|
|
65
|
+
fileInfo: {
|
|
66
|
+
path,
|
|
67
|
+
size: fileStat.size,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
return super.fromTokenizer(tokenizer);
|
|
23
71
|
}
|
|
24
|
-
});
|
|
25
72
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
73
|
+
async toDetectionStream(readableStream, options = {}) {
|
|
74
|
+
if (!(readableStream instanceof Readable)) {
|
|
75
|
+
return super.toDetectionStream(readableStream, options);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const {sampleSize = reasonableDetectionSizeInBytes} = options;
|
|
79
|
+
const {signal} = this.options;
|
|
80
|
+
const normalizedSampleSize = normalizeSampleSize(sampleSize);
|
|
81
|
+
|
|
82
|
+
signal?.throwIfAborted();
|
|
83
|
+
|
|
84
|
+
return new Promise((resolve, reject) => {
|
|
85
|
+
let isSettled = false;
|
|
86
|
+
|
|
87
|
+
const cleanup = () => {
|
|
88
|
+
readableStream.off('error', onError);
|
|
89
|
+
readableStream.off('readable', onReadable);
|
|
90
|
+
signal?.removeEventListener('abort', onAbort);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const settle = (callback, value) => {
|
|
94
|
+
if (isSettled) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
isSettled = true;
|
|
99
|
+
cleanup();
|
|
100
|
+
callback(value);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const onError = error => {
|
|
104
|
+
settle(reject, error);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const onAbort = () => {
|
|
108
|
+
if (!readableStream.destroyed) {
|
|
109
|
+
readableStream.destroy();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
settle(reject, signal.reason);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const onReadable = () => {
|
|
116
|
+
(async () => {
|
|
117
|
+
try {
|
|
118
|
+
const pass = new PassThrough();
|
|
119
|
+
const outputStream = pipeline ? pipeline(readableStream, pass, () => {}) : readableStream.pipe(pass);
|
|
120
|
+
const chunk = readableStream.read(normalizedSampleSize) ?? readableStream.read() ?? new Uint8Array(0);
|
|
121
|
+
try {
|
|
122
|
+
pass.fileType = await this.fromBuffer(chunk);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
if (error instanceof strtok3.EndOfStreamError) {
|
|
125
|
+
pass.fileType = undefined;
|
|
126
|
+
} else {
|
|
127
|
+
settle(reject, error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
settle(resolve, outputStream);
|
|
132
|
+
} catch (error) {
|
|
133
|
+
settle(reject, error);
|
|
134
|
+
}
|
|
135
|
+
})();
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
readableStream.on('error', onError);
|
|
139
|
+
readableStream.once('readable', onReadable);
|
|
140
|
+
signal?.addEventListener('abort', onAbort, {once: true});
|
|
141
|
+
});
|
|
29
142
|
}
|
|
30
|
-
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export async function fileTypeFromFile(path, options) {
|
|
146
|
+
return (new FileTypeParser(options)).fromFile(path, options);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export async function fileTypeFromStream(stream, options) {
|
|
150
|
+
return (new FileTypeParser(options)).fromStream(stream);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export async function fileTypeStream(readableStream, options = {}) {
|
|
154
|
+
return new FileTypeParser(options).toDetectionStream(readableStream, options);
|
|
155
|
+
}
|
|
31
156
|
|
|
32
|
-
|
|
157
|
+
export {
|
|
158
|
+
fileTypeFromTokenizer,
|
|
159
|
+
fileTypeFromBuffer,
|
|
160
|
+
fileTypeFromBlob,
|
|
161
|
+
supportedMimeTypes,
|
|
162
|
+
supportedExtensions,
|
|
163
|
+
} from './core.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-type",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Detect the file type of a
|
|
3
|
+
"version": "21.3.4",
|
|
4
|
+
"description": "Detect the file type of a file, stream, or data",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/file-type",
|
|
7
7
|
"funding": "https://github.com/sindresorhus/file-type?sponsor=1",
|
|
@@ -10,18 +10,39 @@
|
|
|
10
10
|
"email": "sindresorhus@gmail.com",
|
|
11
11
|
"url": "https://sindresorhus.com"
|
|
12
12
|
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"node": {
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"import": "./index.js",
|
|
19
|
+
"module-sync": "./index.js"
|
|
20
|
+
},
|
|
21
|
+
"default": {
|
|
22
|
+
"types": "./core.d.ts",
|
|
23
|
+
"import": "./core.js",
|
|
24
|
+
"module-sync": "./core.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"./core": {
|
|
28
|
+
"types": "./core.d.ts",
|
|
29
|
+
"default": "./core.js"
|
|
30
|
+
},
|
|
31
|
+
"./node": {
|
|
32
|
+
"types": "./index.d.ts",
|
|
33
|
+
"default": "./index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": false,
|
|
13
37
|
"engines": {
|
|
14
|
-
"node": ">=
|
|
38
|
+
"node": ">=20"
|
|
15
39
|
},
|
|
16
40
|
"scripts": {
|
|
17
|
-
"ava": "ava --serial --verbose",
|
|
18
41
|
"test": "xo && ava && tsd"
|
|
19
42
|
},
|
|
20
43
|
"files": [
|
|
21
44
|
"index.js",
|
|
22
45
|
"index.d.ts",
|
|
23
|
-
"browser.js",
|
|
24
|
-
"browser.d.ts",
|
|
25
46
|
"core.js",
|
|
26
47
|
"core.d.ts",
|
|
27
48
|
"supported.js",
|
|
@@ -44,6 +65,8 @@
|
|
|
44
65
|
"check",
|
|
45
66
|
"is",
|
|
46
67
|
"exif",
|
|
68
|
+
"elf",
|
|
69
|
+
"macho",
|
|
47
70
|
"exe",
|
|
48
71
|
"binary",
|
|
49
72
|
"buffer",
|
|
@@ -101,6 +124,7 @@
|
|
|
101
124
|
"eot",
|
|
102
125
|
"ttf",
|
|
103
126
|
"otf",
|
|
127
|
+
"ttc",
|
|
104
128
|
"ico",
|
|
105
129
|
"flv",
|
|
106
130
|
"ps",
|
|
@@ -124,6 +148,7 @@
|
|
|
124
148
|
"pptx",
|
|
125
149
|
"xlsx",
|
|
126
150
|
"3gp",
|
|
151
|
+
"j2c",
|
|
127
152
|
"jp2",
|
|
128
153
|
"jpm",
|
|
129
154
|
"jpx",
|
|
@@ -173,7 +198,6 @@
|
|
|
173
198
|
"it",
|
|
174
199
|
"s3m",
|
|
175
200
|
"xm",
|
|
176
|
-
"ai",
|
|
177
201
|
"skp",
|
|
178
202
|
"avif",
|
|
179
203
|
"eps",
|
|
@@ -185,31 +209,82 @@
|
|
|
185
209
|
"3mf",
|
|
186
210
|
"zst",
|
|
187
211
|
"jxl",
|
|
188
|
-
"vcf"
|
|
212
|
+
"vcf",
|
|
213
|
+
"jls",
|
|
214
|
+
"pst",
|
|
215
|
+
"dwg",
|
|
216
|
+
"parquet",
|
|
217
|
+
"class",
|
|
218
|
+
"arj",
|
|
219
|
+
"cpio",
|
|
220
|
+
"ace",
|
|
221
|
+
"avro",
|
|
222
|
+
"icc",
|
|
223
|
+
"fbx",
|
|
224
|
+
"vsdx",
|
|
225
|
+
"vtt",
|
|
226
|
+
"apk",
|
|
227
|
+
"drc",
|
|
228
|
+
"lz4",
|
|
229
|
+
"potx",
|
|
230
|
+
"xltx",
|
|
231
|
+
"dotx",
|
|
232
|
+
"xltm",
|
|
233
|
+
"ots",
|
|
234
|
+
"odg",
|
|
235
|
+
"otg",
|
|
236
|
+
"otp",
|
|
237
|
+
"ott",
|
|
238
|
+
"xlsm",
|
|
239
|
+
"docm",
|
|
240
|
+
"dotm",
|
|
241
|
+
"potm",
|
|
242
|
+
"pptm",
|
|
243
|
+
"jar",
|
|
244
|
+
"jmp",
|
|
245
|
+
"rm",
|
|
246
|
+
"sav",
|
|
247
|
+
"ppsm",
|
|
248
|
+
"ppsx",
|
|
249
|
+
"tar.gz",
|
|
250
|
+
"reg",
|
|
251
|
+
"dat"
|
|
189
252
|
],
|
|
190
|
-
"devDependencies": {
|
|
191
|
-
"@types/node": "^13.1.4",
|
|
192
|
-
"ava": "^2.3.0",
|
|
193
|
-
"noop-stream": "^0.1.0",
|
|
194
|
-
"read-chunk": "^3.2.0",
|
|
195
|
-
"tsd": "^0.11.0",
|
|
196
|
-
"xo": "^0.25.3"
|
|
197
|
-
},
|
|
198
253
|
"dependencies": {
|
|
199
|
-
"
|
|
200
|
-
"strtok3": "^
|
|
201
|
-
"token-types": "^
|
|
254
|
+
"@tokenizer/inflate": "^0.4.1",
|
|
255
|
+
"strtok3": "^10.3.4",
|
|
256
|
+
"token-types": "^6.1.1",
|
|
257
|
+
"uint8array-extras": "^1.4.0"
|
|
258
|
+
},
|
|
259
|
+
"devDependencies": {
|
|
260
|
+
"@tokenizer/token": "^0.3.0",
|
|
261
|
+
"@types/node": "^25.3.3",
|
|
262
|
+
"ava": "^7.0.0",
|
|
263
|
+
"commonmark": "^0.31.2",
|
|
264
|
+
"get-stream": "^9.0.1",
|
|
265
|
+
"noop-stream": "^1.0.0",
|
|
266
|
+
"tsd": "^0.33.0",
|
|
267
|
+
"xo": "^0.60.0"
|
|
202
268
|
},
|
|
203
269
|
"xo": {
|
|
204
270
|
"envs": [
|
|
205
271
|
"node",
|
|
206
272
|
"browser"
|
|
207
273
|
],
|
|
274
|
+
"ignores": [
|
|
275
|
+
"fixture"
|
|
276
|
+
],
|
|
208
277
|
"rules": {
|
|
209
278
|
"no-inner-declarations": "warn",
|
|
210
279
|
"no-await-in-loop": "warn",
|
|
211
|
-
"
|
|
212
|
-
"
|
|
280
|
+
"no-bitwise": "off",
|
|
281
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
282
|
+
"unicorn/text-encoding-identifier-case": "off",
|
|
283
|
+
"unicorn/switch-case-braces": "off",
|
|
284
|
+
"unicorn/prefer-top-level-await": "off"
|
|
213
285
|
}
|
|
286
|
+
},
|
|
287
|
+
"ava": {
|
|
288
|
+
"serial": true
|
|
214
289
|
}
|
|
215
290
|
}
|