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
AssertionError [ERR_ASSERTION]: 'newBasePath' should be an absolute path #12850
Comments
Thanks for the detailed bug report. This does seem like a bug to me. Looking at how paths work in WIndows in Microsoft's documentation, it does look like we need to fix this algorithm to not remove the separator from |
@kaicataldo are you happy with drkestels |
This makes sense to me: let resolvedResult = result || path.sep;
if (resolvedResult && resolvedResult.endsWith(":")) {
resolvedResult = resolvedResult + path.sep;
}
return resolvedResult; I'd be curious to hear from other team members who have more experience with Windows think. I'm no expert on Windows path gotchas. |
@kaicataldo how about something like this https://github.com/eslint/eslint/pull/13078/files |
@nzakas @kaicataldo do you have docs on your release pipeline? I am trying to understand rough timelines around when this will be available to consume from npmjs in an alpha build and then an official release? |
The timeline for major releases is a bit ad-hoc, and given the current worldwide situation and team members dealing with that and other personal issues, I can’t really give you any specify guidance. We wanted to get 7.0.0 out by May, and the next alpha was supposed to be last week but we couldn’t get stuff done due to low availability. |
no probs, completely understand the current situation was just curious so i can plan around it. take care, nick. |
@nickharris v7.0.0 was released last Friday! |
yup already using it :) thank you! |
Windows
Node v12.13.0
npm v6.13.6
eslint 6.8.0
Parser: @typescript-eslint/parser
Bash terminal
eslint config:
I'm currently using a globally installed npm package (call it foo cli) that wraps eslint. I have a workspace in c:\src\myproject. foo cli has an internal reference to eslint 6.8.0. When I run
ap lint
from c:\src\myproject, foo cli invokes eslint with some default parameters, and I get the error from the bug title. Here's the raw output:I believe the problem exists in ignore-pattern.js and was introduced in this pull request: https://github.com/eslint/eslint/pull/12274/files
If I add some debug logging to IgnorePattern.getCommonAncestorPath:
I see the following output:
Notice the
result: 'C:',
- that is not considered a valid absolute path.Interestingly enough, I can mitigate the problem by using windows cmd.exe and setting my current prompt to
c:\
(lowercase, as opposed toC:\
). Becausec:\ != C:\
, it works. See the output:I can also mitigate the problem by making the following code change to ignore-pattern.js:
The text was updated successfully, but these errors were encountered: