mnahkies / openapi-code-generator

A code generation tool for openapi 3 / 3.1 specifications written in typescript, primarily aimed at generating typescript clients and server stubs. Other target languages may be added in future.
https://openapi-code-generator.nahkies.co.nz/
MIT License
17 stars 2 forks source link

feat: eliminate unused imports #132

Closed mnahkies closed 6 months ago

mnahkies commented 6 months ago

tried using biome first, with some code like this (private methods used):

 // @ts-ignore
    const linted = biome.withFile(filename, raw, (path) => {
      // @ts-ignore
      const result = biome.workspace.fixFile({
        path,
        fix_file_mode: "SafeAndUnsafeFixes",
        should_format: false
      })
      return result.code
    })

but this was ludicrously slow, even with all rules apart from unused imports disabled