Plugins are TypeScript modules that hook into the SolidScript validator and optimizer without modifying the core toolchain. They are the right place to put organization-specific checks — things like enforcing naming conventions, banning certain patterns, or flagging incomplete work — that should run on every contract build alongside the native rules. In this guide, you’ll build a plugin that warns whenever a function has aDocumentation Index
Fetch the complete documentation index at: https://docs.solidscipt.zoracle.xyz/llms.txt
Use this file to discover all available pages before exploring further.
TODO in its NatSpec.
Create the plugin file
Create a file atplugins/my-plugin.ts and export a SolidScriptPlugin object:
plugins/my-plugin.ts
run function receives the parsed contract model and returns an array of diagnostic objects. Each diagnostic includes a rule name, severity, human-readable message, and source location.
Register the plugin
Load the plugin fromsolidscript.config.ts by adding its path to the plugins array:
solidscript.config.ts