IanVS / prettier-plugin-sort-imports

An opinionated but flexible prettier plugin to sort import statements
Apache License 2.0
951 stars 21 forks source link

🐛 Top-of-file comment duplication when runtime code is moved around. #87

Closed fbartho closed 1 year ago

fbartho commented 1 year ago
#!/usr/bin/env ts-node
// ################################################
// ## Highlander comment: There can only be one! ##
// ################################################

const someRandomGlobal = "stuff";

import * as fs from "fs";
import * as path from "path";
import shell from "shelljs";

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/usr/bin/env ts-node
// ################################################
// ## Highlander comment: There can only be one! ##
// ################################################
import * as fs from "fs";
import * as path from "path";
import shell from "shelljs";

// ################################################
// ## Highlander comment: There can only be one! ##
// ################################################

const someRandomGlobal = "stuff";

This comment shouldn't be duplicated!