CodexBloom - Programming Q&A Platform

VSCode Linter Not Triggering for ESLint in Monorepo Setup with Yarn Workspaces

👀 Views: 489 💬 Answers: 1 📅 Created: 2025-06-01
vscode eslint monorepo yarn javascript

I'm converting an old project and I've looked through the documentation and I'm still confused about Hey everyone, I'm running into an issue that's driving me crazy... I've searched everywhere and can't find a clear answer. I'm having trouble getting ESLint to run properly in a monorepo setup using Yarn workspaces in Visual Studio Code. Despite having ESLint installed both globally and locally in my project, the linter doesn't seem to trigger on my JavaScript files. My workspace is structured like this: ``` my-monorepo/ ├── package.json ├── packages/ │ ├── package-a/ │ │ ├── package.json │ │ └── index.js │ └── package-b/ │ ├── package.json │ └── index.js └── .eslintrc.js ``` In my `.eslintrc.js`, I've set up some basic rules: ```javascript module.exports = { env: { browser: true, es2021: true, }, extends: 'eslint:recommended', parserOptions: { ecmaVersion: 12, }, rules: { 'no-unused-vars': 'warn', }, }; ``` When I try to run ESLint from the terminal with `yarn eslint packages/**`, it works as expected, reporting any linting errors. However, in VSCode, I'm not seeing any linting errors highlighted in the editor. I’ve already checked the following: 1. The ESLint extension is installed and enabled in VSCode. 2. I have the setting `"eslint.enable": true` in my `settings.json`. 3. I’ve installed `eslint` in every package where I want linting to be applied, as well as in the root of my monorepo. 4. No issues in the Output panel regarding ESLint. Interestingly, when I open a file in `package-a`, I see the following behavior in the Problems tab: `No ESLint configuration found for files in the workspace`. Is there a specific configuration or setup I might be missing to get VSCode to recognize the ESLint config from the root? Any help would be appreciated! Is there a better approach? Has anyone else encountered this? This is for a web app running on Debian. I appreciate any insights! This is happening in both development and production on Windows 10. Thanks for taking the time to read this!