Vages / svelte-snake-workshop

A workshop that teaches Svelte and SvelteKit through making the classic game Snake
https://svelte-snake-workshop.vercel.app
MIT License
13 stars 12 forks source link

Add file endings to all imports #23

Closed Vages closed 2 years ago

Vages commented 2 years ago

I have changed my opinion about leaving file extensions out in imports.

import * as api from "$lib/api"; should be import * as api from "$lib/api.js";

EcmaScript Modules also require using file extensions, so why not just go with the times, eh? 🤷

There is probably some eslint rule that enforces this