Hako.Analyzers 1.0.13

dotnet add package Hako.Analyzers --version 1.0.13
                    
NuGet\Install-Package Hako.Analyzers -Version 1.0.13
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hako.Analyzers" Version="1.0.13">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hako.Analyzers" Version="1.0.13" />
                    
Directory.Packages.props
<PackageReference Include="Hako.Analyzers">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hako.Analyzers --version 1.0.13
                    
#r "nuget: Hako.Analyzers, 1.0.13"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hako.Analyzers@1.0.13
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hako.Analyzers&version=1.0.13
                    
Install as a Cake Addin
#tool nuget:?package=Hako.Analyzers&version=1.0.13
                    
Install as a Cake Tool

Hako.Analyzers

Roslyn analyzers and code fixes for the Hako JavaScript engine.

Installation

dotnet add package Hako.Analyzers

The analyzer is automatically integrated into your IDE and build process.

Analyzers

HAKO100: Missing Module Export

Detects when module exports are set but not declared in the module definition.

Problem:

var module = runtime.CreateCModule("myModule", init =>
{
    init.SetExport("foo", 42);
    init.SetFunction("greet", greeter);
    init.SetClass("Calculator", calculatorClass);
});
// Warning: Exports 'foo', 'greet', and 'Calculator' are not declared

Fixed:

var module = runtime.CreateCModule("myModule", init =>
{
    init.SetExport("foo", 42);
    init.SetFunction("greet", greeter);
    init.SetClass("Calculator", calculatorClass);
})
.AddExport("foo")
.AddExport("greet")
.AddExport("Calculator");

Code Fix: The analyzer provides an automatic code fix that adds missing AddExport calls. Use "Fix All" to batch fix multiple missing exports in a single module.

Why This Matters

Module exports must be explicitly declared using AddExport or AddExports. Forgetting to declare an export means the value won't be accessible from JavaScript imports, causing runtime errors that are hard to debug.

Documentation

See the main Hako documentation for complete API reference.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.13 398 11/19/2025
1.0.12 403 11/18/2025
1.0.11 392 11/18/2025
1.0.10 398 11/18/2025
1.0.9 398 11/18/2025
1.0.8 392 11/18/2025
1.0.7 273 11/13/2025
1.0.6 278 11/12/2025
1.0.5 160 11/7/2025
1.0.4 168 11/7/2025
1.0.3 189 11/6/2025