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

Support variable substitution to refer to workspaceFolder / rootDir in eslint.options setting #1231

Closed
rdsedmundo opened this issue Apr 5, 2021 · 3 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@rdsedmundo
Copy link

rdsedmundo commented Apr 5, 2021

I'd like to configure the eslint.options setting to use my .gitignore at the root of my monorepo, unfortunately, there's no way to refer to the root directory, and because I'm making use of eslint.workspaceDirectories, I get errors depending on the nesting of my packages (not everything is under packages/* just), saying that the file could not be found.

Something like this:

  "eslint.options": {
    "ignorePath": "${workspaceFolder}/.gitignore"
  }
@dbaeumer
Copy link
Member

dbaeumer commented Apr 6, 2021

This is best supported in VS Code itself and dups microsoft/vscode#2809

@dbaeumer dbaeumer closed this as completed Apr 6, 2021
@dbaeumer dbaeumer added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 6, 2021
@rdsedmundo
Copy link
Author

I just faced this again on a repo where I have a single package that is not in a workspace and I'm referencing the ignorePath as ../../.gitignore.

The VSCode issue that you linked is more than 5 years old. Couldn't you reconsider opening this again? I'd be open to contributing, we can always remove our implementation here if VSCode makes it built-in in the future.

@dbaeumer
Copy link
Member

I think it makes more sense then to contribute this to VS Code itself then having a custom implementation here in ESLint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants