Monorepo eslint vscode
Recently where I work started switching over to a monorepo which seemed to give vscode some issues around linting. Thankfully with a little bit of research it appears that it is pretty straightforward to get it back up and running.
The first step is to go to your workplace settings in vscode
Command Palette:
- CMD + Shift + P
- Start to type
Workspace settings
3. Search for ESlint extension and look for Working Directories
and select Edit in settings.json
4. Enter the paths that need ESlint enabled
(Optional) You may want to exclude your .vscode
settings without using a .gitignore
. In our setup there is not a .gitignore
at the root level of the monorepo but I really dont want my IDE settings to find their way into source control. To fix this you can locally ignore files by following these steps (stackoverflow):
- You need to go to
.git/info/exclude
2. This file acts exactly like a .gitignore
file. Simply add your .vscode
folder name here and you are good to go =)