Skip to content

Commit 8c3bb92

Browse files
committed
fix(oxlint-plugin): set type=module so plugin index.js loads
The repo root package.json has "type": "commonjs" (because the VS Code extension is bundled as CJS), which disables Node's syntax detection and forces .js files to parse as CJS. The fleet oxlint plugin uses ES module syntax (matching template/.config/oxlint- plugin/index.js), so loading it via the root context throws "Cannot use import statement outside a module". Adding a local package.json with "type": "module" scopes the ESM resolution to the plugin directory only, leaving the root extension build untouched. Note: enabling the plugin surfaces pre-existing socket/* rule violations across src/. Per the fleet rule "introducing a new rule surfaces dozens of pre-existing violations — surface the cleanup as a separate task" (template/CLAUDE.md §"Lint rules"), the cleanup pass is left as a follow-up task.
1 parent 60e08ed commit 8c3bb92

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.config/oxlint-plugin/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

0 commit comments

Comments
 (0)