Closed zimme closed 6 years ago
Why have both {lint,format}{Sync,Async}
? await syncFunction()
works fine.
Why have both {lint,format}{Sync,Async}? await syncFunction() works fine.
I thought it was a bit unnecessary, but I didn't realize it was as simple as that. You learn something new every day :+1:
This makes
format
andlint
async. This was needed to support the linters out there that does not have a sync API.The LinterAdapter interface supports
formatAsync
,formatSync
,lintAsync
andlintSync
. At least one format and lint function needs to be present on the linterAdapter that is being registered.In the
format
andlint
functions sync versions of the LinterAdapter's functions take presidence over the async versions. I don't know if this the best choice?