Closed sergeysova closed 4 months ago
:+1: Also, one thing we could do is to add a Biome rule to avoid mistakenly omitting the node:
prefix. WDYT?
Looks like the rule available since v1.5.0
https://biomejs.dev/linter/rules/use-nodejs-import-protocol/
But actually I see:
telefunc/telefunc/biome.json:24:9 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Found an unknown key `useNodejsImportProtocol`.
22 │ "style": {
23 │ "recommended": true,
> 24 │ "useNodejsImportProtocol": "error"
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
25 │ }
26 │ }
Looks like biome need to be upgraded
Very nice.
Running $ biome lint --write .
doesn't fix the imports that are missing the node:
prefix, can we make Biome autofix this as well? It says Unsafe fix
so maybe that's why, and maybe we need to tell Biome to apply its autofix despite being "unsafe".
Biome doesn't complain about dynamic imports such as Actually it does, my bad (I was testing with an ignored file).import('path')
, is there a way to make it complain about dynamic imports as well?
The arg --unsafe
does the trick.
Closing in favor of https://github.com/brillout/telefunc/pull/115.
fixes #113