[docs-utils] 4️⃣ Unnamed exports validator#252644
Merged
clintandrewhall merged 3 commits intoelastic:mainfrom Feb 24, 2026
Merged
[docs-utils] 4️⃣ Unnamed exports validator#252644clintandrewhall merged 3 commits intoelastic:mainfrom
clintandrewhall merged 3 commits intoelastic:mainfrom
Conversation
- Add UnnamedExport type. - Extend IssuesByPlugin with optional unnamedExports field. - Update getDeclarationNodesForPluginScope to detect unnamed exports. - Update getPluginApi to propagate unnamed exports. - Add --check unnamed CLI flag. - Add tests for unnamed export detection.
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
1 similar comment
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
13 tasks
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
nreese
pushed a commit
to nreese/kibana
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
bhapas
pushed a commit
to bhapas/kibana
that referenced
this pull request
Feb 25, 2026
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Mar 11, 2026
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds detection and tracking of unnamed exports in Kibana plugins. When a JSDoc-style comment appears above a line that isn't a proper declaration (e.g., a stray export or a comment above a non-declaration), the tooling now identifies these as unnamed exports and reports them as validation issues.
Note
This PR is a subset of #247688 for ease of review.
This PR was written with Cursor and
claude-4.5-opus-high.Before / After Example
Given an index file with a stray export like:
Before this PR:
The tooling silently skipped these nodes with no indication of an issue:
After this PR:
The tooling identifies the unnamed export and reports it:
And a new
--stats unnamedflag allows listing all unnamed exports:Changes
UnnamedExport,UnnamedExportsByPlugintypes andunnamedExportsfield toApiStatsandIssuesByPlugingetDeclarationNodesForPluginScopeto return aDeclarationNodesResultcontaining both nodes and unnamed exportsgetExportedFileDeclarationswhen a node has no identifiable namegetPluginApiandgetPluginApiMapinto stats collection--stats unnamedCLI flag for listing unnamed exportsImpact
Made with Cursor