177177177
1771771772y ago

Deno fmt conflicting with Deno lint, when using IIFE

// before formating
((): void => { /* code */ })()
// before formating
((): void => { /* code */ })()
after formating with deno fmt, it adds an extra semicolon before the IIFE, but deno lint says Unnecessary semicolon. Remove the extra (and unnecessary) semi-colon deno-lint(no-extra-semi)
// after formatting
;((): void => { /* code */ })()
^// deno-lint(no-extra-semi)
// after formatting
;((): void => { /* code */ })()
^// deno-lint(no-extra-semi)
3 Replies
Beast
Beast2y ago
the fix for that is use semicolons please I'm pretty sure it gets formatted like that just when you don't use semicolons
AapoAlas
AapoAlas2y ago
Please open an issue in denoland/deno repository.
177177177
177177177OP2y ago
yeah, with semicolons its fine yes ok

Did you find this page helpful?