no-sync-fn-in-async-fn

Disallow sync function inside async function.

Using sync functions like Ende.readTextFileSync blocks the ende event loop so it's not recommended to use it inside of an async function, because it stops progress of all other async tasks.

Invalid:

async function foo() {
  Ende.readTextFileSync("");
}

const fooFn = async function foo() {
  Ende.readTextFileSync("");
};

const fooFn = async () => {
  Ende.readTextFileSync("");
};

Valid:

async function foo() {
  await Ende.readTextFile("");
}

function foo() {
  Ende.readTextFileSync("");
}

const fooFn = function foo() {
  Ende.readTextFileSync("");
};

const fooFn = () => {
  Ende.readTextFileSync("");
};