Last 12 weeks · 0 commits
5 of 6 standards met
Describe the bug Similar to #9, I use to reference a file in a repo in my dotfiles repo. I'm using some akin to the following : The issue is that my dotfiles repo is a sibling to the repo where I'm configuring eslint so the resolved path of the is an "uncle" of the repo and triggers this error. To show what I mean, I have roughly this file structure: has the following: The is upstream from the linted repo, but the resolved path is As a workaround, I can symlink to , but it would be nice if I didn't have to do that on each computer using my dotfiles repo. I'd be happy to PR a change if you think it's acceptable to remove the "uncle" guard. Reproduction Requires system config as described above, cannot be reproed in a single repo. Please let me know if more info is needed. System Info Used Package Manager pnpm Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. [x] The provided reproduction is a minimal reproducible of the bug. Contributions [x] I am willing to submit a PR to fix this issue [x] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Description There's currently a limitation which disallows which are neither ancestors nor descendants of the cwd. Such a file is deemed an "uncle" in a code comment, though "cousin" may be a bit more accurate. I _believe_ this restriction was added because the ignored paths in a cousin file will be resolved relative to the cwd and may produce nonsense paths. However, if the ignored paths have no beginning or middle slashes, they're effectively global ignores and can be resolved relative to anything. This is exactly the case described in #18 where I try to include my global gitignore. Linked Issues Fixes #18 Additional context
Clear and concise description of the problem In a repo, any folder may contain a file. The complete set of ignored files for a folder is the combined set of ignores all the way up to the repo root. Currently, this plugin stops at the first found, and as a result does not correctly ignore all files that should be ignored. In a monorepo, each package may want its own to ignore package-specific files (that may/should not be ignored by other packages) in addition to the repo-level ignores. If a package were to do this currently, only the ignores defined in its own folder would get used, as the plugin stops searching for once the first is found. Suggested solution The plugin should search for files up to the repo root. The repo root may be inferred by the presence of the folder, or the path provided by the user. Alternative Move all package specific ignores to the root . This can cause the root to get bloated with package-specific ignores. Manually specifying all files to be used. I have not tested to see if this works, but even if it does, this can be a lot of work as every folder up to the repo root may contain a , and this effort needs to be replicated for each package. Additional context _No response_ Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Please be aware that vibe-coding contributions are 🚫 STRICTLY PROHIBITED. We are humans behind these open source projects, trying hard to maintain good quality and a healthy community. Not only do vibe-coding contributions pollute the code, but they also drain A LOT of unnecessary energy and time from maintainers and toxify the community and collaboration. All vibe-coded, AI-generated PRs will be rejected and closed without further notice. In severe cases, your account might be banned organization-wide and reported to GitHub. PLEASE SHOW SOME RESPECT and do not do so. Before submitting the PR, please make sure you do the following: Read the Contributing Guide. Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. Provide a description in this PR that addresses what the PR is solving and WHY**, or reference the issue that it solves (e.g. ). Ideally, include relevant tests that fail without this PR but pass with it. [x] This pull request adds a new option that will automatically go through all directories to find all gitignore files, with an option to skip certain dirs. Linked Issues fixes #20 Additional context Not really sure what to do if is , perhaps this new options should be ignored if is ? [Disclosure] This pr is not vibe coded but I did get help from codex for the unit testing and documentation.
Repository: antfu/eslint-config-flat-gitignore. Description: .gitignore support for ESLint Flat Config Stars: 137, Forks: 9. Primary language: TypeScript. Languages: TypeScript (99.2%), JavaScript (0.8%). License: MIT. Latest release: v2.3.0 (3mo ago). Open PRs: 1, open issues: 2. Last activity: 3mo ago. Community health: 85%. Top contributors: antfu, AndreaPontrandolfo, Dimava, DaniFoldi, fmal, IgorKowalczyk, lachlancollins, ckvv, RayGuo-ergou, ocavue.