fix(cli): config file should resolve paths relative to the config file (#12867)

* Add `specifier_to_file_path` to support converting a ModuleSpecifier with a unix-style path to a PathBuf on Windows.
This commit is contained in:
David Sherret 2021-11-23 10:38:11 -05:00 committed by GitHub
parent d8afd56838
commit 51e3db956a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 200 additions and 126 deletions

View file

@ -71,21 +71,11 @@ pub async fn lint(
if let Some(lint_config) = maybe_lint_config.as_ref() {
if include_files.is_empty() {
include_files = lint_config
.files
.include
.iter()
.map(PathBuf::from)
.collect::<Vec<PathBuf>>();
include_files = lint_config.files.include.clone();
}
if exclude_files.is_empty() {
exclude_files = lint_config
.files
.exclude
.iter()
.map(PathBuf::from)
.collect::<Vec<PathBuf>>();
exclude_files = lint_config.files.exclude.clone();
}
}