-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Parent Folder Config File Ignored? #701
Comments
Duplicate of #475? |
Could be related. But also maybe different. Since I am talking about the config files and not config inside package.json |
https://github.com/spence-s/ts-monorepo - this works for me. WIth this example I use overrides in the root for the configuration for each app/project in the monorepo. -- Alternatively, you can put an xo config in each package/app. Always run Anyway - it's really hard to tell what you are asking here. Loads of ppl, including me, use xo with monorepos and its pretty flexible. As far as finding things goes in the extension: You need to have xo as a dep in your package.json and it needs to be accessible in a local node_modules folder (yarn berry may break this, so use yarn classic, npm, or pnpm). Tried to make this clear in the extension documentation but may need to be more explicit about not supporting yarn pnp. |
Hi @spence-s, thanks for your reply. I think I might be trying to do something different. I thought I could run xo in the sub directories instead of only from the root of the project / monorepo. Since I am working on specific parts, I thought I could run xo just on that part to get more targeted formatting prompts and so on. With this, I thought that it would be good if But it sounds like that is not something that's working at this time? |
ahh i see - in your package/app folder use So lets say you have a monorepo with the folder navigate to the folder or in a package script, youd write This is wonky but this would be the current work around for what you want. Basically you are tricking xo into thinking you running it from the root folder. I think the extension should work already for what you want?? If not, please file a bug here https://github.com/xojs/vscode-linter-xo/issues |
Oh wow, @spence-s, that sounds like it could be a real life safer for me to have less config files. I have tried the extension but have not been able to get it to work with the config file in my project root. I will investigate in the coming weeks a bit more since I really like XO and want to use it more. I also tried looking into XO with VUE.js but the extension I found (https://github.com/ChocPanda/eslint-config-xo-vue) seems not to be maintained any more. Though this is going off topic 🙈. Thank you for your help with the workaround ❤. |
Closing in favor of |
Hello, I have been trying to get a parent folder / monorepo structure up and running with all kinds of ways. Tried following the instructions on the
readme.md
file and all.However, I have not been able to do it. Next to that the xo-linter extension for VS Code also seems to not be able to find my config files.
I tried renaming them, converting them to JSON, etc. I even tried if the
package.json
structure would work. No luck with any of those options for both (cli and vs code extension).Is there a trick that I don't know about?
Here is my
.xo-config.cjs
file which I am using and when I run myxo
in the folder where the config file actually is, it also works.Config File:
The text was updated successfully, but these errors were encountered: