eslint / rewrite

Monorepo for the new version of ESLint
Apache License 2.0
65 stars 4 forks source link

fix!: Allow escaping characters on Windows #61

Closed mdjermanovic closed 1 week ago

mdjermanovic commented 1 week ago

Prerequisites checklist

What is the purpose of this pull request?

Allows using \ as an escape character in patterns regardless of the operating system. In particular, on Windows.

What changes did you make? (Give an overview)

Enabled allowWindowsEscape minimatch option.

Related Issues

refs https://github.com/eslint/eslint/issues/18597

Is there anything you'd like reviewers to focus on?

Should this maybe be marked as a breaking change for this package?

mdjermanovic commented 1 week ago

It seems that one test in eslint/eslint fails after this change. I'll look into this more.

mdjermanovic commented 1 week ago

The problem is with --ignore-pattern: we're prepending relative path in the os-specific format (for example, --ignore-pattern a.js run in src\app on Windows becomes src\app/a.js ignore pattern in config array). I'll submit a PR in eslint/eslint to update this first.

mdjermanovic commented 1 week ago

Now that https://github.com/eslint/eslint/pull/18613 has been merged, this is ready for review. I just tagged this as fix! to bump config-schema to be out of range for eslint <= 9.5.0.