Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static run(content: string): StageResult {
const log = logger(this.name);
log(content);
const editor = new MagicString(content);
const ast = parse(content, {
tokens: true
});
const { insertions, removals } = asi(content, ast);
insertions.forEach(({ index, content }) => editor.appendLeft(index, content));
removals.forEach(({ start, end }) => editor.remove(start, end));
return {
code: editor.toString(),
suggestions: []
};
}
}