From 82a6715702ac49687aa8b731efb5971bcdeac0a3 Mon Sep 17 00:00:00 2001 From: Kristoffer K Date: Wed, 4 Jan 2023 13:15:07 +0100 Subject: [PATCH] chore: fix linting (#223) * chore: fix linting * chore: lint --- .eslintignore | 4 ++++ genlist.ts | 1 - package.json | 4 ++-- sources/commands/Disable.ts | 2 +- sources/fsUtils.ts | 4 ++-- tests/recordRequests.js | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..2bbdf72a1 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +.yarn +dist +shims +.pnp.* diff --git a/genlist.ts b/genlist.ts index eb2a41e02..80a4aaaba 100644 --- a/genlist.ts +++ b/genlist.ts @@ -9,4 +9,3 @@ lines.sort((a, b) => { for (const version of lines) console.log(`"${version}": "${process.argv[2]}",`); - diff --git a/package.json b/package.json index 59ba168dd..156fd5948 100644 --- a/package.json +++ b/package.json @@ -48,11 +48,11 @@ "scripts": { "build": "rm -rf dist shims && webpack && ts-node ./mkshims.ts", "corepack": "ts-node ./sources/_entryPoint.ts", - "lint": "yarn eslint", + "lint": "eslint .", "prepack": "yarn build", "postpack": "rm -rf dist shims", "typecheck": "tsc --noEmit", - "test": "yarn jest" + "test": "jest" }, "files": [ "dist", diff --git a/sources/commands/Disable.ts b/sources/commands/Disable.ts index 673bdfd89..68a99e6bd 100644 --- a/sources/commands/Disable.ts +++ b/sources/commands/Disable.ts @@ -3,8 +3,8 @@ import fs from 'f import path from 'path'; import which from 'which'; -import type { NodeError } from '../nodeUtils'; import {Context} from '../main'; +import type {NodeError} from '../nodeUtils'; import {isSupportedPackageManager, SupportedPackageManagerSetWithoutNpm} from '../types'; export class DisableCommand extends Command { diff --git a/sources/fsUtils.ts b/sources/fsUtils.ts index 0658624ed..fc9d14dbc 100644 --- a/sources/fsUtils.ts +++ b/sources/fsUtils.ts @@ -1,5 +1,5 @@ -import { rm } from "fs/promises"; +import {rm} from 'fs/promises'; export async function rimraf(path: string) { - return rm(path, { recursive: true, force: true }); + return rm(path, {recursive: true, force: true}); } diff --git a/tests/recordRequests.js b/tests/recordRequests.js index 3d5eb71d5..ca4fac506 100644 --- a/tests/recordRequests.js +++ b/tests/recordRequests.js @@ -39,7 +39,7 @@ switch (process.env.NOCK_ENV || ``) { req.rawHeaders = filterHeaders(req.rawHeaders); const serialized = v8.serialize(nockCallObjects); - fs.mkdirSync(path.dirname(getNockFile()), { recursive: true }); + fs.mkdirSync(path.dirname(getNockFile()), {recursive: true}); fs.writeFileSync(getNockFile(), serialized); }); break;