mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
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:
parent
d8afd56838
commit
51e3db956a
16 changed files with 200 additions and 126 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue