From 6673b3e68f0e1707e3261467ba5f1074298bedc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 30 May 2022 02:34:03 +0900 Subject: [PATCH] chore: set node/no-unsupported-features version (#8388) --- .eslintrc.cjs | 15 ++++++++++++++- playground/dynamic-import/nested/index.js | 1 - .../__tests__/sourcemap/sourcemap-worker.spec.ts | 1 - 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 83650e4dd24926..edc202b5e539df 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -132,7 +132,20 @@ module.exports = defineConfig({ 'node/no-extraneous-require': 'off', 'node/no-missing-import': 'off', 'node/no-missing-require': 'off', - 'no-undef': 'off' + 'no-undef': 'off', + // engine field doesn't exist in playgrounds + 'node/no-unsupported-features/es-builtins': [ + 'error', + { + version: '>=14.6.0' + } + ], + 'node/no-unsupported-features/node-builtins': [ + 'error', + { + version: '>=14.6.0' + } + ] } }, { diff --git a/playground/dynamic-import/nested/index.js b/playground/dynamic-import/nested/index.js index 136963fbe77bac..31dcd07560836f 100644 --- a/playground/dynamic-import/nested/index.js +++ b/playground/dynamic-import/nested/index.js @@ -48,7 +48,6 @@ document.querySelector('.mxdjson').addEventListener('click', async () => { // data URLs (`blob:`) const code1 = 'export const msg = "blob"' const blob = new Blob([code1], { type: 'text/javascript;charset=UTF-8' }) -// eslint-disable-next-line node/no-unsupported-features/node-builtins const blobURL = URL.createObjectURL(blob) document.querySelector('.issue-2658-1').addEventListener('click', async () => { const { msg } = await import(/*@vite-ignore*/ blobURL) diff --git a/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts b/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts index 1081a8877cf997..4657e39e591949 100644 --- a/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts +++ b/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable node/no-unsupported-features/node-builtins */ import fs from 'fs' import path from 'path' import {