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

fix(eslint): handle monorepo setup for eslint #4637

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bodymindarts
Copy link

The heuristic for finding the correct Cwd when executing eslint does not work in the context of a monorepo setup where the .eslintrc.js may not live in the root of the repo but in one of the leaf packages ie. each package may have its own settings.

This PR fixes the behaviour by setting Cwd to the closest config path instead of the bin path.

Fixes #4487

The heuristic for finding the correct Cwd when executing eslint does not
work in the context of a monorepo setup where the `.eslintrc.js` may not
live in the root of the repo but in one of the leaf packages ie. each
package may have its own settings.

This PR fixes the behaviour by setting Cwd to the closest config path
instead of the bin path.
@w0rp
Copy link
Member

w0rp commented Oct 23, 2023

I'll have a think about this. ESLint keeps changing over the years and this change could break something.

@w0rp
Copy link
Member

w0rp commented Dec 10, 2023

This looks like the correct behaviour to me. You'll have to fix the tests. See :help ale-dev.

@w0rp w0rp added this to the Version 4.0.0 milestone Dec 10, 2023
Copy link

stale bot commented Mar 17, 2024

This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests.
If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

@stale stale bot added the stale PRs/Issues no longer valid label Mar 17, 2024
@stale stale bot closed this Apr 22, 2024
@w0rp w0rp reopened this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PRs/Issues no longer valid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ALE eslint cannot find config
2 participants