I have a folder with two projects, a Nodejs backend and a Vuejs frontend. I want to open both projects at the same time, and being able to use eslint to check and format code in both.
The problem I'm having is that whenever a get the configuration sort of working for the vue project, the js files in the backend are not validated.
My main question is if it is possible at all to do this or not. I've already followed countless tutorials on getting eslint+prettier+airbnb plus all of the relevant plugins working. Else, if is it better to open two instances of VSCode, one for the backend and another for the frontend, each with its own configuration.
Thanks !!!
Open a second solution inside a single instance To open a second solution alongside your first solution, use the following steps: With your first solution already open, select File > Open. Browse the file system to find the existing solution. Select Open to open the second solution in the Solution Window.
To find the settings in Visual Studio Code, use the command palette to open Preferences: Open Workspace Settings (JSON). With this code in your settings. json file, ESLint will now automatically correct errors and validate JavaScript on save. Return back to your app.
Yes, you can get this working. You'll need to update your workspace settings.
https://medium.com/devityoself/monorepo-eslint-vscode-6f5982c8404d
[From Visual Studio Code]:
- CMD + Shift + P
- Start to type Workspace settings
- Search for ESlint extension and look for Working Directories and select Edit in settings.json.
- Enter the paths that need ESlint enabled
{ "eslint.workingDirectories": ["mobile/iOS", "platform/web"] }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With