From bba08001d38b53f24a0188615d493f773e129fd9 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Thu, 28 Apr 2022 20:04:31 +0200 Subject: [PATCH] chore(esm): suppress "got is not found" error See: https://github.com/mysticatea/eslint-plugin-node/issues/255 --- build/spas.js | 3 +-- build/utils.js | 3 +-- deployer/aws-lambda/tests/server.test.js | 2 +- kumascript/src/api/mdn.js | 3 +-- testing/tests/developing.spec.js | 2 +- testing/tests/redirects.test.js | 2 +- tool/popularities.js | 3 +-- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/build/spas.js b/build/spas.js index 936ce3c4ff3a..adba8a3cc58c 100644 --- a/build/spas.js +++ b/build/spas.js @@ -12,8 +12,7 @@ import { } from "../content/index.js"; import { BUILD_OUT_ROOT } from "./constants.js"; import { renderHTML } from "../ssr/dist/main.js"; -// eslint-disable-next-line node/no-missing-import -import { default as got } from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import import { splitSections } from "./utils.js"; import cheerio from "cheerio"; import { findByURL } from "../content/document.js"; diff --git a/build/utils.js b/build/utils.js index 159103de211a..eb0c6fe107a4 100644 --- a/build/utils.js +++ b/build/utils.js @@ -2,8 +2,7 @@ import fs from "fs"; import path from "path"; import cheerio from "cheerio"; -// eslint-disable-next-line node/no-missing-import -import got from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import import FileType from "file-type"; import imagemin from "imagemin"; import imageminPngquant from "imagemin-pngquant"; diff --git a/deployer/aws-lambda/tests/server.test.js b/deployer/aws-lambda/tests/server.test.js index 2f2cea467b76..2916891140eb 100644 --- a/deployer/aws-lambda/tests/server.test.js +++ b/deployer/aws-lambda/tests/server.test.js @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-unpublished-import -import got from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import const BASE_URL = process.env.SERVER_BASE_URL || "http://localhost:7000"; diff --git a/kumascript/src/api/mdn.js b/kumascript/src/api/mdn.js index 40a3cd0a1233..507b3f9e2251 100644 --- a/kumascript/src/api/mdn.js +++ b/kumascript/src/api/mdn.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line node/no-missing-import -import got from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import import * as util from "./util.js"; // Module level caching for repeat calls to fetchWebExtExamples(). diff --git a/testing/tests/developing.spec.js b/testing/tests/developing.spec.js index e28f15e8d8a6..1941e89dd88c 100644 --- a/testing/tests/developing.spec.js +++ b/testing/tests/developing.spec.js @@ -1,5 +1,5 @@ import { test, expect } from "@playwright/test"; -import got from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import const DEV_BASE_URL = process.env.DEVELOPING_DEV_BASE_URL || "http://localhost:3000"; diff --git a/testing/tests/redirects.test.js b/testing/tests/redirects.test.js index 3d3d81cd0801..2afc51dfb572 100644 --- a/testing/tests/redirects.test.js +++ b/testing/tests/redirects.test.js @@ -1,4 +1,4 @@ -import got from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import import braces from "braces"; function serverURL(pathname = "/") { diff --git a/tool/popularities.js b/tool/popularities.js index 73a5be86971b..26db259abd88 100644 --- a/tool/popularities.js +++ b/tool/popularities.js @@ -12,8 +12,7 @@ import fs from "fs"; import csv from "@fast-csv/parse"; -// eslint-disable-next-line node/no-missing-import -import got from "got"; +import got from "got"; // eslint-disable-line node/no-missing-import const CURRENT_URL = "https://mdn-popularities-prod.s3.amazonaws.com/current.txt";