177177177
1771771773y 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
Beast3y 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
AapoAlas3y ago
Please open an issue in denoland/deno repository.
177177177
177177177OP3y ago
yeah, with semicolons its fine yes ok

Did you find this page helpful?