- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 289
Projects in a Turborepo monorepo not using workspace package.json config #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm seeing the same behavior / having the same problem. Running
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. |
I've found the discrepancy! From lines 103 and 104 of options.cwd = path.resolve(options.cwd || process.cwd());
const configExplorer = cosmiconfig(MODULE_NAME, {searchPlaces: CONFIG_FILES, loaders: {noExt: defaultLoaders['.json']}, stopDir: options.cwd}); Note that From the comsiconfig readme:
In short, xo does not search upwards - the search is stopped in the current working directory. Workaround
{
"scripts": {
"lint": "xo --cwd=../.. $(pwd)"
}
} There's probably a better way to identify the monorepo root than just hard-coding |
…ly supports monorepos See: xojs/xo#733
I'm having issues even if I ignore the recommendation and do a config per child package. All configs are ignored if run from the child cwd |
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: