Commit 8c3bb92
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments