From 364b9b607be3277109d64eee233cf5a55b776eb9 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Sat, 7 Dec 2024 23:53:15 +0100 Subject: [PATCH] Fix lint on `@plone/registry/addons-loader` --- apps/rr7/.eslintrc.cjs | 1 + packages/registry/package.json | 3 +++ packages/registry/vite-plugin.d.ts | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/apps/rr7/.eslintrc.cjs b/apps/rr7/.eslintrc.cjs index b4a6a65b4d..d1480fca9f 100644 --- a/apps/rr7/.eslintrc.cjs +++ b/apps/rr7/.eslintrc.cjs @@ -38,6 +38,7 @@ module.exports = { react: { version: 'detect', }, + 'import/core-modules': ['@plone/registry/addons-loader'], formComponents: ['Form'], linkComponents: [ { name: 'Link', linkAttribute: 'to' }, diff --git a/packages/registry/package.json b/packages/registry/package.json index ee487c8bf8..c75b9a177a 100644 --- a/packages/registry/package.json +++ b/packages/registry/package.json @@ -56,6 +56,9 @@ "import": "./vite-plugin.js", "types": "./vite-plugin.d.ts" }, + "./addons-loader": { + "types": "./vite-plugin.d.ts" + }, ".": { "import": "./dist/index.js", "default": "./dist/index.cjs" diff --git a/packages/registry/vite-plugin.d.ts b/packages/registry/vite-plugin.d.ts index 2af076c87a..7745c3186b 100644 --- a/packages/registry/vite-plugin.d.ts +++ b/packages/registry/vite-plugin.d.ts @@ -1,5 +1,12 @@ +import { ConfigType } from './dist'; import * as vite from 'vite'; declare function PloneRegistryVitePlugin(): vite.Plugin; +declare module '@plone/registry/addons-loader' { + export default function applyAddonConfiguration( + config: ConfigType, + ): ConfigType; +} + export { PloneRegistryVitePlugin };