Skip to content

Commit 6dcd9b4

Browse files
committed
fix(deno-lint): has_error value
Close #545
1 parent 4f51993 commit 6dcd9b4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/deno-lint/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ crate-type = ["cdylib"]
1010
[dependencies]
1111
annotate-snippets = {version = "0.9", features = ["color"]}
1212
anyhow = "1"
13-
deno_ast = "0.4.1"
14-
deno_lint = "0.18.1"
13+
deno_ast = "0.5.0"
14+
deno_lint = "0.19.0"
1515
env_logger = "0.9"
1616
global_alloc = {path = "../../crates/alloc"}
1717
globwalk = "0.8"

packages/deno-lint/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class LintCommand extends Command {
1212

1313
private readonly checkOnly = Option.Boolean('--check-only', { required: false })
1414

15-
execute() {
15+
async execute() {
1616
const hasError = denolint(this.cwd ?? __dirname, this.configPath ?? '.denolint.json')
1717
return Promise.resolve(hasError && !this.checkOnly ? 1 : 0)
1818
}

packages/deno-lint/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn lint_command(ctx: CallContext) -> Result<JsBoolean> {
182182
status: Status::GenericFailure,
183183
reason: format!("Lint failed: {}, at: {:?}", e, &p),
184184
})?;
185-
has_error = !file_diagnostics.is_empty();
185+
has_error = has_error || !file_diagnostics.is_empty();
186186
diagnostics::display_diagnostics(&file_diagnostics, s.source(), true);
187187
}
188188
}

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2021-10-21
1+
nightly-2021-11-01

0 commit comments

Comments
 (0)