-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(lint): linting package with .css file should raise no errors #26695
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,8 +293,10 @@ impl WorkspaceLinter { | |
deno_lint_config: lint_config, | ||
})); | ||
|
||
eprintln!("paths {:#?}", paths); | ||
let mut futures = Vec::with_capacity(2); | ||
if linter.has_package_rules() { | ||
// Package rules are only in effect if user didn't explicitly specify paths on the command line | ||
if paths.is_empty() && linter.has_package_rules() { | ||
Comment on lines
+296
to
+299
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bit seems broken - whether we invoke |
||
if self.workspace_module_graph.is_none() { | ||
let module_graph_creator = self.module_graph_creator.clone(); | ||
let packages = self.workspace_dir.jsr_packages_for_publish(); | ||
|
@@ -323,9 +325,11 @@ impl WorkspaceLinter { | |
.collect::<HashSet<_>>(); | ||
futures.push( | ||
async move { | ||
eprintln!("workspace module graph"); | ||
let graph = workspace_module_graph_future | ||
.await | ||
.map_err(|err| anyhow!("{:#}", err))?; | ||
eprintln!("workspace module graph2"); | ||
let export_urls = | ||
publish_config.config_file.resolve_export_value_urls()?; | ||
if !export_urls.iter().any(|url| path_urls.contains(url)) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"tests": { | ||
"run_dir": { | ||
"args": "lint", | ||
"output": "output.out" | ||
}, | ||
"run_file": { | ||
"args": "lint main.ts", | ||
"output": "Checked 1 file\n" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "@project/ui", | ||
"exports": { | ||
"./main.ts": "./main.ts", | ||
"./globals.css": "./globals.css" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
color: "red"; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call should filter out "unsupported media type" errors when graph is used for linting