Support nodejs 18

pull/3240/head
Anton 2024-03-07 10:20:47 +01:00
parent a9583f8f6e
commit cfa615e352
2 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,9 @@
import fs from "node:fs/promises";
// Nodejs v18 compatibility (v18 is end-of-life in april 2025)
if(!("crypto" in globalThis)) globalThis.crypto = (await import("node:crypto")).webcrypto;
const lintRule = process.argv[2];
if (!lintRule) {
throw new Error(

View File

@ -11,6 +11,9 @@
import fs from "node:fs/promises";
// Nodejs v18 compatibility (v18 is end-of-life in april 2025)
if(!("crypto" in globalThis)) globalThis.crypto = (await import("node:crypto")).webcrypto;
const exemptionsFilePath = "../apps/lint_exemptions.js";
const exemptions = (await import(exemptionsFilePath)).default;