ts-language-service-plugin-formatting-cli

Stars
3

Proof of concept for a command-line formatter with a TypeScript Language Service Plugin, based on TypeScript Server's tsserverlibrary.

This POC includes formatting SQL queries in tagged template literals using frigus02/typescript-sql-tagged-template-plugin, as in the code from src/abc.ts below:

class Sample {
  hello(word = 'world') {
    return 'Hello, ' + word;
  }
}
new Sample().hello('TypeScript');

function sql(...args) {}

export default function query() {
  return sql`SELECT  *
  FROM                               products`;
}

Credits to:

Related Projects