1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(lint): support linting jsr pkg without version field (#25230)

This commit is contained in:
David Sherret 2024-08-30 18:05:44 -04:00 committed by GitHub
parent b9da6d0d00
commit 35074a10c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 2 deletions

View file

@ -1902,8 +1902,7 @@ pub fn config_to_deno_graph_workspace_member(
};
let version = match &config.json.version {
Some(name) => Some(deno_semver::Version::parse_standard(name)?),
// todo(#25230): remove
None => bail!("Missing 'version' field in config file."),
None => None,
};
Ok(deno_graph::WorkspaceMember {
base: config.specifier.join("./").unwrap(),

View file

@ -0,0 +1,5 @@
{
"args": "lint",
"output": "lint.out",
"exitCode": 1
}

View file

@ -0,0 +1,4 @@
{
"name": "@scope/pkg",
"exports": "./mod.ts"
}

View file

@ -0,0 +1,14 @@
error[no-slow-types]: missing explicit return type in the public API
--> [WILDLINE]:1:17
|
1 | export function test() {
| ^^^^ this function is missing an explicit return type
|
= hint: add an explicit return type to the function
info: all functions in the public API must have an explicit return type
docs: https://jsr.io/go/slow-type-missing-explicit-return-type
Found 1 problem
Checked 1 file

View file

@ -0,0 +1,3 @@
export function test() {
return 1 + 2;
}