node-rs
node-rs copied to clipboard
Introduce asynchronous methods to deno-lint
Checking the sources can take a long time. Blocking the whole JavaScript VM should be avoided. The API could be changed to support asynchronous execution and let retain the synchronous methods with the well-known Sync suffix. For example:
function lint(filepath: string, source: string, enableAllRules?: boolean): Promise<string[]>
function lintSync(filepath: string, source: string, enableAllRules?: boolean): string[]
function denolint(dirname: string, configPath: string): Promise<boolean>
function denolintSync(dirname: string, configPath: string): boolean
Would you be interested in such improvement?