I want to build the settings ui component based on the schema I get from the installed lint rules and plugins. The installed API only gives me access to iddisplayNamedescriptionmodule.
Porposal:
Add settingsSchema to types:
export type InstalledPlugin = {
id: Plugin["id"]
displayName: Plugin["displayName"]
description: Plugin["description"]
/**
* The module which the plugin is installed from.
*/
module: string
// disabled: boolean
+ settingsSchema: Plugin["settingsSchema"]
}
Same for message lint rule...
Add settingsSchema to InstalledPlugin & InstalledMessageLintRule:
const installedPlugins = () => {
if (!resolvedModules()) return []
return resolvedModules()!.plugins.map((plugin) => ({
id: plugin.id,
displayName: plugin.displayName,
description: plugin.description,
module:
resolvedModules()?.meta.find((m) => m.id.includes(plugin.id))?.module ??
"Unknown module. You stumbled on a bug in inlang's source code. Please open an issue.",
+ settingsSchema: plugin.settingsSchema,
})) satisfies Array<InstalledPlugin>
}
Same for message lint rule...
It seems like an easy PR. @jurgen.leschner, let me know if I should open a PR to add this.
I want to build the settings ui component based on the schema I get from the installed lint rules and plugins. The installed API only gives me access to
id
displayName
description
module
.Porposal:
Same for message lint rule...
Same for message lint rule...
It seems like an easy PR. @jurgen.leschner, let me know if I should open a PR to add this.