Skip to content

oxlint,oxfmt: ignorePatterns cannot ignore files outside the config file's directory (problem with --config) #24276

Description

@kgoettler

Version

Using oxfmt 0.57.0 via CLI.

Issue

I have my oxfmt configuration file in a subdirectory of my repository. Following the documentation, I've specified the paths to several files that I'd like oxfmt to ignore using ignorePatterns with paths relative to the directory containing the configuration file. However, oxfmt is still formatting these files.

The issue does not occur if I place the configuration file in the root of my repository and update the ignorePatterns accordingly.

I've reproduced the issue with a TS configuration file, and a JSON configuration file. Both produce the same erroneous result.

Reproduction Repository

The following repository contains a minimally reproducible example: https://github.com/kgoettler/oxfmt-ignore-patterns-bug

Related Issues

I believe this issue was previously reported here, but that bug report was closed after the author failed to provide a minimally reproducible example. Hopefully the example repository provided above helps illustrate the issue.


Please let me know if there's any other information I can provide.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions