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: use @eslint/config-array to resolve paths #69

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

voxpelli
Copy link
Contributor

Fixes #59

Following the discussions in eslint/eslint#18619 I went ahead and made a proof of concept extraction of the small core logic that ESLint uses to iterate over the files of a directory, using a ConfigArray as guidance.

I published it at configArrayFindFiles() and here is a PR that makes use if it.

It uses a fake schema to load the configs into ConfigArray as there is no published official one that can be used yet (eslint/eslint#18619 (comment))

Hopefully @eslint/config-array itself will get a configArrayFindFiles() equivalent eventually, but we need to start somewhere.

The way that configArrayFindFiles() is constructed it could also simplify ESLint's globSearch() as well if it were to be upstreamed to @eslint/config-array, as it would separate the concerns of matching by ConfigArray files and ignores and matching by the globs sent into globSearch() when someone wants to lint a set of files.

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Jun 21, 2024
@antfu antfu merged commit ca6070e into eslint:main Jun 22, 2024
7 checks passed
@github-actions github-actions bot mentioned this pull request Jun 22, 2024
@voxpelli voxpelli deleted the voxpelli/issue59 branch June 22, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unconfigured file reported as matched
2 participants