scripts/tools/eslint-plugin-prettier-internal-rules/require-json-extensions.js/resolveModuleInDirectory
const resolveModuleInDirectory = (directory, id) => {
  try {
    return require.resolve(id, { paths: [directory] });
  } catch {
    // noop
  }
};