fix(lint): use recommended tag if there is no tags in config file or flags (#12644)

This commit is contained in:
Zheyu Zhang 2021-11-04 23:12:12 +08:00 committed by GitHub
parent 318dcc33af
commit efe956b4fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 111 additions and 61 deletions

View file

@ -132,8 +132,7 @@ pub fn get_lint_references(
parsed_source: &deno_ast::ParsedSource,
maybe_lint_config: Option<&LintConfig>,
) -> Result<Vec<Reference>, AnyError> {
let lint_rules =
get_configured_rules(maybe_lint_config, vec![], vec![], vec![])?;
let lint_rules = get_configured_rules(maybe_lint_config, None, None, None)?;
let linter = create_linter(parsed_source.media_type(), lint_rules);
let lint_diagnostics = linter.lint_with_ast(parsed_source);