Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 374 Bytes

extensions.md

File metadata and controls

21 lines (13 loc) · 374 Bytes

Enforce import and export file extensions

In ESM, import paths and export paths must contain the file extension in it. This rule suggests and fixes the imports for you.

Fail

import { add } from "./math";

import { add } from "./math.ts";

import pkg from "./package";

Pass

import { add } from "./math.js";

import pkg from "./package.json";