Add eslint:recommended lint rule (#4577)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-01-07 08:38:21 -05:00
1 parent 4f75acf2b4
commit fa3708c879
27 files changed
+88 -57

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@
export function defineGlobal(propName: string, descriptor: PropertyDescriptor) {
const scope = typeof global !== "undefined" ? global : window;
if (scope.hasOwnProperty(propName)) {
if (Object.prototype.hasOwnProperty.call(scope, propName)) {
return;
}
+1
View File
@@ -25,6 +25,7 @@ export type Falsey = false | 0 | "" | null | undefined;
* Create a new type safe empty Iterable
* @returns An `Iterable` that yields 0 items
*/
// eslint-disable-next-line require-yield
export function* newEmpty<T>(): IterableIterator<T> {
return;
}
+3 -2
View File
@@ -31,12 +31,13 @@ export interface ReadFileFromTarOpts {
}
export function readFileFromTar<R = Buffer>({ tarPath, filePath, parseJson }: ReadFileFromTarOpts): Promise<R> {
return new Promise(async (resolve, reject) => {
return new Promise((resolve, reject) => {
const fileChunks: Buffer[] = [];
await tar.list({
tar.list({
file: tarPath,
filter: entryPath => path.normalize(entryPath) === filePath,
sync: true,
onentry(entry: FileStat) {
entry.on("data", chunk => {
fileChunks.push(chunk);