Closed evamango closed 2 years ago
Almost forgot, my Nova version is 9.3. THX!
Write the full path for the module you are importing, i.e:
import foo from "./foo.ts";
Regarding your formatting preferences, that sort of thing is managed in a Deno config file. I don't know if there is an option regarding no semi though, and I suggest you stick to the defaults as much as possible anyway.
Hello @evamango!
Deno's a bit different to Node. For example: you don't need a package.json
, tsconfig.json
, or even node_modules
.
Deno also doesn't support what are called bare specifiers, e.g. import { something } from "something"
. You always need a file extension. Even third party modules are imported this way: import { something } from "https://deno.land/x/something/mod.ts"
.
You can find out more in the Deno manual.
+1 to wot @jaydenseric says. Also there's no way to configure deno fmt
to not use semicolons, though of course there's an open issue.
Thanks a lot!
My project's structure is simple, and I receive an error after import a module.![image](https://user-images.githubusercontent.com/3355751/169511109-5a35245c-b1ce-4c41-aa52-04ed13f6b8c9.png)
How to config the import service?
Also, How to config the formatter/linter, I don't like the semi at the end of line. THX!!