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

no-restricted-path: incorrect zone.target match #2089

Closed
malykhinvi opened this issue May 18, 2021 · 0 comments · Fixed by #2090
Closed

no-restricted-path: incorrect zone.target match #2089

malykhinvi opened this issue May 18, 2021 · 0 comments · Fixed by #2090

Comments

@malykhinvi
Copy link
Contributor

malykhinvi commented May 18, 2021

In this PR #2036 contains-path was updated to version 1.0.0. Looks like, there is a regression related to false-positive match of folders like /foo-bar to zone.target: '/foo'

Folder structure:
Screenshot 2021-05-18 at 14 58 43

Steps:

  1. Declare no-restricted-paths so imports from '/server' are forbidden inside /server/two. (Pay attention, zone target is /two, not /two-new.
  2. Import /server/one/a.js from /server/two-new/a.js

Actual results:
Import is forbidden

Expected result:
Import is allowed

See a corresponding issue: jonschlinkert/contains-path#5
See a PR, with test case, reproducing the issue: #2090

@malykhinvi malykhinvi changed the title no-restricted-path: incorrect target match no-restricted-path: incorrect zone.target match May 18, 2021
@ljharb ljharb closed this as completed in ddb2132 May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant