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] no-restricted-paths: false-positive matches #2090

Merged
merged 1 commit into from
May 18, 2021

Conversation

malykhinvi
Copy link
Contributor

@malykhinvi malykhinvi commented May 18, 2021

Fixes #2089

In this PR I removed contains-paths dependency and used node's path.relative to identify if a file is inside the target. I used an approach similar to the one used in src/core/importType

@malykhinvi malykhinvi changed the title Reproduce partial paths error [Fix] no-restricted-paths: partial paths false-positive matches May 18, 2021
@coveralls
Copy link

coveralls commented May 18, 2021

Coverage Status

Coverage increased (+1.02%) to 82.434% when pulling ddb2132 on malykhinvi:fix-paths into bc99b86 on benmosher:master.

@malykhinvi malykhinvi marked this pull request as ready for review May 18, 2021 13:21
@malykhinvi malykhinvi changed the title [Fix] no-restricted-paths: partial paths false-positive matches [Fix] no-restricted-paths: false-positive matches May 18, 2021
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, this is great. Normally I firmly believe that more deps is better, but I'm stoked to remove this particular dep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

no-restricted-path: incorrect zone.target match
3 participants