From 56002c68ca40e400a31fdda5fd5d3c922bf9dac8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 28 Mar 2026 02:19:55 -0500 Subject: [PATCH] Add eslint rule to prohibit import.meta.glob usage --- eslint.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index e9e713c8..fbbd8a37 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -39,6 +39,13 @@ export default tseslint.config( }, ], "custom/no-placeholder-comments": "error", + "no-restricted-syntax": [ + "error", + { + "selector": "CallExpression[callee.object.type='MetaProperty'][callee.property.name='glob']", + "message": "import.meta.glob is Vite-only and breaks other bundlers. Inline the assets or use standard imports instead.", + }, + ], "no-warning-comments": [ "error", { terms: ["fixme"] },