-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Relative paths are broken with eslint 6.7.0 #205
Relative paths are broken with eslint 6.7.0 #205
Comments
A workaround I found is to just inject |
the same error,i replaced eslint version to 6.0.1 and the error disappears or in pkg scripts
|
That saved my day. Thx! |
+1 |
Truly man This is Great!! |
I also experience this error with eslint 6.8.0, I think there is an issue with the latest version but roll back to version 6.4.0 worked fine. |
…ute paths As of the 6.7.0 release of eslint, absolute paths are required when eslint is searching for ignore patterns (eslint/eslint@ca3b2a6). This causes prettier-eslint-cli to fail if called with a glob pattern using relative paths. This commit passes the file path through the `path.resolve` method to ensure they are always absolute paths. Addresses issues prettier#205 & prettier#208
…ute paths As of the 6.7.0 release of eslint, absolute paths are required when eslint is searching for ignore patterns (eslint/eslint@ca3b2a6). This causes prettier-eslint-cli to fail if called with a glob pattern using relative paths. This commit passes the file path through the `path.resolve` method to ensure they are always absolute paths. Addresses issues prettier#205 & prettier#208
I'm not deeply familiar with the details, but there's an open issue about an error message we're seeing in the upcoming `prettier-eslint` update, that says "'basePath' should be an absolute path.". That's prettier/prettier-eslint-cli#205. The first reply at that thread is a workaround that works for us: make the paths absolute. Instead of using `pwd`, as suggested there, we reuse our existing `rootdir` variable, which looks like it's designed for reuse for consistency.
I'm not deeply familiar with the details, but there's an open issue about an error message we're seeing in the upcoming `prettier-eslint` update, that says "'basePath' should be an absolute path.". That's prettier/prettier-eslint-cli#205. The first reply at that thread is a workaround that works for us: make the paths absolute. Instead of using `pwd`, as suggested there, we reuse our existing `rootdir` variable, which looks like it's designed for reuse for consistency.
I'm not deeply familiar with the details, but there's an open issue about an error message we're seeing in the upcoming `prettier-eslint` update, that says "'basePath' should be an absolute path.". That's prettier/prettier-eslint-cli#205. The first reply at that thread is a workaround that works for us: make the paths absolute. Instead of using `pwd`, as suggested there, we reuse our existing `rootdir` variable, which looks like it's designed for reuse for consistency.
I'm not deeply familiar with the details, but there's an open issue about an error message we're seeing in the upcoming `prettier-eslint` update, that says "'basePath' should be an absolute path.". That's prettier/prettier-eslint-cli#205. The first reply at that thread is a workaround that works for us: make the paths absolute. Instead of using `pwd`, as suggested there, we reuse our existing `rootdir` variable, which looks like it's designed for reuse for consistency. For a discussion that will help clarify the arcane bit of Bash here: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/.23M4120.20ESLint.206.2E8.2E0.20upgrade/near/889570.
I'm not deeply familiar with the details, but there's an open issue about an error message we're seeing in the upcoming `prettier-eslint` update, that says "'basePath' should be an absolute path.". That's prettier/prettier-eslint-cli#205. The first reply at that thread is a workaround that works for us: make the paths absolute. Instead of using `pwd`, as suggested there, we reuse our existing `rootdir` variable, which looks like it's designed for reuse for consistency. For a discussion that will help clarify the arcane bit of Bash here: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/.23M4120.20ESLint.206.2E8.2E0.20upgrade/near/889570.
I'm not deeply familiar with the details, but there's an open issue about an error message we're seeing in the upcoming `prettier-eslint` update, that says "'basePath' should be an absolute path.". That's prettier/prettier-eslint-cli#205. The first reply at that thread is a workaround that works for us: make the paths absolute. Instead of using `pwd`, as suggested there, we reuse our existing `rootdir` variable, which looks like it's designed for reuse for consistency. For a discussion that will help clarify the arcane bit of Bash here: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/.23M4120.20ESLint.206.2E8.2E0.20upgrade/near/889570.
…ute paths (#259) As of the 6.7.0 release of eslint, absolute paths are required when eslint is searching for ignore patterns (eslint/eslint@ca3b2a6). This causes prettier-eslint-cli to fail if called with a glob pattern using relative paths. This commit passes the file path through the `path.resolve` method to ensure they are always absolute paths. Addresses issues #205 & #208
Stale issue |
Was this fixed in #259? 🙂 |
Short answer - no |
https://antfu.me/posts/why-reproductions-are-required Feel free to create a new issue with minimal but runnable reproduction. |
@JounQin I think the ticket already describes the issue properly. Can't you reproduce it? |
This ticket is very old and outdated. Perhaps https://github.com/prettier/prettier-eslint-cli/releases/tag/v5.0.1 has resolved this. So if you still trouble with this, please feel free to create a new one instead. |
I recently upgrade my
eslint
andprettier-eslint-cli
dependencies in a project, and ran into an error when runningprettier-eslint
command.I have created a repository which reproduces the issue.
There appears to be a bug within
prettier-eslint-cli
which breaks relative paths in file globs. Here's what I get when I runprettier-eslint
:I tested, and it turns out that sure enough, if I replace
'./src/**/*.js
with an absolute path:/Users/brett/projects/repo/src/**/*.js
, thenprettier-eslint
works as expected.Version:
The text was updated successfully, but these errors were encountered: