How does yarn know what to execute in this case?

I am working on a rather large code base. In some folder I notice that it will try to execute some command. However when I do a ls there is no package.json. When I try ls -la, there is no special dot file.

Here is the output from ls -lart

drwxr-xr-x   4 antkong  staff   128 20 Sep  2018 ui
-rw-r--r--   1 antkong  staff   587 29 Apr  2019 harnesses.visreg.ts
drwxr-xr-x   6 antkong  staff   192 29 Apr  2019 services
drwxr-xr-x   4 antkong  staff   128 16 Jul 11:31 subscription
drwxr-xr-x   4 antkong  staff   128 14 Oct 18:20 infinite_vertical_scrollbar
drwxr-xr-x   4 antkong  staff   128 31 Dec 10:30 layer
-rw-r--r--   1 antkong  staff  5331 13 Jan 14:17 BUILD
-rw-r--r--   1 antkong  staff  3204 13 Jan 14:17 tsconfig.json
drwxr-xr-x  12 antkong  staff   384 13 Jan 14:17 .
drwxr-xr-x  53 antkong  staff  1696 13 Jan 14:17 ..

There is a tsconfig file and a bazel build file. Nothing seems to be relevant to npm or yarn.

However when I run yarn install

$ yarn install
yarn install v1.16.0
$ bin/require_yarn.sh
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning Resolution field "axe-core@3.3.0" is incompatible with requested version "axe-core@^3.3.2"
success Already up-to-date.
$ bin/webdev.sh postinstall
yarn run v1.16.0
$ rimraf ./target/eslintcache
✨  Done in 0.22s.
yarn install v1.16.0
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.23s.
yarn install v1.16.0
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.36s.
✨  Done in 3.07s.

In a complete empty folder it is what I expect to see.

$ yarn install
yarn install v1.16.0
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...

success Saved lockfile.
✨  Done in 0.05s.

So what is causing a different yarn behaviour in my work folder? Is there any special env variable I should check? Or does yarn check for something in parent folder?