You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I'm seeing linting errors in each of my packages if I don't have this XO config in every package.json. Have I configured something incorrectly?
The text was updated successfully, but these errors were encountered:
I'm seeing the same behavior / having the same problem. Running xo in a sub-package does not seem to "search upwards" and find the parent package.json config.
- package.json # Includes XO config
- packages/
- packageName/
- package.json # Does not include XO config
I believe there are some magic filenames that might work - I'll try those out and report back. I'll watch this issue with interest though, as I'd rather not have yet another root config file.
If none of those searches reveal a configuration object, move up one directory level and try again. So the search continues in ./, ../, ../../, ../../../, etc., checking the same places in each directory.
Continue searching until arriving at your home directory (or some other directory defined by the cosmiconfig option stopDir).
In short, xo does not search upwards - the search is stopped in the current working directory.
Workaround
Use the --cwd flag to start xo from your monorepo root (overriding options.cwd)
Narrow scope back down by specifying the subfolder you want
Hello,
I have a very simple XO configuration I'd like to share between all the packages and apps in my Turborepo monorepo:
The project README states that I should just need one version of this in the root package.json file:
However, I'm seeing linting errors in each of my packages if I don't have this XO config in every package.json. Have I configured something incorrectly?
The text was updated successfully, but these errors were encountered: