From 057d2a4e324836f25404e7b2ff700c6bc610e8c0 Mon Sep 17 00:00:00 2001 From: Richard R Date: Thu, 21 May 2026 21:42:35 -0600 Subject: [PATCH] chore(eslint): restrict compute-core subpath imports to local-runtime --- eslint.config.mjs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index c85fb67..dffc73c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -11,6 +11,25 @@ const compat = new FlatCompat({ const eslintConfig = [ ...compat.extends("next/core-web-vitals", "next/typescript"), + { + rules: { + "no-restricted-imports": [ + "error", + { + patterns: [ + { + group: [ + "@openreader/compute-core/*", + "!@openreader/compute-core/local-runtime", + ], + message: + "Use '@openreader/compute-core' root imports for light APIs. The only allowed subpath is '@openreader/compute-core/local-runtime'.", + }, + ], + }, + ], + }, + }, ]; export default eslintConfig;