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

chore: upgrade ignore to v5.2.0 #72

Merged
merged 1 commit into from Mar 4, 2022
Merged

chore: upgrade ignore to v5.2.0 #72

merged 1 commit into from Mar 4, 2022

Conversation

snitin315
Copy link
Contributor

Fix eslint/eslint#15642

Upgrade ignore to v5.2.0. Use { allowRelativePaths: true } to get the v4 behavior.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some tests that would confirm that this fixes eslint/eslint#15642?

@mdjermanovic
Copy link
Member

My main concern with this is - is the behavior we were expecting from ignore 4.0.6 well tested. In other words, will our tests catch if this upgrade changes ESLint's behavior other than fixing the bug.

I made mdjermanovic#1 to check if eslint/eslintrc tests will fail without { allowRelativePaths: true } which enables backward compatibility. In this repo, only one test fails (this one). The test has some windows paths and fails only on posix, so it doesn't seem representative. That's bad.

On the other hand, 40 tests are failing in eslint/eslint repo without { allowRelativePaths: true } (mdjermanovic/eslint#1), while everything works well with { allowRelativePaths: true } (mdjermanovic/eslint#2), i.e. with this branch. That looks good enough.

@nzakas
Copy link
Member

nzakas commented Mar 1, 2022

On the other hand, 40 tests are failing in eslint/eslint repo without { allowRelativePaths: true } (mdjermanovic/eslint#1), while everything works well with { allowRelativePaths: true } (mdjermanovic/eslint#2), i.e. with this branch. That looks good enough.

I'm guessing one of these should be allowRelativePaths: false?

@mdjermanovic
Copy link
Member

On the other hand, 40 tests are failing in eslint/eslint repo without { allowRelativePaths: true } (mdjermanovic/eslint#1), while everything works well with { allowRelativePaths: true } (mdjermanovic/eslint#2), i.e. with this branch. That looks good enough.

I'm guessing one of these should be allowRelativePaths: false?

Hm, no. Tests are failing without { allowRelativePaths: true } (i.e. with the default { allowRelativePaths: false }), and passing with { allowRelativePaths: true }.

@snitin315
Copy link
Contributor Author

Can you add some tests that would confirm that this fixes eslint/eslint#15642?

Looks like you opened eslint/eslint#15666 for the same.

I'm guessing one of these should be allowRelativePaths: false?

No, because we were already using allowRelativePaths: true by default in ignore@v4. They changed the default to false in v5. So, now we need to explicitly mention it as true to get the old behavior.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@nzakas
Copy link
Member

nzakas commented Mar 4, 2022

Okay, I realize I missed “with” vs “without”. My apologies for the confusion.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s make sure the main repo is also upgraded.

@nzakas nzakas merged commit 98fb12d into main Mar 4, 2022
@nzakas nzakas deleted the chore/update-ignore branch March 4, 2022 01:22
@snitin315 snitin315 added accepted and removed triage labels Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: can't escape ] in .eslintignore
3 participants