From e26781f9089b02425af56b8a7fe5c6770a457ffe Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Fri, 7 Jan 2022 00:58:51 +0000 Subject: [PATCH] Disable `@typescript-lint/noexplicit-any` eslint rule in pages code This PR disables the `@typescript-lint/noexplicit-any` eslint rule in pages code. The Pages team should fix this, since it's causing noise in our PRs. I've also filed an issue to fix this at https://github.com/cloudflare/wrangler2/issues/201. --- .changeset/modern-hounds-fold.md | 5 +++++ packages/wrangler/pages/functions/filepath-routing.ts | 2 ++ packages/wrangler/pages/functions/routes.ts | 2 ++ packages/wrangler/pages/functions/template-worker.ts | 2 ++ 4 files changed, 11 insertions(+) create mode 100644 .changeset/modern-hounds-fold.md diff --git a/.changeset/modern-hounds-fold.md b/.changeset/modern-hounds-fold.md new file mode 100644 index 000000000000..13d39c23716f --- /dev/null +++ b/.changeset/modern-hounds-fold.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +Disable @typescript-lint/noexplicit-any eslint rule in pages code diff --git a/packages/wrangler/pages/functions/filepath-routing.ts b/packages/wrangler/pages/functions/filepath-routing.ts index 6a20592b9834..3a0c06f791dd 100644 --- a/packages/wrangler/pages/functions/filepath-routing.ts +++ b/packages/wrangler/pages/functions/filepath-routing.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import path from "path"; import fs from "fs/promises"; import { transform } from "esbuild"; diff --git a/packages/wrangler/pages/functions/routes.ts b/packages/wrangler/pages/functions/routes.ts index 84526963681c..d7b386fb0963 100755 --- a/packages/wrangler/pages/functions/routes.ts +++ b/packages/wrangler/pages/functions/routes.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import path from "path"; import fs from "fs/promises"; import { isValidIdentifer, normalizeIdentifier } from "./identifiers"; diff --git a/packages/wrangler/pages/functions/template-worker.ts b/packages/wrangler/pages/functions/template-worker.ts index 7494a968fe53..6a494be33de3 100644 --- a/packages/wrangler/pages/functions/template-worker.ts +++ b/packages/wrangler/pages/functions/template-worker.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { match } from "path-to-regexp"; import type { HTTPMethod } from "./routes";