Skip to content
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

Separate options per working directory #1843

Open
dangmai opened this issue May 2, 2024 · 2 comments
Open

Separate options per working directory #1843

dangmai opened this issue May 2, 2024 · 2 comments
Labels
feature-request Request for new features or functionality
Milestone

Comments

@dangmai
Copy link

dangmai commented May 2, 2024

Hi there, thank you for making and maintaining this extension 🤩

I have a question about monorepo setup - what I'm trying to accomplish is to override config file name in a monorepo, but only for some packages. You can see this repo for a reproducible case: https://github.com/dangmai/vscode-eslint-monorepo-issue

In that repo, I'd like to use .eslintrc.js for package a, and .eslintrc.custom.js for package b.

In the settings.json file, if you uncomment the overrideConfigFile, ESLint stops working altogether because it can't find that file in package a.

Is there an option that I'm overlooking her that can accomplish this? Thanks again in advance!

@dbaeumer
Copy link
Member

dbaeumer commented May 6, 2024

This is currently not possible. VS Code settings are per workspace folder.

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label May 6, 2024
@dbaeumer dbaeumer added this to the Backlog milestone May 6, 2024
@dangmai
Copy link
Author

dangmai commented May 6, 2024

I did find a workaround for this issue:
I basically have a .eslintrc.vscode.js in every subdir, and in it I do export require('./eslintrc.custom.js') or export require('./eslintrc.js') based on the correct file this extension should use for that subdir. Then in settings.json I specify overrideConfigFile as .eslintrc-vscode.js. It's not pretty but it does the job.

I'll leave this open in case it's something you want to support in the future, if not feel free to close it 👍 Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants