refactor: move canvas to plugin surfaces

This commit is contained in:
Peter Steinberger
2026-05-07 05:07:32 +01:00
parent c6e6b31643
commit 330ba1fa31
1044 changed files with 11532 additions and 81283 deletions

View File

@@ -21,15 +21,15 @@ if (mode !== "lint" && mode !== "format") {
}
const lintExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"]);
const formatExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".json", ".md", ".mdx"]);
const formatIgnoredPaths = new Set(["src/canvas-host/a2ui/a2ui.bundle.js"]);
const formatExts = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".md", ".mdx"]);
const formatIgnoredPathPatterns = [/^extensions\/[^/]+\/src\/host\/.+\/[^/]+\.bundle\.js$/u];
const shouldSelect = (filePath) => {
const ext = path.extname(filePath).toLowerCase();
if (mode === "lint") {
return lintExts.has(ext);
}
if (formatIgnoredPaths.has(filePath)) {
if (formatIgnoredPathPatterns.some((pattern) => pattern.test(filePath))) {
return false;
}
return formatExts.has(ext);