diff options
author | Luca Casonato <hello@lcas.dev> | 2024-05-30 02:09:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 00:09:16 +0000 |
commit | e084fe10a98556d4630b54bdda2ce23b3b5b8a60 (patch) | |
tree | fe9d25aadc1fdf3884ead22f90595f1f9e1f3e55 /cli/lsp/analysis.rs | |
parent | 13723f267eb87f8c28ef0769cdf7e233b971326e (diff) |
feat(lint): add `no-boolean-literal-for-arguments` rule and enable `no-unused-vars` for jsx files (#24034)
* https://github.com/denoland/deno_lint/pull/1271
* https://github.com/denoland/deno_lint/pull/1277
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/lsp/analysis.rs')
-rw-r--r-- | cli/lsp/analysis.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index 9c7025781..f60f2e044 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -9,6 +9,7 @@ use super::tsc; use crate::args::jsr_url; use crate::tools::lint::create_linter; +use deno_lint::linter::LintConfig; use deno_runtime::fs_util::specifier_to_file_path; use deno_ast::SourceRange; @@ -169,9 +170,10 @@ fn as_lsp_range( pub fn get_lint_references( parsed_source: &deno_ast::ParsedSource, lint_rules: Vec<&'static dyn LintRule>, + lint_config: LintConfig, ) -> Result<Vec<Reference>, AnyError> { let linter = create_linter(lint_rules); - let lint_diagnostics = linter.lint_with_ast(parsed_source); + let lint_diagnostics = linter.lint_with_ast(parsed_source, lint_config); Ok( lint_diagnostics |