🐛 VSCode Rome project config in subdirectory of monorepo
Environment information
VSCode Insiders connected to a remote VM via Remote-SSH extension.
What happened?
I have a monorepo node project that looks something like this:
.
|--back-end // This is a ES6 node program that will use Rome
| |--rome.json
| |--package.json // This is where Rome is installed
| |--src
| |--index.js
| |--otherFiles.js
|--front-end // This submodule is a React app and will not be using Rome(yet)
| |--package.json
| |--.eslintrc.js
| |--src
| |--index.js
| |--App.jsx
|--package.json // Holds some very minimal configs for things like pnpm and pre-commit hooks
In VSCode I always open the root of the project, but noticed that when I do that, Rome doesn't respect the rome.json that lives in the back-end folder. To get it to respect that file, I have to open the back end folder directly or add the folder to the a workspace. Is it possible for Rome to use the rome.json file that's in a subdirectory instead of the root of the project? This is a major dealbreaker for shifting my company over to Rome from ESLint.
Expected result
The VSCode Rome extension formatter/linter should use the closest rome.json config file to the file being formatted/linted, as other packages like ESLint and Prettier do.
Code of Conduct
- [x] I agree to follow Rome's Code of Conduct
We are aware that at the moment the configuration discovery doesn't work like other tools, and we plan to address the issue in the next release.
There's something important to note though, the extension is meant to work as "Language Server" - the same way the "TypeScript language server" works - which means that even though the discovery of the configuration file is enhanced, the extension will keep analyzing all the workspace.
We are discussing if that's the correct way or not, and your use case is surely an interesting one that we need to consider.
This issue is stale because it has been open 14 days with no activity.
Closing! This has been implemented