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

Plugin should always use path.join to handle working directories that end in '/' #23

Closed
dbaeumer opened this issue Feb 13, 2023 · 0 comments · Fixed by #24
Closed

Plugin should always use path.join to handle working directories that end in '/' #23

dbaeumer opened this issue Feb 13, 2023 · 0 comments · Fixed by #24

Comments

@dbaeumer
Copy link

Problematic code is here: https://github.com/MelvinVermeer/eslint-plugin-no-relative-import-paths/blob/main/index.js#LL4

Consider a case where context.getCwd() returns a path that ends in '/' then the statement will result in a path with '//' in it. This can easily be avoided by using path.join() instead.

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

Successfully merging a pull request may close this issue.

1 participant